You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by jwpronto <jw...@gmail.com> on 2008/01/27 00:41:55 UTC

s:action with validation failure of form submit

Hi All -

I have an s:action tag embedded in a JSP. The s:action populates a List in
the request which a select box uses to populate.

When there is a validation failure the s:action tag is not being called.

The interesting thing is that I have this exact setup on a previous page
(this is a 3 page form) and the s:action does render on validation failure,
so I'm not sure why, only on page 2, this s:action tag is failing to get
called.

It works in normal scenarios and only fails when a validation error occurs.

Any thoughts?

Thanks
Jon

-- 
View this message in context: http://www.nabble.com/s%3Aaction-with-validation-failure-of-form-submit-tp15114170p15114170.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: s:action with validation failure of form submit

Posted by jwpronto <jw...@gmail.com>.
As much info as possible below:

I traced through the action tag library and it looks like the proxy's
execute method is being called from the ActionComponent but no exception is
thrown and the action call is never actually called so somehow their is some
sort of swallowed exception or mis-configuration in the
DefaultActionInvocation's invoke method.

Struts.xml (I removed some unimportant info)

        <!-- Page one of the enrollment wizard, when the "next-step" result
is evaluated the s:action
              tag in question executes fine. -->

        <action name="enrollment_ui/*" method="{1}" class="com.....Action">
            <result
name="input">/WEB-INF/pages/enrollment_user_info.jsp</result>
            <result
name="next-step">/WEB-INF/pages/enrollment_bus_info.jsp</result>
            <result
name="final-step">/WEB-INF/pages/enrollment_confirmation.jsp</result>
        </action>

        <!-- A validation failure on form submit that hits this action
somehow prevents the s:action 
              tag on the "input" page from firing -->

        <action name="enrollment_bi/*" method="{1}" class="com....Action">
            <result
name="input">/WEB-INF/pages/enrollment_bus_info.jsp</result>
            <result
name="final-step">/WEB-INF/pages/enrollment_confirmation.jsp</result>
        </action>



JSP with s:action tag that yields different results based on access path:

<%@ include file="/WEB-INF/pages/includes/header.jsp" %>

<s:action name="primary_cat_select_action" executeResult="false"
namespace=""/>

<s:form id="bi" name="bi" action="enrollment_bi" method="POST">

<label for="categories">Categories:</label>
                <div class="formfields"><s:select list="#request.categories"
listKey="jobCategoryId" 
                      listValue="name" name="selectedCategories"
cssClass="jobcat" id="primejobcat"
                      required="true" multiple="true" size="10"
value="preSelectedCategories"/>
.
.
.
</s:form>

Action:

I didn't include the java code since its pretty basic. Extends
ActionSupport, has a single execute method, and setters/getters. 

Any help is appreciated!



mgainty wrote:
> 
> please post:
> jsp
> xwork.xml entries for actionTag
> Action java source
> 
> M-
> ----- Original Message -----
> From: "jwpronto" <jw...@gmail.com>
> To: <us...@struts.apache.org>
> Sent: Saturday, January 26, 2008 6:41 PM
> Subject: s:action with validation failure of form submit
> 
> 
>>
>> Hi All -
>>
>> I have an s:action tag embedded in a JSP. The s:action populates a List
>> in
>> the request which a select box uses to populate.
>>
>> When there is a validation failure the s:action tag is not being called.
>>
>> The interesting thing is that I have this exact setup on a previous page
>> (this is a 3 page form) and the s:action does render on validation
> failure,
>> so I'm not sure why, only on page 2, this s:action tag is failing to get
>> called.
>>
>> It works in normal scenarios and only fails when a validation error
> occurs.
>>
>> Any thoughts?
>>
>> Thanks
>> Jon
>>
>> --
>> View this message in context:
> http://www.nabble.com/s%3Aaction-with-validation-failure-of-form-submit-tp15
> 114170p15114170.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/s%3Aaction-with-validation-failure-of-form-submit-tp15114170p15121385.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: s:action with validation failure of form submit

Posted by Martin Gainty <mg...@hotmail.com>.
please post:
jsp
xwork.xml entries for actionTag
Action java source

M-
----- Original Message -----
From: "jwpronto" <jw...@gmail.com>
To: <us...@struts.apache.org>
Sent: Saturday, January 26, 2008 6:41 PM
Subject: s:action with validation failure of form submit


>
> Hi All -
>
> I have an s:action tag embedded in a JSP. The s:action populates a List in
> the request which a select box uses to populate.
>
> When there is a validation failure the s:action tag is not being called.
>
> The interesting thing is that I have this exact setup on a previous page
> (this is a 3 page form) and the s:action does render on validation
failure,
> so I'm not sure why, only on page 2, this s:action tag is failing to get
> called.
>
> It works in normal scenarios and only fails when a validation error
occurs.
>
> Any thoughts?
>
> Thanks
> Jon
>
> --
> View this message in context:
http://www.nabble.com/s%3Aaction-with-validation-failure-of-form-submit-tp15
114170p15114170.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org