aspose file tools
The moose likes JSF and the fly likes Validation/rendering strategy Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSF
Reply 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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Validation/rendering strategy
 
Similar Threads
problem with findComponent()
validatores in JSF
valueChangeListener not called.
know the current status of command button
Action Event