jsf - Why my session scoped managed bean is not retaining value of property? -
i have session scoped managed bean propety:
private escalamensalstruct escalaorigem; which set manually in method, let say, setescalaorigem(escalamensalstruct ems), when call method
public void sugerirdobra() { (final escalamensalstruct escaladiaria : cache.getinstance().getlistaescaladiaria()) { if (escaladiaria.getlinha().equals(this.escalaorigem.getlinha())) { if (escaladiaria.getfim() <= escaladiaria.getinicio()) { this.listadobra.add(escaladiaria); } } } } escalaorigin null. bean viewscoped , changed sessionscoped thinking solve problem, continues trow nullpointerexception in first if. i'm 100% sure setescalaorigin method not receiving null, dont know else be.
edit: following code in button calld sugerirdobra , setting escalaorigem null. thats changing attribute's name without changing setter name.
<f:setpropertyactionlistener value="#{null}" target="#{escaladiariatrocacontroller.escalaparatrocaorigem}"> </f:setpropertyactionlistener>
Comments
Post a Comment