[jboss-user] [JBoss Seam] - Validation in Restful mode
blackers
do-not-reply at jboss.com
Mon May 28 01:03:14 EDT 2007
I have an action that is called from a form on another site and am using the restful mode. I have an action called from pages.xml. The issue I have is that using this method my validation does not get called, is there a way that the hibernate validation (annotations in my entity bean) can be called so that the action will only be called if validation succeeds. If I have the parameter
if="#{validation.succeeded}"
set in the action element my restful post will not work, if I remove the parameter then the action is called, but my validations are not being called. Is there a way that I can get it to work in a restful application? It works fine if the form is submitted from the subscribe.seam action.
<page view-id="/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.subscribe}" if="#{validation.succeeded}"/>
|
| <navigation from-action="#{subscriber.subscribe}">
| <redirect view-id="/subscribeConfirm.xhtml"/>
| </navigation>
|
| </page>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4048965#4048965
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4048965
More information about the jboss-user
mailing list