Title: [OS-xwork] Xwork, Validation and Pageflow problem

Hi,

I hope someone can help me with this odd problem:

Following scenario:
User calls action letter_createLetter which fills some arrays for selectionand then diplays an input page letter_generate_id.jsp).

This page contains a field called partnerId (droppdown) which is validated (is something selected) by calling action letter_generateLetterId .

On succes it again fowards to another input screen (letter_new.jsp) which also contains the field called partnerId which is also supposed to be validated the same way.

Problem is now that when first input screen is passed correctly but on the second this field is not entered i want to forward the user to the input screen again (action letter_generateLetterId).

When doing that it first throws the user to the previous action (correct behaviour) but at the same time this action is validated which again returns input and therefore throws

the user to the first input screen (instead of staying on the sceond one).

What am I doing wrong???

I know this is a very long and probably unclear explanation but I tried to do my best ;-)
To clarify things I've included the xwork configuration.

Any help very appreciated.

cheers
Patrick

xwork.xml:
            <!-- ECM interceptor stack without validation -->
            <interceptor-stack name="defaultECMStack">
                <interceptor-ref name="defaultComponentStack"/>
                <interceptor-ref name="chain"/>
                <interceptor-ref name="ecmdatabase"/>
            </interceptor-stack>
            <!-- ECM interceptor stack with validation -->
            <interceptor-stack name="defaultECMStackValidation">
                <interceptor-ref name="defaultECMStack"/>
                <interceptor-ref name="validation"/>
                <interceptor-ref name="workflow"/>
            </interceptor-stack>
        </interceptors>
....

included xwork configuration for application:

<!--
        This action fills some fileds with values and displays input screen (letter_generate_id.jsp)
-->
    <action name="letter_createLetter" class="com.loyaltypartner.lm.ecm.core.actions.LetterAction"
            method="createLetter">
            <interceptor-ref name="defaultECMStack"/>
            <result name="success" type="dispatcher">
                <param name="location">/standard_cmpgn/letter/letter_generate_id.jsp</param>
            </result>
            <result name="input" type="chain">
                <param name="actionName">letter_createLetter</param>
            </result>
        </action>
<!-- -
        This action picks up the input values and validates them; on error it displays the same screen per cahaining to previous action (inorder to fill values)

        on success it displays another input screen (letter_new.jsp)
-->
        <action name="letter_generateLetterId" class="com.loyaltypartner.lm.ecm.core.actions.LetterAction"
            method="generateLetterId">
            <interceptor-ref name="defaultECMStackValidation"/>
            <result name="success" type="dispatcher">
                <param name="location">/standard_cmpgn/letter/letter_new.jsp</param>
            </result>
            <result name="input" type="chain">
                <param name="actionName">letter_createLetter</param>
            </result>
        </action>
<!--
        This action validates input and on error it should display the previous page but with all entered values (action chain);

        It does forward to the previous action but the validates fields again and the goes to first action (createLetter)

-->
        <action name="letter_saveNewLetter" class="com.loyaltypartner.lm.ecm.core.actions.LetterAction"
            method="saveNewLetterId">
            <interceptor-ref name="defaultECMStackValidation"/>
            <result name="success" type="dispatcher">
                <param name="location">/standard_cmpgn/success.jsp</param>
            </result>
            <result name="input" type="chain">
                <param name="actionName">letter_generateLetterId</param>
            </result>
        </action>

Reply via email to