You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Jeff Lubetkin (JIRA)" <ta...@jakarta.apache.org> on 2005/11/10 20:08:03 UTC

[jira] Commented: (TAPESTRY-746) Built in translators should make it easier to override their error message per-instance

    [ http://issues.apache.org/jira/browse/TAPESTRY-746?page=comments#action_12357278 ] 

Jeff Lubetkin commented on TAPESTRY-746:
----------------------------------------

Whoops....just figured out how to set the message property and override the standard message.  Please close this bug...it is invalid.

Although better documentation of the new validation/translation system would be wonderful, and likely would have prevented me from filing this in the first place :)

> Built in translators should make it easier to override their error message per-instance
> ---------------------------------------------------------------------------------------
>
>          Key: TAPESTRY-746
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-746
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>     Versions: 4.0
>  Environment: 4.0-beta-12
>     Reporter: Jeff Lubetkin
>     Priority: Minor

>
> The built in validators that derive from BaseValidator allow for setting the message on failure per-instance using the "validators:" binding.  Translators that derive from FormatTranslator (such as NumberTranslator) have a fixed message key.  The message can be overridden in a properties file, but if you want multiple NumberTranslators in the same component with different messages there doesn't seem to be a way to do it aside from subclassing NumberTranslator, which seems like a big burden for simply wanting to change a message.
> Optimally, FormatTranslators would take a parameter similar to the message allowed in the "validators:" binding, that could take a literal message or a message key.  However, I'd be perfectly happy with simply exposing a setter for the messageKey.
> Not sure if this is a duplicate of TAPESTRY-698.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org