-
1. Re: Conditional Rendering of a component
mail.micke Dec 27, 2007 9:45 AM (in response to sonlight)Hi
Is the backing bean in session scope? -
2. Re: Conditional Rendering of a component
sonlight Dec 27, 2007 9:52 AM (in response to sonlight)The backing bean is in request scope
-
3. Re: Conditional Rendering of a component
ilya_shaikovsky Dec 27, 2007 10:30 AM (in response to sonlight)the bean which has property which affects rendering of the component should be session scoped.
-
4. Re: Conditional Rendering of a component
sonlight Dec 27, 2007 11:57 AM (in response to sonlight)Thanks for your response. Yes,after changing to session scope its working fine. I'm still unsure of the reasons behind it , but I'm still learning. Learnt something new today ! Thanks for your help !
-
5. Re: Conditional Rendering of a component
sergeysmirnov Dec 27, 2007 4:00 PM (in response to sonlight)In JSF, to process the value (ie. validate and update model) you need to have a 'rendered' condition true on the second phase of the JSF lifecycle.
To see the component of the page, you need to have 'rendered' condition true on the second phase.
So, if you set the condition to true between the third and the sixth phase, it will appear on the page, but not processed after the postback. -
6. Re: Conditional Rendering of a component
sonlight Dec 28, 2007 2:03 PM (in response to sonlight)Thanks a lot ! It's making sense now...or I should say I understand it better !
-
7. Re: Conditional Rendering of a component
sonlight Dec 30, 2007 10:53 PM (in response to sonlight)I was reading more about the JSF lifecycle phases over the weekend. But one question still bothering me is, how chaning the bean scope from request scope to session scope makes the app. work fine ? If the component is not at all rendered during second phase, how does changing backing bean from 'request' to 'session' scope makes the difference ?
Thanks,
Kumar -
9. Re: Conditional Rendering of a component
sonlight Dec 31, 2007 11:19 AM (in response to sonlight)Awesome ! We have been looking for a neat solution for this problem and didn't know it was so simple. I truly appreciate your help.