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 <[EMAIL PROTECTED]> 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



Reply via email to