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

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -