if you can compute the style you want from the information you have in
one of your managed beans, I believe you can also do one of the
following:

<h:inputText ... style="#{myBean.myStyle}"/>

or

<h:inputText ... style="#{myBean.myStyle}"/>

- Brendan

-----Original Message-----
From: Christian Bohn [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 15, 2006 8:46 AM
To: MyFaces Discussion
Subject: Re: (Validation) required="true" should change my css style of
inputbox e.g. background:red


Hi,

why don't you simply define two inputfields and render only one like
this:

...
<t:inputText rendered="#{<<the EL-expression you used in your 
required-attribute or simply true or false}"  required="true" 
styleClass="red"  ....  />
<t:inputText rendered="#{! <<the EL-expression you used in your 
required-attribute or simply true or false}"  required="false" 
styleClass="normal"  ....  />
...

greetings

Chrstian




Reply via email to