• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Issues with facelets and saveState?

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh, and this is my faces config:



And my we.xml:
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oops, I figured it out. I did not have the correct taglib xml for facelets...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic