jsf - f:setPropertyActionListener does not set property -
i lost. researched every post setpropertylistener
, not know i'm doing wrong. have jsf page:
<ui:define name="content"> <h:form id="itemsearchform"> <p:commandbutton update=":itemform" icon="ui-icon ui-icon-search"> <f:setpropertyactionlistener target="#{itemdetailmanagedbean.itemid}" value="test"/> <f:setpropertyactionlistener target="#{itemdetailmanagedbean.accounttype}" value="test"/> </p:commandbutton> <p:datatable id="itemlist" paginator="true" var="currentitem" value="#searchitemmanagedbean.searchitems}"> . . <p:column headertext="detail"> <p:commandbutton update=":itemform" oncomplete="pf('itemdetail').show()" icon="ui-icon ui-icon-search"> <f:setpropertyactionlistener target="#{itemdetailmanagedbean.itemid}" value="test"/> <f:setpropertyactionlistener target="#{itemdetailmanagedbean.accounttype}" value="test"/> </p:commandbutton> </p:column> </p:datatable> </h:form> </ui:define>
and itemdetailmanagedean:
public class itemdetailmanagedbean implements serializable{ private string itemid,accounttype; public itemdetailmanagedbean() { } public searchforitembean getsearchbean() { homecoming searchbean; } public string getitemid() { homecoming itemid; } public string getaccounttype() { homecoming accounttype; } public void setitemid(string itemid) { this.itemid = itemid; } public void setaccounttype(string accounttype) { this.accounttype = accounttype; } }
the problem is, first commandbutton working should(so set properties right). sec commandbutton not work @ all. both button shows dialog, should. have itemform on other part of page.
got sollution finally. problem not in jsf in servicebean, had changed info table content during loading.
jsf primefaces managed-bean
No comments:
Post a Comment