-
I'm starting to get the feeling that I'm having to do your job and you are just copy/pasting what is written here. If it doesn't work you are copy pasting the errors back again, sit back and wait for a solution.
I strongly suggest you read the reference guide, take a look at the sample application(s) to get an understanding on how it works.
Also when posting code use [ code][/code ] tags that way it remains readable!!! :mad:
But here is the answer in short.
lastname = lastName
firstname = firstName
I suggest a read of the JavaBeans specification and how properties work.
-
Hello,
I tried your code and i got this error:
org.springframework.beans.NotReadablePropertyExcep tion: Invalid property 'lastname' of bean class [com.altran.emi.business.user.User]: Bean property 'lastname' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?
at org.springframework.beans.BeanWrapperImpl.getPrope rtyValue(BeanWrapperImpl.java:707)
Here is the user Entity
@Entity
@Table(name = "user")
@Searchable
public class User extends BaseObject implements Serializable, UserDetails {
...
private String lastName;
...
@Column(name = "first_name", nullable = true, length = 50)
@SearchableProperty
public String getFirstName() {
return firstName;
}
@Column(name = "last_name", nullable = true, length = 50)
@SearchableProperty
public String getLastName() {
return lastName;
}
...
}
-
I'm not just copying and pasting your code because it has so many compilation errors!!!
I have changed it and reading the reference guide.
if you are not pleased to help, don't!
nobody forces you do it.
do what you want to but BE POLITE!! your solution does not work and it is not a last or first name probleme!
-
The code I post is to give you an idea but from what you postback I get the impression you are just copy/pasting without understanding. Your last post was at least due to this because you did an almost one on one copy at least for the names.
Your property is named lastName and not lastname and as such the error is simply in your form tag.
I only ask that before you post here you did at least some investigation yourself and try to understand how things work.