Hi,
I tried both drop down menus, MyFaces's HtmlSelectOneMenu and Trinidad's
SelectOneChoice and both seem to have the same problem or at least I can't
understand their behaviour.
The menus are bound to an according object in a managed bean and the setter
looks like this:
public void setSelectOne(CoreSelectOneChoice selectOne) {
this.selectOne = selectOne;
if(selectOne.getValue() != null)
System.out.println(selectOne.getValue().toString());
else
System.out.println("broker null");
}
the tags:
<tr:selectOneChoice id="menu0"
inlineStyle="margin-left: 20px"
binding="#{createTransactionModel.selectOne}">
<tr:selectItem label="Broker" value="broker" />
<tr:selectItem label="Customer"
value="customer" />
</tr:selectOneChoice>
The very first time I call a page I get "broker null" as expected. Then I
push a button which causes a submit and the setter get's called again but
although I SELECTED a value I still get "broker null". When I push the
button a second time I finally get a not null value.
And if it wasn't confusing enough the behaviour differs from App Server to
App Server. The above behaviour was observed on a Websphere App Server. On a
Glassfish instead I get "broker null" when the page is called for the first
time (ok so far) and when I hit a button
"broker null"
"broker != null"
as output straight one after another.
Can somebody explain to me this behaviour? Especially why I only get a not
null value on the WAS after causing a submit a second time?
Cheers
Simon
--
View this message in context:
http://old.nabble.com/MyFaces-binding-problem-with-HtmlSelectOneMenu-SelectOneChoice-tp27306676p27306676.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.