Reputation: 3636
I am trying to bind an inputField to a bean, but i get the the following error in webbrowser
Error getting property 'Name' from bean of type com.app.PersonModel
faces-config
<?xml version="1.0" encoding="UTF-8"?>
<faces-config>
<managed-bean>
<managed-bean-name>person</managed-bean-name>
<managed-bean-class>com.app.PersonModel</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
</faces-config>
XPage
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:inputText id="Name" value="#{person.Name}"></xp:inputText>
</xp:view>
Java Bean
package com.app;
import java.io.Serializable;
public class PersonModel implements Serializable {
private static final long serialVersionUID = 1L;
private String Name;
public PersonModel(){
}
public String getName() {
return Name;
}
public void setName(String name) {
Name = name;
}
}
What am I missing?
thanks
Thomas
Upvotes: 0
Views: 125
Reputation: 21709
Change from person.Name to person.name. So do this instead when referencing the name property on your XPage:
<xp:inputText id="Name" value="#{person.name}"></xp:inputText>
Upvotes: 3