Reputation: 86627
I'm just setting up a simple testclass. Code completions works in eclipse, but I cannot launch the page:
backing bean:
@Named
@RequestScoped
public class TestBean {
public String getString() {
return "click me";
}
}
jsf:
<h:commandButton value="#{testBean.getString()}" />
also tried testBean.string and testBean.getString.
exception:
javax.servlet.ServletException: input.xhtml @41,52 value="#{testBean.getString()}":
The class 'TestBean$Proxy$_$$_WeldClientProxy' does not have the property 'getString'.
What is wrong here??
Upvotes: 0
Views: 1457
Reputation: 3145
In JSF you don't use parentheses or the "get" part of the name.
Use this instead.
<h:commandButton value="#{testBean.string}" />
Upvotes: 1