unfortunately, i'm using icefaces, and the ice:inputText doesn't support
requiredMessage.
On 7/21/09 10:58 AM, Ryan Lubke wrote:
> On 7/21/09 8:00 AM, webtier_at_javadesktop.org wrote:
>> Hi, is it possible to define different bundle messages for an specified event? Example:
>>
>> javax.faces.component.UIInput.REQUIRED = value is required
>>
>> In page X, i want this message to be showed, so no problem example:
>>
>> <h:inputText value="#{anywhere.value}" required="true"/>
>>
>> But in the page Y i wanted another message with parameters for the same required situation.
>>
>> javax.faces.component.UIInput.REQUIRED_CUSTOM = value is required for {2}
>>
>> <h:inputText value="#{anywhere.value}" required="true" label="Anywhere Input"/>
>>
>> The problem is: now i will get the other message not this custom one. How could i say to the Faces that now i want to use another bundle-message?
>>
> You could define a resource bundle in the faces config with your
> alternate messages like:
>
> |<||application||>|
> ||| ||<||resource-bundle||>|
> ||| ||<||base-name||>some.other.Bundle</||base-name||>|
> ||| ||<||var||>custom</||var||>|
> ||| ||</||resource-bundle||>|
> ||| ||</||application||>|
>
> Then in your inputText use:
> requiredMessage="#{custom['messageBundleKey']}" />
>
> You can associate different bundles with different variables names
> using this method.
>> Thks in advance,
>>
>> Israel
>> [Message sent by forum member 'israelbgf' (israelbgf)]
>>
>> http://forums.java.net/jive/thread.jspa?messageID=356773
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:webtier-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail:webtier-help_at_glassfish.dev.java.net
>>
>>
>