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