You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Florent Ramière (JIRA)" <ji...@apache.org> on 2007/07/26 18:04:07 UTC
[jira] Created: (WW-2065) Field-validator params and ognl
Field-validator params and ognl
-------------------------------
Key: WW-2065
URL: https://issues.apache.org/struts/browse/WW-2065
Project: Struts 2
Issue Type: New Feature
Components: Expression Language
Affects Versions: 2.0.9
Reporter: Florent Ramière
Priority: Minor
XWork bug reproduced here, please remove if appropriate
---
Param values cannot contain ognl values, here is my current validator configuration.
The ognl possibility in th message is very usefull, it is a pity we cannot do the same on the param side ...
<field name="language.name">
<field-validator type="requiredstring" short-circuit="true">
<message>${getText("validator.requiredstring", {getText("language.name")})}</message>
</field-validator>
<field-validator type="stringlength">
<param name="maxLength">255</param>
<message>${getText("validator.stringlength", {getText("language.name")})}</message>
</field-validator>
</field>
here is what I wish I could do
<field name="language.name">
<field-validator type="requiredstring" short-circuit="true">
<message>${getText("validator.requiredstring", {getText("language.name")})}</message>
</field-validator>
<field-validator type="stringlength">
<!-- here is the requested change--> <param name="maxLength">${getText("maximum.length.language.locale")}</param>
<message>${getText("validator.stringlength", {getText("language.name")})}</message>
</field-validator>
</field>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-2065) Field-validator params and ognl
Posted by "Florent Ramière (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2065?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Florent Ramière updated WW-2065:
--------------------------------
Description:
XWork bug reproduced here, please remove if appropriate
---
Param values cannot contain ognl values, here is my current validator configuration.
The ognl possibility in th message is very usefull, it is a pity we cannot do the same on the param side ...
<field name="language.name">
<field-validator type="requiredstring" short-circuit="true">
<message>${getText("validator.requiredstring"}</message>
</field-validator>
<field-validator type="stringlength">
<param name="maxLength">255</param>
<message>${getText("validator.stringlength"}</message>
</field-validator>
</field>
here is what I wish I could do
<field name="language.name">
<field-validator type="requiredstring" short-circuit="true">
<message>${getText("validator.requiredstring"}</message>
</field-validator>
<field-validator type="stringlength">
<!-- here is the requested change--> <param name="maxLength">${getText("maximum.length.language.locale")}</param>
<message>${getText("validator.stringlength"}</message>
</field-validator>
</field>
was:
XWork bug reproduced here, please remove if appropriate
---
Param values cannot contain ognl values, here is my current validator configuration.
The ognl possibility in th message is very usefull, it is a pity we cannot do the same on the param side ...
<field name="language.name">
<field-validator type="requiredstring" short-circuit="true">
<message>${getText("validator.requiredstring", {getText("language.name")})}</message>
</field-validator>
<field-validator type="stringlength">
<param name="maxLength">255</param>
<message>${getText("validator.stringlength", {getText("language.name")})}</message>
</field-validator>
</field>
here is what I wish I could do
<field name="language.name">
<field-validator type="requiredstring" short-circuit="true">
<message>${getText("validator.requiredstring", {getText("language.name")})}</message>
</field-validator>
<field-validator type="stringlength">
<!-- here is the requested change--> <param name="maxLength">${getText("maximum.length.language.locale")}</param>
<message>${getText("validator.stringlength", {getText("language.name")})}</message>
</field-validator>
</field>
> Field-validator params and ognl
> -------------------------------
>
> Key: WW-2065
> URL: https://issues.apache.org/struts/browse/WW-2065
> Project: Struts 2
> Issue Type: New Feature
> Components: Expression Language
> Affects Versions: 2.0.9
> Reporter: Florent Ramière
> Priority: Minor
>
> XWork bug reproduced here, please remove if appropriate
> ---
> Param values cannot contain ognl values, here is my current validator configuration.
> The ognl possibility in th message is very usefull, it is a pity we cannot do the same on the param side ...
> <field name="language.name">
> <field-validator type="requiredstring" short-circuit="true">
> <message>${getText("validator.requiredstring"}</message>
> </field-validator>
> <field-validator type="stringlength">
> <param name="maxLength">255</param>
> <message>${getText("validator.stringlength"}</message>
> </field-validator>
> </field>
> here is what I wish I could do
> <field name="language.name">
> <field-validator type="requiredstring" short-circuit="true">
> <message>${getText("validator.requiredstring"}</message>
> </field-validator>
> <field-validator type="stringlength">
> <!-- here is the requested change--> <param name="maxLength">${getText("maximum.length.language.locale")}</param>
> <message>${getText("validator.stringlength"}</message>
> </field-validator>
> </field>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-2065) add support for OGNL to all
field-validator params
Posted by "James Holmes (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2065?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Holmes updated WW-2065:
-----------------------------
Summary: add support for OGNL to all field-validator params (was: Field-validator params and ognl)
> add support for OGNL to all field-validator params
> --------------------------------------------------
>
> Key: WW-2065
> URL: https://issues.apache.org/struts/browse/WW-2065
> Project: Struts 2
> Issue Type: New Feature
> Components: Expression Language
> Affects Versions: 2.0.9
> Reporter: Florent Ramière
> Priority: Minor
> Fix For: Future
>
>
> XWork bug reproduced here, please remove if appropriate
> ---
> Param values cannot contain ognl values, here is my current validator configuration.
> The ognl possibility in th message is very usefull, it is a pity we cannot do the same on the param side ...
> <field name="language.name">
> <field-validator type="requiredstring" short-circuit="true">
> <message>${getText("validator.requiredstring"}</message>
> </field-validator>
> <field-validator type="stringlength">
> <param name="maxLength">255</param>
> <message>${getText("validator.stringlength"}</message>
> </field-validator>
> </field>
> here is what I wish I could do
> <field name="language.name">
> <field-validator type="requiredstring" short-circuit="true">
> <message>${getText("validator.requiredstring"}</message>
> </field-validator>
> <field-validator type="stringlength">
> <!-- here is the requested change--> <param name="maxLength">${getText("maximum.length.language.locale")}</param>
> <message>${getText("validator.stringlength"}</message>
> </field-validator>
> </field>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-2065) Field-validator params and ognl
Posted by "olivier dupuy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43468#action_43468 ]
olivier dupuy commented on WW-2065:
-----------------------------------
Hello,
I totally agree on the request.
It totally make sense to be able to use constants defined in the application or any other Java code instead.
This make the application much more flexible, easier to maintain (change the constant in one place and done) and much easier to test too as you can use the constants in your test.
The support for OGNL should be present in all the parameters of validation annotations and in XML validators
Vote for it.
> Field-validator params and ognl
> -------------------------------
>
> Key: WW-2065
> URL: https://issues.apache.org/struts/browse/WW-2065
> Project: Struts 2
> Issue Type: New Feature
> Components: Expression Language
> Affects Versions: 2.0.9
> Reporter: Florent Ramière
> Priority: Minor
> Fix For: Future
>
>
> XWork bug reproduced here, please remove if appropriate
> ---
> Param values cannot contain ognl values, here is my current validator configuration.
> The ognl possibility in th message is very usefull, it is a pity we cannot do the same on the param side ...
> <field name="language.name">
> <field-validator type="requiredstring" short-circuit="true">
> <message>${getText("validator.requiredstring"}</message>
> </field-validator>
> <field-validator type="stringlength">
> <param name="maxLength">255</param>
> <message>${getText("validator.stringlength"}</message>
> </field-validator>
> </field>
> here is what I wish I could do
> <field name="language.name">
> <field-validator type="requiredstring" short-circuit="true">
> <message>${getText("validator.requiredstring"}</message>
> </field-validator>
> <field-validator type="stringlength">
> <!-- here is the requested change--> <param name="maxLength">${getText("maximum.length.language.locale")}</param>
> <message>${getText("validator.stringlength"}</message>
> </field-validator>
> </field>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (WW-2065) Field-validator params and
ognl
Posted by "olivier dupuy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43468#action_43468 ]
odupuy edited comment on WW-2065 at 3/6/08 1:09 PM:
-----------------------------------------------------------
Hello,
I totally agree on the request.
It totally make sense to be able to use constants defined in the application or any other Java code instead.
This make the application much more flexible, easier to maintain (change the constant in one place and done) and much easier to test too as you can use the constants in your test.
The support for OGNL should be present in all the parameters of validation annotations and in XML validators.
In my case my need goes to the support of OGNL in the message key first to be able to use constants for error messages if it's not there already but the need exists everywhere else.
Vote for it.
was (Author: odupuy):
Hello,
I totally agree on the request.
It totally make sense to be able to use constants defined in the application or any other Java code instead.
This make the application much more flexible, easier to maintain (change the constant in one place and done) and much easier to test too as you can use the constants in your test.
The support for OGNL should be present in all the parameters of validation annotations and in XML validators.
In my case my need goes to the support of OGNL in the message key first if it's not there already but the need exists everywhere.
Vote for it.
> Field-validator params and ognl
> -------------------------------
>
> Key: WW-2065
> URL: https://issues.apache.org/struts/browse/WW-2065
> Project: Struts 2
> Issue Type: New Feature
> Components: Expression Language
> Affects Versions: 2.0.9
> Reporter: Florent Ramière
> Priority: Minor
> Fix For: Future
>
>
> XWork bug reproduced here, please remove if appropriate
> ---
> Param values cannot contain ognl values, here is my current validator configuration.
> The ognl possibility in th message is very usefull, it is a pity we cannot do the same on the param side ...
> <field name="language.name">
> <field-validator type="requiredstring" short-circuit="true">
> <message>${getText("validator.requiredstring"}</message>
> </field-validator>
> <field-validator type="stringlength">
> <param name="maxLength">255</param>
> <message>${getText("validator.stringlength"}</message>
> </field-validator>
> </field>
> here is what I wish I could do
> <field name="language.name">
> <field-validator type="requiredstring" short-circuit="true">
> <message>${getText("validator.requiredstring"}</message>
> </field-validator>
> <field-validator type="stringlength">
> <!-- here is the requested change--> <param name="maxLength">${getText("maximum.length.language.locale")}</param>
> <message>${getText("validator.stringlength"}</message>
> </field-validator>
> </field>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-2065) Field-validator params and ognl
Posted by "James Holmes (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2065?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Holmes updated WW-2065:
-----------------------------
Fix Version/s: Future
> Field-validator params and ognl
> -------------------------------
>
> Key: WW-2065
> URL: https://issues.apache.org/struts/browse/WW-2065
> Project: Struts 2
> Issue Type: New Feature
> Components: Expression Language
> Affects Versions: 2.0.9
> Reporter: Florent Ramière
> Priority: Minor
> Fix For: Future
>
>
> XWork bug reproduced here, please remove if appropriate
> ---
> Param values cannot contain ognl values, here is my current validator configuration.
> The ognl possibility in th message is very usefull, it is a pity we cannot do the same on the param side ...
> <field name="language.name">
> <field-validator type="requiredstring" short-circuit="true">
> <message>${getText("validator.requiredstring"}</message>
> </field-validator>
> <field-validator type="stringlength">
> <param name="maxLength">255</param>
> <message>${getText("validator.stringlength"}</message>
> </field-validator>
> </field>
> here is what I wish I could do
> <field name="language.name">
> <field-validator type="requiredstring" short-circuit="true">
> <message>${getText("validator.requiredstring"}</message>
> </field-validator>
> <field-validator type="stringlength">
> <!-- here is the requested change--> <param name="maxLength">${getText("maximum.length.language.locale")}</param>
> <message>${getText("validator.stringlength"}</message>
> </field-validator>
> </field>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (WW-2065) Field-validator params and
ognl
Posted by "olivier dupuy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43468#action_43468 ]
odupuy edited comment on WW-2065 at 3/6/08 1:09 PM:
-----------------------------------------------------------
Hello,
I totally agree on the request.
It totally make sense to be able to use constants defined in the application or any other Java code instead.
This make the application much more flexible, easier to maintain (change the constant in one place and done) and much easier to test too as you can use the constants in your test.
The support for OGNL should be present in all the parameters of validation annotations and in XML validators.
In my case my need goes to the support of OGNL in the message key first if it's not there already but the need exists everywhere.
Vote for it.
was (Author: odupuy):
Hello,
I totally agree on the request.
It totally make sense to be able to use constants defined in the application or any other Java code instead.
This make the application much more flexible, easier to maintain (change the constant in one place and done) and much easier to test too as you can use the constants in your test.
The support for OGNL should be present in all the parameters of validation annotations and in XML validators
Vote for it.
> Field-validator params and ognl
> -------------------------------
>
> Key: WW-2065
> URL: https://issues.apache.org/struts/browse/WW-2065
> Project: Struts 2
> Issue Type: New Feature
> Components: Expression Language
> Affects Versions: 2.0.9
> Reporter: Florent Ramière
> Priority: Minor
> Fix For: Future
>
>
> XWork bug reproduced here, please remove if appropriate
> ---
> Param values cannot contain ognl values, here is my current validator configuration.
> The ognl possibility in th message is very usefull, it is a pity we cannot do the same on the param side ...
> <field name="language.name">
> <field-validator type="requiredstring" short-circuit="true">
> <message>${getText("validator.requiredstring"}</message>
> </field-validator>
> <field-validator type="stringlength">
> <param name="maxLength">255</param>
> <message>${getText("validator.stringlength"}</message>
> </field-validator>
> </field>
> here is what I wish I could do
> <field name="language.name">
> <field-validator type="requiredstring" short-circuit="true">
> <message>${getText("validator.requiredstring"}</message>
> </field-validator>
> <field-validator type="stringlength">
> <!-- here is the requested change--> <param name="maxLength">${getText("maximum.length.language.locale")}</param>
> <message>${getText("validator.stringlength"}</message>
> </field-validator>
> </field>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.