Before I have used methods with arguments to obtain the values of a component on my JSF page, for example
<h:dataTable value="#{myBean.getMyList(argument)}">
However now I need the same principle, but using it on a value attribute of an inputText element, so it would be more or less like this:
<h:inputText value="#{myBean.getMyValue(argment)}">
The problem is that the second method will not invoke the setter method, when executing the element from a f:ajax element.
What would be another way of passing values to the setter and getter methods on the backingBean?.
Thanks a lot.
It’s indeed not possible to set a value on an EL expression which does not represent a getter. You’d need to turn
myValueinto aMap<String, Object>and use the following notation.This will then call the
put()method on theMap. Note that you don’t need a setter formyValuehere.