In JSF, the saveState () method is called twice. What for?

I put two outputs: one at the beginning of "save ()" and one at the end for the custom JSF component. "SaveState ()" is in the UIComponent object. Why are two pins output twice? This is basically what I see

"entering save" "ending save" "entering save" "ending save" 

Thanks.

+7
java jsf components
source share
3 answers

The method is called at two different stages. Although you are causing expensive controller operations, be sure to check the phases and only call the appropriate phase. For example, you want to call load methods at the Render response stage.

+1
source share

It looks like one of the jsf phases is being called twice. Try debugging your application !
Is redirection enabled?

0
source share

There may be two threads performing the same prints. Set a breakpoint and you will see: D

0
source share

All Articles