incubator-adffaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Winer" <awi...@gmail.com>
Subject Re: "message" and "messageType" in < tr:message> component
Date Thu, 14 Dec 2006 22:25:04 GMT
Use message in one of two ways:
 - Just set 'for', and let it do the work for you
 - Explicitly set 'message' and 'messageType'

The behavior of message and messageType when you've
also set 'for' is unspecified.

-- Adam


On 12/14/06, Piyush Hari <piyush.hari@oracle.com> wrote:
> Hello,
>
> I am trying to use 'message' and 'messageType' attribute on a <tr:message>
> component.
>
> According to the trinidad documentation at :
> http://incubator.apache.org/adffaces/trinidad-api/tagdoc/tr_message.html
> these attributes are defined as follows:
>
>  - message : The error, warning, or informational text.
>  - messageType : The type of the message; acceptable values are "error",
> "warning", "info", and "none". Defaults to "none".
>
> My code is:
>
> <tr:message for="foo" messageType="error" message="This is an error
> message"/>
> <tr:inputText id="foo" simple="true" label="BigInteger field">
>     <f:converter converterId="javax.faces.BigInteger"/>
> </tr:inputText>
> <tr:commandButton id="message" text="Submit"/>
>
> I expect that after the user enters a NON-NUMBER (like "foo") in the
> inputText, the error should display in the message component as "This is an
> error message"(message) with an "error icon" (because messageType="error").
> However, this does not happen. The first time I open a page, the message
> text ("This is an error message") is already written. When I click submit
> after entering "foo" in the inputText, the message remains on screen and no
> error icon appears.
>
> Am I missing something obvious in the code ?
>
> I will greatly appreciate any response.
>
> Regards,
> Piyush
>
>
>

Mime
View raw message