I have a <p:selectOneMenu>
on my page, it receives a map for its values:
<p:selectOneMenu style="width:160px; float:right;"
value="#{aba.ln}" rendered="#{aba.selecaoAtiva}">
<f:selectItems value="#{aba.itens}" />
<p:ajax update="@form" event="change" />
</p:selectOneMenu>
It is rendering the following HTML for the select:
<select name="j_idt72:j_idt73:j_idt77_input" id="j_idt72:j_idt73:j_idt77_input">
<option selected="selected" value="71xxxxUG">LABEL ONE</option>
<option value="71yyyyUG">LABEL TWO</option>
</select>
but the ajax is sending the LABELS to the backing bean.
After fiddling a while, i removed the event="change"
from the <p:ajax>
, and it started passing values again.
So, question is, why having <p:ajax update="@form" event="change" />
sends labels to the backing bean, while <p:ajax update="@form" />
sends the values?