Using jsf 2 and Primefaces 3.4
I am aware that there are many similar questions but none of them work on this one.
When the panelGrid \"inner\" is rendered w
Try jstl c:if
tag in place of rendered
. That works for me.
Your rendered
condition apparently depends on a request scoped variabe, e.g. a property of a request scoped managed bean or a request parameter. A form submit accounts as a completely independent and brand new request whrein all request scoped managed beans are newly recreated, with all properties set to default. If the rendered
attribute evaluates to false
during collecting the submitted values (the apply request values phase of the form submit), then they simply won't be collected.
There are basically 2 ways to solve this:
Make sure that the condition behind the rendered
attribute is properly preinitialized in the (post)constructor of the request scoped bean so that it returns exactly the same value during the request of processing the form submit as it was during the request of displaying the form to the enduser.
Put the bean in the view scope instead. This way the bean instance will live as long as you're interacting with the same view by ajax or by returning void
or null
in action method.