Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8037755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:00:59+00:00 2026-06-05T03:00:59+00:00

DATAMODEL package com.foo.bar.baz.model class Customer { Integer id String firstName String lastName ….. }

  • 0

DATAMODEL

package com.foo.bar.baz.model

class Customer {
    Integer id
    String firstName
    String lastName
    .....
}

GSP

  ....
  <f:with bean="Customer">
      <f:field property="firstName"/>
  </f:with>
  ....

The GSP is not in the views\customer directory but views\customerRegistration.
When I try to view the page I get:

URI
/myApp/customerRegistration/index
Class
org.springframework.beans.NotReadablePropertyException
Message
Invalid property ‘firstName’ of bean class [java.lang.String]: Bean property ‘firstName’ is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?

Why can’t it read the firstName field in my data object?

I’ve tried adding the full package in the tag (“bean=”com.foo.bar.baz.model.Customer”) that only changes the “bean class” in the above error message from java.lang.String to java.lang.Class

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T03:01:00+00:00Added an answer on June 5, 2026 at 3:01 am

    Figured it out.

    The fields tag needs a live Customer object, not the reference to the class. To fix it I did the following:

    Created a new empty customer object in the controller and gives it to the view:

    render(view: "myView", model: [emptyCustomer: new Customer()])
    

    Then changed the view to use this object and everything worked:

    <f:with bean="emptyCustomer">
        <f:field property="firstName"/>
    </f:with>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to model this relationship following this link http://www.javaworld.com/javaworld/jw-01-2008/images/datamodel.gif Its the usual
To start with, below are my two model classes. public class DataModel { [Required]
I've created an AS class to use as a data model, shown here: package
I have the following piece of code in my DataModel.cs class: public User ValidateUser(string
i am system.datamodel.dataannotation for validating my views. below is my Model for the view.
I have an existing internal data model for a Picture , as follows: package
I have the following code: ViewData.Model = from m in dataModel.Items where m.Loaned ==
I have a class called DataModel or something, which is basically a unit of
i've got an issue with Jtable and my dataModel. My table model extends AbstracttableModel,
I have an Entity which is basically one Datamodel. That Model has several Columns

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.