Issue with appGen's creation of the xwork.xml entry

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue with appGen's creation of the xwork.xml entry

doughays
I am new to the AppFuse world, but after writing similar tools to AppGen in PHP and C#, I was excited to find one that was already written for the Java world!

One issue that I have run into is with the Action entry in the xwork.xml file.  The model validation was happening but the errors weren't being pushed to the JSP layer.

Well, after beating my head into the wall, I realized that I was being send back to INPUT twice.  I then remembered a curiosity I had with the xwork.xml file.  I wondered why there were two result name="input" lines.

The xwork.xml entry as generated by AppGen:
    <action name="saveCamperEnrollment" class="camperEnrollmentAction" method="save">
        <interceptor-ref name="validationStack"/>
        <result name="cancel" type="redirect">camperEnrollments.html</result>
        <result name="input">/WEB-INF/pages/camperEnrollmentForm.jsp</result>
        <result name="input" type="redirect">
            editCamperEnrollment.html?camperEnrollmentId=${camperEnrollment.camperEnrollmentId}
            true
        </result>
        <result name="success" type="redirect">camperEnrollments.html</result>
    </action>

sure enough, by removing the second <result name="input"...> line, it fixed my problem and I began seeing the error messages on the page.

Can any one explain why there are two "input" result lines?

Thanks!

Doug Hays,
Denver, CO
http://www.positiveware.com
Reply | Threaded
Open this post in threaded view
|

Re: Issue with appGen's creation of the xwork.xml entry

doughays
I am still confused by the dual result names generated by AppGen in xwork.xml. The WebWork Actions Tutorial has only one "input" result (which is what I would expect) Any thoughts on the existance of the second "input" result with the redirect?