[
http://jira.jboss.com/jira/browse/JBSEAM-1526?page=comments#action_12366486 ]
Andrei Gh commented on JBSEAM-1526:
-----------------------------------
I have a similar (but different :) problem described here:
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056879
The solution proposed in the issue does not solve this problem because submitting the
outer button, automatically validates the inner controls.
Please take into consideration this solution, that it seems more flexible to me:
<s:validate> , or/and <s:validateAll/> has attached a list of validation
groups, like this:
<s:validate validationGroups="group1"/>
<s:validate validationGroups="group1,group2"/>
The submit button has attached a list of validation groups, too:
<s:submitButton validationGroups="group1, group4"> (this might be
a:commandButton, s:commandButton, decorated with a tag?)
The idea is that controls (including buttons) may be part of one or many validation
groups; and submit buttons, even though they are submitting the whole form, will trigger
validation only for controls that are part of the groups they belong to.
Support selective validation with a:region
------------------------------------------
Key: JBSEAM-1526
URL:
http://jira.jboss.com/jira/browse/JBSEAM-1526
Project: JBoss Seam
Issue Type: Feature Request
Components: JSF
Reporter: Christian Bauer
In complex forms I'd like to be able to customize validation per region:
<h:form>
<a:region>
<h:inputText value="#{foo.bar}"/>
<a:region>
<h:inputText value="#{bar.foo}"/>
<a:commandButton action="#{bar.baz}"/>
</a>
<a:commandButton action="#{foo.baz}"/>
</a>
</h:form>
If the nested button is pressed, I only want #{bar.foo} validated (there is an
<s:validateAll> around it). If the outer button is pressed, I want both properties
validated. I realize that this is a major issue regarding model updates, however, I
don't need to update the model for any non-validated property because
a) it is not decoded on the server anyway (? I don't understand the a:region docs)
b) i don't need an updated model because my action doesn't expect it
c) i don't need an updated model because i am re-rendering an area that doesn't
expect it
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira