[jbossseam-issues] [JBoss JIRA] Closed: (JBSEAM-432) Support @IfInvalid functionality without @IfInvalid
by Gavin King (JIRA)
[ http://jira.jboss.com/jira/browse/JBSEAM-432?page=all ]
Gavin King closed JBSEAM-432.
-----------------------------
Fix Version/s: (was: 1.1.1.GA)
Resolution: Rejected
Won't solve the problem in this way. There are now several options:
(1) Call UIViewRoot.processUpdates() from a validation failed action in pages.xml
(2) Skip JSF validation and do your own validation in the action method (there are convenience methods for that)
> Support @IfInvalid functionality without @IfInvalid
> ---------------------------------------------------
>
> Key: JBSEAM-432
> URL: http://jira.jboss.com/jira/browse/JBSEAM-432
> Project: JBoss Seam
> Issue Type: Feature Request
> Components: Core
> Affects Versions: 1.1.0.BETA1
> Reporter: Christian Bauer
> Assigned To: Gavin King
> Attachments: wizard.pdf
>
>
> The "Previous Page" button has to Update Model Values, but not Process Validations:
> <h:form>
> <f:facet name="beforeInvalidField">
> <h:graphicImage value="/img/attention.gif"
> width="18" height="18"
> styleClass="attentionImage"/>
> </f:facet>
> <f:facet name="afterInvalidField">
> <s:message/>
> </f:facet>
> <f:facet name="aroundInvalidField">
> <s:span styleClass="errors"/>
> </f:facet>
> <div class="errors" align="center">
> <h:messages globalOnly="true"/>
> </div>
> <s:validateAll>
> <div class="entry">
> <div class="label">#{messages['Firstname']}:</div>
> <div class="input">
> <s:decorate>
> <h:inputText size="32" required="true"
> value="#{register.user.firstname}"/>
> </s:decorate>
> </div>
> </div>
> <div class="entry">
> <div class="label">#{messages['Lastname']}:</div>
> <div class="input">
> <s:decorate>
> <h:inputText size="32" required="true"
> value="#{register.user.lastname}"/>
> </s:decorate>
> </div>
> </div>
> <div class="entry">
> <div class="label">#{messages['Email']}:</div>
> <div class="input">
> <s:decorate>
> <h:inputText size="32" required="true"
> value="#{register.user.email}"/>
> </s:decorate>
> </div>
> </div>
> <div class="entry">
> <div class="label"> </div>
> <div class="input">
> <h:commandButton value="#{messages['PrevPage']}" styleClass="button"
> action="register"/>
> <h:commandButton value="#{messages['NextPage']}" styleClass="button"
> action="#{register.enterProfile}"/>
> </div>
> </div>
> </s:validateAll>
> </h:form>
--
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
18 years, 2 months
[jbossseam-issues] [JBoss JIRA] Reopened: (JBSEAM-432) Support @IfInvalid functionality without @IfInvalid
by Gavin King (JIRA)
[ http://jira.jboss.com/jira/browse/JBSEAM-432?page=all ]
Gavin King reopened JBSEAM-432:
-------------------------------
Rolled back those changes.
> Support @IfInvalid functionality without @IfInvalid
> ---------------------------------------------------
>
> Key: JBSEAM-432
> URL: http://jira.jboss.com/jira/browse/JBSEAM-432
> Project: JBoss Seam
> Issue Type: Feature Request
> Components: Core
> Affects Versions: 1.1.0.BETA1
> Reporter: Christian Bauer
> Assigned To: Gavin King
> Fix For: 1.1.1.GA
>
> Attachments: wizard.pdf
>
>
> The "Previous Page" button has to Update Model Values, but not Process Validations:
> <h:form>
> <f:facet name="beforeInvalidField">
> <h:graphicImage value="/img/attention.gif"
> width="18" height="18"
> styleClass="attentionImage"/>
> </f:facet>
> <f:facet name="afterInvalidField">
> <s:message/>
> </f:facet>
> <f:facet name="aroundInvalidField">
> <s:span styleClass="errors"/>
> </f:facet>
> <div class="errors" align="center">
> <h:messages globalOnly="true"/>
> </div>
> <s:validateAll>
> <div class="entry">
> <div class="label">#{messages['Firstname']}:</div>
> <div class="input">
> <s:decorate>
> <h:inputText size="32" required="true"
> value="#{register.user.firstname}"/>
> </s:decorate>
> </div>
> </div>
> <div class="entry">
> <div class="label">#{messages['Lastname']}:</div>
> <div class="input">
> <s:decorate>
> <h:inputText size="32" required="true"
> value="#{register.user.lastname}"/>
> </s:decorate>
> </div>
> </div>
> <div class="entry">
> <div class="label">#{messages['Email']}:</div>
> <div class="input">
> <s:decorate>
> <h:inputText size="32" required="true"
> value="#{register.user.email}"/>
> </s:decorate>
> </div>
> </div>
> <div class="entry">
> <div class="label"> </div>
> <div class="input">
> <h:commandButton value="#{messages['PrevPage']}" styleClass="button"
> action="register"/>
> <h:commandButton value="#{messages['NextPage']}" styleClass="button"
> action="#{register.enterProfile}"/>
> </div>
> </div>
> </s:validateAll>
> </h:form>
--
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
18 years, 2 months
[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-432) Support @IfInvalid functionality without @IfInvalid
by Peter Muir (JIRA)
[ http://jira.jboss.com/jira/browse/JBSEAM-432?page=comments#action_12348939 ]
Peter Muir commented on JBSEAM-432:
-----------------------------------
FWIW I had a similar situation [1] and came to the same conclusion.
[1] Wizard where the user could partially complete the form and come back (much) later to finish it off. I did ensure the input was valid for each field back/next but couldn't set required=true. So to finally finish the form I checked inside the action method whether all the fields required were in fact filled in.
> Support @IfInvalid functionality without @IfInvalid
> ---------------------------------------------------
>
> Key: JBSEAM-432
> URL: http://jira.jboss.com/jira/browse/JBSEAM-432
> Project: JBoss Seam
> Issue Type: Feature Request
> Components: Core
> Affects Versions: 1.1.0.BETA1
> Reporter: Christian Bauer
> Assigned To: Gavin King
> Fix For: 1.1.1.GA
>
> Attachments: wizard.pdf
>
>
> The "Previous Page" button has to Update Model Values, but not Process Validations:
> <h:form>
> <f:facet name="beforeInvalidField">
> <h:graphicImage value="/img/attention.gif"
> width="18" height="18"
> styleClass="attentionImage"/>
> </f:facet>
> <f:facet name="afterInvalidField">
> <s:message/>
> </f:facet>
> <f:facet name="aroundInvalidField">
> <s:span styleClass="errors"/>
> </f:facet>
> <div class="errors" align="center">
> <h:messages globalOnly="true"/>
> </div>
> <s:validateAll>
> <div class="entry">
> <div class="label">#{messages['Firstname']}:</div>
> <div class="input">
> <s:decorate>
> <h:inputText size="32" required="true"
> value="#{register.user.firstname}"/>
> </s:decorate>
> </div>
> </div>
> <div class="entry">
> <div class="label">#{messages['Lastname']}:</div>
> <div class="input">
> <s:decorate>
> <h:inputText size="32" required="true"
> value="#{register.user.lastname}"/>
> </s:decorate>
> </div>
> </div>
> <div class="entry">
> <div class="label">#{messages['Email']}:</div>
> <div class="input">
> <s:decorate>
> <h:inputText size="32" required="true"
> value="#{register.user.email}"/>
> </s:decorate>
> </div>
> </div>
> <div class="entry">
> <div class="label"> </div>
> <div class="input">
> <h:commandButton value="#{messages['PrevPage']}" styleClass="button"
> action="register"/>
> <h:commandButton value="#{messages['NextPage']}" styleClass="button"
> action="#{register.enterProfile}"/>
> </div>
> </div>
> </s:validateAll>
> </h:form>
--
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
18 years, 2 months
[jbossseam-issues] [JBoss JIRA] Closed: (JBSEAM-432) Support @IfInvalid functionality without @IfInvalid
by Gavin King (JIRA)
[ http://jira.jboss.com/jira/browse/JBSEAM-432?page=all ]
Gavin King closed JBSEAM-432.
-----------------------------
Resolution: Done
Assignee: Gavin King (was: Norman Richards)
Done as <s:forceModelUpdate/>, perhaps we also need immediate=true as an option?
Note that this is facelets only, no JSP.
> Support @IfInvalid functionality without @IfInvalid
> ---------------------------------------------------
>
> Key: JBSEAM-432
> URL: http://jira.jboss.com/jira/browse/JBSEAM-432
> Project: JBoss Seam
> Issue Type: Feature Request
> Components: Core
> Affects Versions: 1.1.0.BETA1
> Reporter: Christian Bauer
> Assigned To: Gavin King
> Fix For: 1.1.1.GA
>
> Attachments: wizard.pdf
>
>
> The "Previous Page" button has to Update Model Values, but not Process Validations:
> <h:form>
> <f:facet name="beforeInvalidField">
> <h:graphicImage value="/img/attention.gif"
> width="18" height="18"
> styleClass="attentionImage"/>
> </f:facet>
> <f:facet name="afterInvalidField">
> <s:message/>
> </f:facet>
> <f:facet name="aroundInvalidField">
> <s:span styleClass="errors"/>
> </f:facet>
> <div class="errors" align="center">
> <h:messages globalOnly="true"/>
> </div>
> <s:validateAll>
> <div class="entry">
> <div class="label">#{messages['Firstname']}:</div>
> <div class="input">
> <s:decorate>
> <h:inputText size="32" required="true"
> value="#{register.user.firstname}"/>
> </s:decorate>
> </div>
> </div>
> <div class="entry">
> <div class="label">#{messages['Lastname']}:</div>
> <div class="input">
> <s:decorate>
> <h:inputText size="32" required="true"
> value="#{register.user.lastname}"/>
> </s:decorate>
> </div>
> </div>
> <div class="entry">
> <div class="label">#{messages['Email']}:</div>
> <div class="input">
> <s:decorate>
> <h:inputText size="32" required="true"
> value="#{register.user.email}"/>
> </s:decorate>
> </div>
> </div>
> <div class="entry">
> <div class="label"> </div>
> <div class="input">
> <h:commandButton value="#{messages['PrevPage']}" styleClass="button"
> action="register"/>
> <h:commandButton value="#{messages['NextPage']}" styleClass="button"
> action="#{register.enterProfile}"/>
> </div>
> </div>
> </s:validateAll>
> </h:form>
--
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
18 years, 2 months
[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-432) Support @IfInvalid functionality without @IfInvalid
by Gavin King (JIRA)
[ http://jira.jboss.com/jira/browse/JBSEAM-432?page=comments#action_12348919 ]
Gavin King commented on JBSEAM-432:
-----------------------------------
This would be as simple as exposing org.jboss.seam.core.Validation as a user-visible component and cleaning up its API a little. FacesMessages already provides nice convenience method to add an InvalidValue to the form.
> Support @IfInvalid functionality without @IfInvalid
> ---------------------------------------------------
>
> Key: JBSEAM-432
> URL: http://jira.jboss.com/jira/browse/JBSEAM-432
> Project: JBoss Seam
> Issue Type: Feature Request
> Components: Core
> Affects Versions: 1.1.0.BETA1
> Reporter: Christian Bauer
> Assigned To: Norman Richards
> Fix For: 1.1.1.GA
>
> Attachments: wizard.pdf
>
>
> The "Previous Page" button has to Update Model Values, but not Process Validations:
> <h:form>
> <f:facet name="beforeInvalidField">
> <h:graphicImage value="/img/attention.gif"
> width="18" height="18"
> styleClass="attentionImage"/>
> </f:facet>
> <f:facet name="afterInvalidField">
> <s:message/>
> </f:facet>
> <f:facet name="aroundInvalidField">
> <s:span styleClass="errors"/>
> </f:facet>
> <div class="errors" align="center">
> <h:messages globalOnly="true"/>
> </div>
> <s:validateAll>
> <div class="entry">
> <div class="label">#{messages['Firstname']}:</div>
> <div class="input">
> <s:decorate>
> <h:inputText size="32" required="true"
> value="#{register.user.firstname}"/>
> </s:decorate>
> </div>
> </div>
> <div class="entry">
> <div class="label">#{messages['Lastname']}:</div>
> <div class="input">
> <s:decorate>
> <h:inputText size="32" required="true"
> value="#{register.user.lastname}"/>
> </s:decorate>
> </div>
> </div>
> <div class="entry">
> <div class="label">#{messages['Email']}:</div>
> <div class="input">
> <s:decorate>
> <h:inputText size="32" required="true"
> value="#{register.user.email}"/>
> </s:decorate>
> </div>
> </div>
> <div class="entry">
> <div class="label"> </div>
> <div class="input">
> <h:commandButton value="#{messages['PrevPage']}" styleClass="button"
> action="register"/>
> <h:commandButton value="#{messages['NextPage']}" styleClass="button"
> action="#{register.enterProfile}"/>
> </div>
> </div>
> </s:validateAll>
> </h:form>
--
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
18 years, 2 months