JSF

<h:inputText id="abc" value="#{bean.name}"/>

The above code will search for a function called getName() in bean.

But where is the rule mentioned that bean.name will search for bean.getName()?

How this transformation is done?

Why it searches getName() not giveName().

I know that the java uses getters and setters but in jsf is this transformation rule written somewhere?/

[415 byte] By [doNLearna] at [2007-11-26 15:19:23]
# 1

Hi,

JSF (or rather JSF VariableResolver) works according to JavaBeans rules - for non boolean variables it looks for getters (the get<VariableName>()) whereas for booleans is<VariableName>() is consulted. You seem to be missing some reading of the JavaBeans spec (Read it here - http://java.sun.com/docs/books/tutorial/javabeans/index.html).

Jacek

JacekLaskowskia at 2007-7-8 11:03:17 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...