[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-1362) Add validation for page parameters
Mathew Blackberry (JIRA)
jira-events at lists.jboss.org
Wed Jun 13 00:32:11 EDT 2007
[ http://jira.jboss.com/jira/browse/JBSEAM-1362?page=comments#action_12365132 ]
Mathew Blackberry commented on JBSEAM-1362:
-------------------------------------------
I am having limited success with the changes you have made. Most of this may be because of the way I have my enviromnent set up.
my external pages posts to /dt_subscribe.xhtml. The entries in pages.xml is as follows.
<page view-id="/dt_subscribe.xhtml" >
<param name="subscribe:title" value="#{subscription.title}"/>
<param name="subscribe:firstName" value="#{subscription.firstName}"/>
<param name="subscribe:lastName" value="#{subscription.lastName}"/>
<param name="subscribe:country" value="#{subscription.country}"/>
<param name="subscribe:postcode" value="#{subscription.postcode}"/>
<param name="subscribe:email" value="#{subscription.email}"/>
<param name="subscribe:confirmEmail" value="#{subscription.confirmEmail}"/>
<action execute="#{subscriber.subscribedt}" if="#{not validation.failed}"/>
<action execute="#{subscriber.invalid}" if="#{validation.failed}"/>
<navigation>
<rule if-outcome="success">
<redirect view-id="/dtsubscribeConfirm.xhtml"/>
</rule>
<rule if-outcome="invalid">
<redirect view-id="/dtsubscribe.xhtml"/>
</rule>
</navigation>
</page>
---------------END Pages.XML---------------------
The line
<action execute="#{subscriber.subscribedt}" if="#{not validation.failed}"/>.
will not work if I use #{validation.succeeded} instead of #{not validation.failed}
and once validation fails and I redirect to another view I do not get validation messages and the fields that are invalid are now blank rather than being auto populated. All valid fields are re-populated. The page I redirect to on a failure has a <h:messages globalOnly="true".../> tag. The #{subscriber.invalid} function just returns "invalid" (my rules were not working properly with out it). I assume this would work if I just displayed the messages on dt_subscribe.xhtml rather than redirecting???
The dt_subscribe.xhtml file only has 1 line which is the xhtml doctype tag, as I never want this page to be displayed, it should always redirect to another view, a success page if all goes well or a page with a similar form to the external site if validation fails.
> Add validation for page parameters
> ----------------------------------
>
> Key: JBSEAM-1362
> URL: http://jira.jboss.com/jira/browse/JBSEAM-1362
> Project: JBoss Seam
> Issue Type: Feature Request
> Components: Core
> Affects Versions: 1.2.1.GA
> Reporter: Mathew Blackberry
> Assigned To: Gavin King
> Fix For: 1.3.0.ALPHA
>
>
> Currently seam does not validate page parameters when working in restful mode.
--
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
More information about the seam-issues
mailing list