You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Kevin J. Menard, Jr. (JIRA)" <ta...@jakarta.apache.org> on 2005/08/18 01:38:54 UTC
[jira] Created: (TAPESTRY-572) NumberValidator should accept Strings
NumberValidator should accept Strings
-------------------------------------
Key: TAPESTRY-572
URL: http://issues.apache.org/jira/browse/TAPESTRY-572
Project: Tapestry
Type: Bug
Components: Framework
Versions: 4.0
Reporter: Kevin J. Menard, Jr.
Priority: Minor
Applying NumberValidator to a TextField will allow a number to be validated as a number and stored as a String. However, NumberValidator is not able to take a String and display it as a number. I think this should be a bidirectional process. As an example of where this would be useful is the following:
I'd like to store a number as a String so I don't loose an prepending 0's, which RDBMSs love to throw out, when persisting the data. However, I do want to ensure that only a number is valid input.
--
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
[jira] Commented: (TAPESTRY-572) NumberValidator should accept
Strings
Posted by "Paul Ferraro (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12508023 ]
Paul Ferraro commented on TAPESTRY-572:
---------------------------------------
I think what you're looking for is the Pattern validator which validates a string against a regular expression.
http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/form/validator/Pattern.html
Something like this perhaps?
<binding name="validators" value="validators:pattern=\d+"/>
> NumberValidator should accept Strings
> -------------------------------------
>
> Key: TAPESTRY-572
> URL: https://issues.apache.org/jira/browse/TAPESTRY-572
> Project: Tapestry
> Issue Type: Bug
> Components: Framework
> Affects Versions: 4.0
> Reporter: Kevin J. Menard, Jr.
> Priority: Minor
> Fix For: 4.1.2
>
>
> Applying NumberValidator to a TextField will allow a number to be validated as a number and stored as a String. However, NumberValidator is not able to take a String and display it as a number. I think this should be a bidirectional process. An example of where this would be useful is the following:
> I'd like to store a number as a String so I don't lose any prepending 0's (which RDBMSs love to throw out) when persisting the data. However, I do want to ensure that only a number is valid input.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Updated: (TAPESTRY-572) NumberValidator should accept
Strings
Posted by "Kevin J. Menard, Jr. (JIRA)" <ta...@jakarta.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin J. Menard, Jr. updated TAPESTRY-572:
------------------------------------------
Description:
Applying NumberValidator to a TextField will allow a number to be validated as a number and stored as a String. However, NumberValidator is not able to take a String and display it as a number. I think this should be a bidirectional process. An example of where this would be useful is the following:
I'd like to store a number as a String so I don't lose any prepending 0's (which RDBMSs love to throw out) when persisting the data. However, I do want to ensure that only a number is valid input.
was:
Applying NumberValidator to a TextField will allow a number to be validated as a number and stored as a String. However, NumberValidator is not able to take a String and display it as a number. I think this should be a bidirectional process. As an example of where this would be useful is the following:
I'd like to store a number as a String so I don't loose an prepending 0's, which RDBMSs love to throw out, when persisting the data. However, I do want to ensure that only a number is valid input.
> NumberValidator should accept Strings
> -------------------------------------
>
> Key: TAPESTRY-572
> URL: https://issues.apache.org/jira/browse/TAPESTRY-572
> Project: Tapestry
> Issue Type: Bug
> Components: Framework
> Affects Versions: 4.0
> Reporter: Kevin J. Menard, Jr.
> Priority: Minor
> Fix For: 4.1.2
>
>
> Applying NumberValidator to a TextField will allow a number to be validated as a number and stored as a String. However, NumberValidator is not able to take a String and display it as a number. I think this should be a bidirectional process. An example of where this would be useful is the following:
> I'd like to store a number as a String so I don't lose any prepending 0's (which RDBMSs love to throw out) when persisting the data. However, I do want to ensure that only a number is valid input.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Commented: (TAPESTRY-572) NumberValidator should accept
Strings
Posted by "Kevin J. Menard, Jr. (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12508158 ]
Kevin J. Menard, Jr. commented on TAPESTRY-572:
-----------------------------------------------
Like I said, I'll go with Paul's approach. It seems to make sense that the validators should handle non-native datatype validation. But, if your assessment of the translator system is correct, then it's really only applicable for read-only values, unless of the proper type, since the translation is only done in one direction. So, if it were intended to be a data marshalling service, its utility is limited.
> NumberValidator should accept Strings
> -------------------------------------
>
> Key: TAPESTRY-572
> URL: https://issues.apache.org/jira/browse/TAPESTRY-572
> Project: Tapestry
> Issue Type: Bug
> Components: Framework
> Affects Versions: 4.0
> Reporter: Kevin J. Menard, Jr.
> Priority: Minor
> Fix For: 4.1.2
>
>
> Applying NumberValidator to a TextField will allow a number to be validated as a number and stored as a String. However, NumberValidator is not able to take a String and display it as a number. I think this should be a bidirectional process. An example of where this would be useful is the following:
> I'd like to store a number as a String so I don't lose any prepending 0's (which RDBMSs love to throw out) when persisting the data. However, I do want to ensure that only a number is valid input.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Commented: (TAPESTRY-572) NumberValidator should accept
Strings
Posted by "Kevin J. Menard, Jr. (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12508022 ]
Kevin J. Menard, Jr. commented on TAPESTRY-572:
-----------------------------------------------
I think I actually meant NumberTranslator. I had to dig into my code to verify, but I don't use the T3 validation system at all. Indeed, it looks like the problem is still around with a number translator (<binding name="translator" value="translator:number"/>).
Should I open a new issue or edit this one?
> NumberValidator should accept Strings
> -------------------------------------
>
> Key: TAPESTRY-572
> URL: https://issues.apache.org/jira/browse/TAPESTRY-572
> Project: Tapestry
> Issue Type: Bug
> Components: Framework
> Affects Versions: 4.0
> Reporter: Kevin J. Menard, Jr.
> Priority: Minor
> Fix For: 4.1.2
>
>
> Applying NumberValidator to a TextField will allow a number to be validated as a number and stored as a String. However, NumberValidator is not able to take a String and display it as a number. I think this should be a bidirectional process. An example of where this would be useful is the following:
> I'd like to store a number as a String so I don't lose any prepending 0's (which RDBMSs love to throw out) when persisting the data. However, I do want to ensure that only a number is valid input.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Updated: (TAPESTRY-572) NumberValidator should accept
Strings
Posted by "Jesse Kuhnert (JIRA)" <ta...@jakarta.apache.org>.
[ http://issues.apache.org/jira/browse/TAPESTRY-572?page=all ]
Jesse Kuhnert updated TAPESTRY-572:
-----------------------------------
Fix Version/s: 4.1.2
> NumberValidator should accept Strings
> -------------------------------------
>
> Key: TAPESTRY-572
> URL: http://issues.apache.org/jira/browse/TAPESTRY-572
> Project: Tapestry
> Issue Type: Bug
> Components: Framework
> Affects Versions: 4.0
> Reporter: Kevin J. Menard, Jr.
> Priority: Minor
> Fix For: 4.1.2
>
>
> Applying NumberValidator to a TextField will allow a number to be validated as a number and stored as a String. However, NumberValidator is not able to take a String and display it as a number. I think this should be a bidirectional process. As an example of where this would be useful is the following:
> I'd like to store a number as a String so I don't loose an prepending 0's, which RDBMSs love to throw out, when persisting the data. However, I do want to ensure that only a number is valid input.
--
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: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Commented: (TAPESTRY-572) NumberValidator should accept
Strings
Posted by "Jesse Kuhnert (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12508029 ]
Jesse Kuhnert commented on TAPESTRY-572:
----------------------------------------
I think the translator services are meant to translate incoming values (which are already strings) in to native/object types whereas validators would be just for validation of input... In your case it seems input validation really is all you need as translation from string -> number -> string wouldn't make any sense. ...
Paul would know best in either case since he wrote the majority of this infrastructure.
> NumberValidator should accept Strings
> -------------------------------------
>
> Key: TAPESTRY-572
> URL: https://issues.apache.org/jira/browse/TAPESTRY-572
> Project: Tapestry
> Issue Type: Bug
> Components: Framework
> Affects Versions: 4.0
> Reporter: Kevin J. Menard, Jr.
> Priority: Minor
> Fix For: 4.1.2
>
>
> Applying NumberValidator to a TextField will allow a number to be validated as a number and stored as a String. However, NumberValidator is not able to take a String and display it as a number. I think this should be a bidirectional process. An example of where this would be useful is the following:
> I'd like to store a number as a String so I don't lose any prepending 0's (which RDBMSs love to throw out) when persisting the data. However, I do want to ensure that only a number is valid input.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Commented: (TAPESTRY-572) NumberValidator should accept
Strings
Posted by "Kevin J. Menard, Jr. (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12508028 ]
Kevin J. Menard, Jr. commented on TAPESTRY-572:
-----------------------------------------------
That looks like it'd do the trick. I guess I had just hoped that the number translator would handle this fairly common case. But, I may have just missed the point, too. In any event, it probably should break in both directions, rather than work in just one <shrug>.
> NumberValidator should accept Strings
> -------------------------------------
>
> Key: TAPESTRY-572
> URL: https://issues.apache.org/jira/browse/TAPESTRY-572
> Project: Tapestry
> Issue Type: Bug
> Components: Framework
> Affects Versions: 4.0
> Reporter: Kevin J. Menard, Jr.
> Priority: Minor
> Fix For: 4.1.2
>
>
> Applying NumberValidator to a TextField will allow a number to be validated as a number and stored as a String. However, NumberValidator is not able to take a String and display it as a number. I think this should be a bidirectional process. An example of where this would be useful is the following:
> I'd like to store a number as a String so I don't lose any prepending 0's (which RDBMSs love to throw out) when persisting the data. However, I do want to ensure that only a number is valid input.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Closed: (TAPESTRY-572) NumberValidator should accept Strings
Posted by "Jesse Kuhnert (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jesse Kuhnert closed TAPESTRY-572.
----------------------------------
Resolution: Won't Fix
I think that NumberValidator has been deprecated in favor of the new validators/translator setup. (where there is no NumberValidator class .....number translators and validators do exist though)
> NumberValidator should accept Strings
> -------------------------------------
>
> Key: TAPESTRY-572
> URL: https://issues.apache.org/jira/browse/TAPESTRY-572
> Project: Tapestry
> Issue Type: Bug
> Components: Framework
> Affects Versions: 4.0
> Reporter: Kevin J. Menard, Jr.
> Priority: Minor
> Fix For: 4.1.2
>
>
> Applying NumberValidator to a TextField will allow a number to be validated as a number and stored as a String. However, NumberValidator is not able to take a String and display it as a number. I think this should be a bidirectional process. An example of where this would be useful is the following:
> I'd like to store a number as a String so I don't lose any prepending 0's (which RDBMSs love to throw out) when persisting the data. However, I do want to ensure that only a number is valid input.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org