• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Validation/rendering strategy

 
Julien Martin
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I would like for an outputText element to be hidden (i.e. not rendered) when the corresponding inputText element has input and validated (by a standard tag-based validator). Is that possible?



Thanks in advance,

Julien.
 
Remko Strating
Ranch Hand
Posts: 893
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Create a property in your backing bean which will set the rendered property of your outputText to false when you submit the form.
 
Julien Martin
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How would this property be aware of validation errors since I don't use an inline validator???
J.
 
Remko Strating
Ranch Hand
Posts: 893
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That property should not be aware of a validation error, because by a validation error of the other property there will be no post of the form and so the value of the backing bean will not change and your outputText will be displayed.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic