Hi
I tried to read a value from an HtmlSelectOne and I could not get.
The jsp is build programmatically and this is the code of the class that
generate the html code:
HtmlSelectOneListbox combo = (HtmlSelectOneListbox)
panel.getChildren().get(2);
String bind = "#{comboAction.name}";
combo.setValueBinding("value",
context.getApplication().createValueBinding(bind));
UISelectItems items = new UISelectItems();
//get the list of values
ArrayList arr = new ArrayList();
for (int i = 0; i < lista.size(); i++) {
arr.add(new SelectItem(list.getId(),list.getName());
}
items.setValue(arr);
combo.getChildren().add(items);
and in the same class I have the variable "name" and the method get and set
of this.
in faces-config.xml I define:
<managed-bean>
<managed-bean-name>comboAction</managed-bean-name>
<managed-bean-class>com.view.action.ComboAction</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
but I can't get the value of the bean when I push a button that is bind to
another method of this class.
How can I get the value of the select??
--
View this message in context:
http://www.nabble.com/HtmlSelectOneMenu-value-not-set-tp25471070p25471070.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.