Hello,
I am trying to use the myfaces saveState function along with facelets and I am having some very vexing issues :-)
I broke down the issue to the basic components. Basically if I have a simple
JSF page like the following:
In that case, the save state appears to be working as expected. If I convert this to facelets, it does not appear to be working. Here is the conversion:
Now all of the sudden it does not work!! The page maintains the ID value but the list goes away...
The backing bean is super simple:
private
String id;
private List items;
When I bring it up the first time it is empty.
If I press the "load" button then a static array of items is loaded and displayed.
If I then click save, the items are not redisplayed.
The when I click load I see these from my phase listener..
BEFORE PHASE: RESTORE_VIEW(1)
BEFORE PHASE: RESTORE_VIEW(1)
AFTER PHASE: RESTORE_VIEW(1)
AFTER PHASE: RESTORE_VIEW(1)
BEFORE PHASE: APPLY_REQUEST_VALUES(2)
BEFORE PHASE: APPLY_REQUEST_VALUES(2)
AFTER PHASE: APPLY_REQUEST_VALUES(2)
AFTER PHASE: APPLY_REQUEST_VALUES(2)
BEFORE PHASE: PROCESS_VALIDATIONS(3)
BEFORE PHASE: PROCESS_VALIDATIONS(3)
AFTER PHASE: PROCESS_VALIDATIONS(3)
AFTER PHASE: PROCESS_VALIDATIONS(3)
BEFORE PHASE: UPDATE_MODEL_VALUES(4)
BEFORE PHASE: UPDATE_MODEL_VALUES(4)
AFTER PHASE: UPDATE_MODEL_VALUES(4)
AFTER PHASE: UPDATE_MODEL_VALUES(4)
BEFORE PHASE: INVOKE_APPLICATION(5)
BEFORE PHASE: INVOKE_APPLICATION(5)
Loading item list
AFTER PHASE: INVOKE_APPLICATION(5)
AFTER PHASE: INVOKE_APPLICATION(5)
BEFORE PHASE: RENDER_RESPONSE(6)
BEFORE PHASE: RENDER_RESPONSE(6)
AFTER PHASE: RENDER_RESPONSE(6)
AFTER PHASE: RENDER_RESPONSE(6)
That appears a bit odd, not sure why it is doubling..
When I then click save I see this:
I have been somewhat stumped with this for awhile. I would really appreciate any leads anyone can provide as to what the problem might be.
Thanks!!