[
http://jira.jboss.com/jira/browse/JBSEAM-432?page=comments#action_12348877 ]
Norman Richards commented on JBSEAM-432:
----------------------------------------
I don't understand this request. Why does immediate="true" not work? That
will allow you to trigger a back action without applying the values. Is there the desire
is to keep the input fields populated with the potentially invalid data? You certainly
don't want to push these values to the model without validation. That defeats the
whole purpose of having validation in the first place. Even if you did skip validation,
how would you handle an error when updating the model from the input value that wasn't
validated? Am I missing something here?
If immediate="true" is really insufficient, I think the solution would be to
simply not bounce between different views. If you stay within the same view, you can
preserve the invalid state in the view without corrupting the model. The easiest way
that I know of to accomplish this is to put all the panels one one view and only render
the active panel. You are free to move between panels with validation and model updates
or between panels with no validation and only updating the UI component data, which will
still be there if a panel is re-rendered later.
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
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