You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Sami Dalouche (JIRA)" <ji...@apache.org> on 2008/02/09 17:19:39 UTC
[jira] Created: (WW-2475) Provide a way to share validation.xml
rules with ModelDriven
Provide a way to share validation.xml rules with ModelDriven
------------------------------------------------------------
Key: WW-2475
URL: https://issues.apache.org/struts/browse/WW-2475
Project: Struts 2
Issue Type: New Feature
Reporter: Sami Dalouche
In Short:
"ActionA" and "ActionB" both implement ModelDriven to expose an instance of "ModelClass" on the value stack.
Some properties might be set on ModelClass. "ActionA" and "ActionB" have the same validation rules for properties of ModelClass.
=> It would be useful to share a set of validation rules in ModelClass-validation.xml.
Does XWork allow validating other objects than actions ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-2475) Provide a way to share validation.xml
rules with ModelDriven
Posted by "Sami Dalouche (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43174#action_43174 ]
Sami Dalouche commented on WW-2475:
-----------------------------------
Dave, I think you're right, this seems to do what I need.
Then, I guess we can transform this feature request into a documentation request... Maybe just a link to the visitor validator (http://struts.apache.org/2.x/docs/visitor-validator.html ) in the "Model Driven" section of the guides (http://struts.apache.org/2.x/docs/guides.html).
> Provide a way to share validation.xml rules with ModelDriven
> ------------------------------------------------------------
>
> Key: WW-2475
> URL: https://issues.apache.org/struts/browse/WW-2475
> Project: Struts 2
> Issue Type: New Feature
> Reporter: Sami Dalouche
>
> In Short:
> "ActionA" and "ActionB" both implement ModelDriven to expose an instance of "ModelClass" on the value stack.
> Some properties might be set on ModelClass. "ActionA" and "ActionB" have the same validation rules for properties of ModelClass.
> => It would be useful to share a set of validation rules in ModelClass-validation.xml.
> Does XWork allow validating other objects than actions ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-2475) Provide a way to share validation.xml
rules with ModelDriven
Posted by "Sami Dalouche (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43175#action_43175 ]
Sami Dalouche commented on WW-2475:
-----------------------------------
BTW, something that would make sense would be provide a mechanism to automatically add Model Driven's validation.xml file, to avoid boilerplate code.....
if ModeDriven-validation.xml exists, then it makes sense to use it by default, and then provide a way to avoid using it....
> Provide a way to share validation.xml rules with ModelDriven
> ------------------------------------------------------------
>
> Key: WW-2475
> URL: https://issues.apache.org/struts/browse/WW-2475
> Project: Struts 2
> Issue Type: New Feature
> Reporter: Sami Dalouche
>
> In Short:
> "ActionA" and "ActionB" both implement ModelDriven to expose an instance of "ModelClass" on the value stack.
> Some properties might be set on ModelClass. "ActionA" and "ActionB" have the same validation rules for properties of ModelClass.
> => It would be useful to share a set of validation rules in ModelClass-validation.xml.
> Does XWork allow validating other objects than actions ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-2475) Provide a way to share validation.xml
rules with ModelDriven
Posted by "Don Brown (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Don Brown updated WW-2475:
--------------------------
Fix Version/s: 2.2.x
> Provide a way to share validation.xml rules with ModelDriven
> ------------------------------------------------------------
>
> Key: WW-2475
> URL: https://issues.apache.org/struts/browse/WW-2475
> Project: Struts 2
> Issue Type: New Feature
> Reporter: Sami Dalouche
> Fix For: 2.2.x
>
>
> In Short:
> "ActionA" and "ActionB" both implement ModelDriven to expose an instance of "ModelClass" on the value stack.
> Some properties might be set on ModelClass. "ActionA" and "ActionB" have the same validation rules for properties of ModelClass.
> => It would be useful to share a set of validation rules in ModelClass-validation.xml.
> Does XWork allow validating other objects than actions ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-2475) Provide a way to share validation.xml
rules with ModelDriven
Posted by "Dave Newton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43173#action_43173 ]
Dave Newton commented on WW-2475:
---------------------------------
Doesn't this already exist?
I thought you could do model-based validation and, in addition, refer to model-based validation via the visitor field validation.
> Provide a way to share validation.xml rules with ModelDriven
> ------------------------------------------------------------
>
> Key: WW-2475
> URL: https://issues.apache.org/struts/browse/WW-2475
> Project: Struts 2
> Issue Type: New Feature
> Reporter: Sami Dalouche
>
> In Short:
> "ActionA" and "ActionB" both implement ModelDriven to expose an instance of "ModelClass" on the value stack.
> Some properties might be set on ModelClass. "ActionA" and "ActionB" have the same validation rules for properties of ModelClass.
> => It would be useful to share a set of validation rules in ModelClass-validation.xml.
> Does XWork allow validating other objects than actions ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.