Nice,

i can set the message for the "required" - field with your solution.
But i want to set the message for wrong Data-Input.
My code again:

<bean name="dateTranslator" class="my.package.LenientDateTranslator,pattern=dd.MM.yyyy"/>
<component id="inputBirthday" type="TextField">
<binding name="displayName" value="ognl:page.messagesUtil.birthdayMsg"/>
       <binding name="validators" value="validators:required"/>
       <binding name="translator" value="ognl:beans.dateTranslator"/>
<binding name="value" value="ognl:pageBean.customer.ado.birthday"/>
</component>

I cant set the field like this:
<bean name="dateTranslator" class="my.package.LenientDateTranslator,pattern=dd.MM.yyyy[The date is wrong]"/>

cause so the [The date is wrong] is intepreted as part of the pattern.
How can i set right?

Best regards

Rudolf B.



Martin Strand wrote:

<binding name="validators" value="validators:required[This is my message]"/>

or if you want l10n, add a %

<binding name="validators" value="validators:required[%this.is.my.message.key]"/>

Read more here:
http://jakarta.apache.org/tapestry/UsersGuide/validation.html#validation.fields


On Fri, 27 Jan 2006 12:23:38 +0100, Rudolf Baloun <[EMAIL PROTECTED]> wrote:

Hi,
i got this code in my *.page:

<bean name="dateTranslator" class="my.package.LenientDateTranslator,pattern=dd.MM.yyyy"/>
<component id="inputBirthday" type="TextField">
<binding name="displayName" value="ognl:page.messagesUtil.birthdayMsg"/>
        <binding name="validators" value="validators:required"/>
        <binding name="translator" value="ognl:beans.dateTranslator"/>
<binding name="value" value="ognl:pageBean.customer.ado.birthday"/>
</component>

I want to add use another validationmessage as the default message.
how can i set the validationmessage?

<binding name="validators" value="validators:required, message=This is my message"/> doesnt work!?

Anyone knows how to set the message?

best regards

Rudolf B.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to