Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Issues with facelets and saveState?

 
Alex Browning
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, and this is my faces config:



And my we.xml:
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64692
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
 
Alex Browning
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oops, I figured it out. I did not have the correct taglib xml for facelets...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic