This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSF and the fly likes Validation/rendering strategy Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Validation/rendering strategy" Watch "Validation/rendering strategy" New topic
Author

Validation/rendering strategy

Julien Martin
Ranch Hand

Joined: Apr 24, 2004
Posts: 384
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

Joined: Dec 28, 2006
Posts: 893
Create a property in your backing bean which will set the rendered property of your outputText to false when you submit the form.


Remko (My website)
SCJP 1.5, SCWCD 1.4, SCDJWS 1.4, SCBCD 1.5, ITIL(Manager), Prince2(Practitioner), Reading/ gaining experience for SCEA,
Julien Martin
Ranch Hand

Joined: Apr 24, 2004
Posts: 384
How would this property be aware of validation errors since I don't use an inline validator???
J.
Remko Strating
Ranch Hand

Joined: Dec 28, 2006
Posts: 893
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Validation/rendering strategy
 
Similar Threads
know the current status of command button
valueChangeListener not called.
Action Event
problem with findComponent()
validatores in JSF