سؤال

I have couple of panel grids with rendered attribute, on value change event of a drop down list, I make one of the panel grids visible, this works fine. But after the panel is displayed all the conversions and validations attached to components inside panel grid fail.

Even if the component is single and outside the grid it fails validation.

Am I missing something on rendered attribute? Is there some thing going on in JSF lifecycle.

Any help will be really helpful...

Thanks in advance

I am using jsf 2.0 mojarra implentation.

هل كانت مفيدة؟

المحلول

You need to ensure that the condition responsible for the rendered attribute evaluates the same in the subsequent request. JSF will namely recheck the condition during apply request values and validations phases. As of now it look like that your bean is request scoped and that the condition got lost in the subsequent request. Easiest fix is to place the bean in view scope by annotating it as @ViewScoped. This way the bean will live as long as you're interacting with the same view.

See also:

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top