JSF 2.2 @ViewScoped binding bug? -
i've read binding bug @viewscoped (bug report) , fixed in 1 of latest versions of jsf, tested 3 latest versions of jsf , tried using
<context-param> <param-name>javax.faces.partial_state_saving</param-name> <param-value>false</param-value> fix solve it, no luck.
i have primefaces datatable have filters in each column header.
<p:column id="cpfheader" sortby="#{cliente.nrcpf}" filtermatchmode="contains"> <f:facet name="header"> <h:panelgrid columns="1"> <h:outputtext value="cpf" /> <p:inputtext value="#{cadastroclientebean.cliente.nrcpf}"> </p:inputtext> <p:commandbutton actionlistener="#{cadastroclientebean.getclientesbusca}" update="#{form}:tabelacliente:tblcliente" value="filtrar"></p:commandbutton> </h:panelgrid> </f:facet> #{cliente.nrcpf} </p:column> before changed jsf version, everytime i'd click on "filtrar" button, new instance of cadastroclientebean created. i've changed it, seems managedbean not being instantiated everytime, cliente variable becoming null, eventhough instantiate on constructor.
public cadastroclientebean(){ cliente = new cliente(); init(); } edit: after debugging bit found out value of filter being set on variable , right after setcliente() being called , setting null, don't know why.
figured out happening selection="#{cadastroclientebean.cliente}" attribute on datatable setting client null since there no line selected.
Comments
Post a Comment