On 3/10/06, Lindholm, Greg <[EMAIL PROTECTED]> wrote:
> I don't see how the ifMessage tag would allow me to change the
> styleClass
> of the h:inputText.
I haven't looked at the component, but I'd imagine it would work
something like this:
<ifMessage ....>
<h:inputText styleClass="errorStyle">
</ifMessage>
<ifMessage notFound="#{true}" ....>
<h:inputText styleClass="normalStyle">
</ifMessage>
However, I don't know if there's a negating attribute available for
ifMessage (ie, ifNotMessage). If there isn't, it'd be a good patch
on this suggested contribution.
> The styleClass="#{backingBean.errorStyleClass}" might work. I assume
> there is away to get the h:inputText component from the backing bean
> (can someone tell me how?).
Sure.
<h:inputText binding="#{backingBean.inputComponent}">
Just provide a UIInput (or HtmlInputText) getter/setter on your
backing bean. Looks like this is probably the easiest solution for
you, and standardized.