incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Lessard" <simon.lessar...@gmail.com>
Subject Re: Can PPR change color of input text?
Date Thu, 07 Sep 2006 13:02:21 GMT
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
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message