java - PanelGrid and OutputLabel -
i got problem code. want have selectonemenu select customer (this 1 works fine me). after selected element, should see id of customer in outputtext. not work:
<h:form id="form"> <h:panelgrid columns="2"> <h:outputlabel for="customer" value="customer: " /> <h:selectonemenu id="customerlist" value="#{customercontroller.selected}" required="true"> <f:selectitems value="#{customercontroller.items}" var="customer" itemlabel="#{customer.id} #{customer.firstname} #{customer.lastname} #{customer.email}" itemvalue="customer" /> <p:ajax update=":form:myid" /> </h:selectonemenu> <h:outputlabel value="customer id: " for="myid" /> <h:outputtext id="myid" value="#{customercontroller.selected.id}" /> </h:panelgrid> </h:form>
any ideas?
try use:
<p:ajax update="myid" />
Comments
Post a Comment