incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias Wessendorf" <mat...@apache.org>
Subject Re: Can PPR change color of input text?
Date Thu, 07 Sep 2006 14:33:18 GMT
with binding you can access the comp. from your backing bean

setStyleClass()

On 9/7/06, Simon Lessard <simon.lessard.3@gmail.com> wrote:
> Hello Martin,
>
> Yes it's possible with some little tricks.
>
> <af:inputText styleClass="#{myInputBean.styleClass}" binding="#{
> myInputBean.input}"/>
>
> In MyInputBean (request scoped):
>
> public String getStyleClass()
> {
>   UIComponent input = getInput();
>   FacesContext context = FacesContext.getCurrentInstance();
>   Iterator messages = context.getMessages(input.getClientId(context));
>   return messages.hasNext() ? "errorClass" : "normalClass"
> }
>
> Note that I' also working on an :error state for inputText skin that will do
> that automatically.
>
>
> Regards,
>
> ~ Simon
>
> On 9/7/06, Martin Koci <Martin.Koci@aura.cz> wrote:
> >
> > Hello,
> >
> > ii possible to use partial submit and partial update to change color
> > (css style)  on a tr:inputText?
> >
> > I my case I want make input red if user enters date older than today.
> >
> > Thanks
> >
> > Martin
> >
> >
>
>


-- 
Matthias Wessendorf

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Mime
View raw message