Attribute values representing value expressions are set via setValueExpression("attributeName", valueExpression)
, not via setAttributeName(evaluatedValue)
. You know, JSF/Facelets EL is deferred, not implicit.
You should in the getResult()
basically be obtaining the evaluated value by getAttributes()
map:
public List<Result> getResult() {
Integer inputId = (Integer) getAttributes().get("inputId");
// ...
}
If you really want to add a getter and setter, then delegate to getStateHelper()
.
public Integer getInputId() {
return (Integer) getStateHelper().eval("inputId");
}
public void setInputId(Integer inputId) {
getStateHelper().put("inputId", inputId);
}
(note: don't mix them; getAttributes().get()
would scan for a getter first and then invoke it; if you were using getAttributes().get()
inside the getter itself, it would call itself in an infinite loop causing an error represented by this site's name)