wood burning stoves 2.0*
The moose likes JSF and the fly likes Issues with facelets and saveState? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Issues with facelets and saveState?" Watch "Issues with facelets and saveState?" New topic
Author

Issues with facelets and saveState?

Alex Browning
Greenhorn

Joined: Dec 06, 2006
Posts: 5
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!!
Alex Browning
Greenhorn

Joined: Dec 06, 2006
Posts: 5
Oh, and this is my faces config:



And my we.xml:
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60752
    
  65

"Alex B",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious. An initial for a last name is not acceptable.

Thanks!
bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Alex Browning
Greenhorn

Joined: Dec 06, 2006
Posts: 5
Thanks for the info. I updated my name with a different spelling of my last name.
Sadly there can only be one person with a name in the system.

Thanks!
Alex Browning
Greenhorn

Joined: Dec 06, 2006
Posts: 5
Oops, I figured it out. I did not have the correct taglib xml for facelets...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Issues with facelets and saveState?
 
Similar Threads
Jumping past phases 2, 3, 4, and 5?
Wierd problem while using valueChangeListener() during submit of a form
Issue using h:commandLink with rendered attribute
Render Response phase is not getting invoked
JSF 2.0 selectOneMenu control not populated