struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dean Pullen (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (WW-2987) Validation messages do not get displayed using a redirectAction as the input
Date Tue, 10 Feb 2009 12:29:45 GMT

    [ https://issues.apache.org/struts/browse/WW-2987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45571#action_45571
] 

deanpullen edited comment on WW-2987 at 2/10/09 4:29 AM:
----------------------------------------------------------

Ok, as requested via the mailing lists, I'm reopening this issue.  

As a summary - a JSP forward as the input will work (provided you're using the portalDefaultStack
throughout the process)

A redirectAction will not work, with or without using messageStoreInterceptor.

You can get a redirectAction to work if you 'fudge' the process, using a messageStoreInterceptor,
by including an input result on the action used by redirectAction - which is slightly odd.

I'm attaching a test class, a test struts-test.xml, and an appropriate JSP.
If you wished this to be packed in someway different, let me know.

      was (Author: deanpullen):
    Ok, as requested via the mailing lists, I'm reopening this issue.  

As a summary - a JSP forward as the input will work (provided you're using the portalDefaultStack
throughout the process)

A redirectAction will not work, with or without using messageStoreInterceptor.

You can get a redirectAction to work if you 'fudge' the process, using a messageStoreInterceptor,
by including an input result on the action used by redirectAction - which is slightly odd.

I'm attaching a test class, a test struts-test.xml (uses namespace 'test' to get the JSP forward
to work), and an appropriate JSP.
If you wished this to be packed in someway different, let me know.
  
> Validation messages do not get displayed using a redirectAction as the input
> ----------------------------------------------------------------------------
>
>                 Key: WW-2987
>                 URL: https://issues.apache.org/struts/browse/WW-2987
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Portlet
>    Affects Versions: 2.1.6
>         Environment: JBoss Portal 2.7.1
>            Reporter: Dean Pullen
>         Attachments: item.jsp, ItemAction.java, struts-test.xml, struts.xml
>
>
> This was originally posted to the mailing list without being solved.
> It seems we're correctly directed back to the input when Validation isn't passed, but
we cannot pick up the error messages using the usual tags:
> <s:actionerror />
> <s:fielderror />
> We're utilising the portletDefaultStack and our Portlet package is extending struts-portlet-default.
Our package has no name-space set.
> For example this is the view, which is the input of the edit action:
>                                <action name="ItemView" class="com.msp.portlets.ItemAction">
>                                                 <interceptor-ref name="portletDefaultStack"/>
                                                                                         
   
>                                                 <result>/WEB-INF/jsp/welcome/admin/item.jsp</result>
>                                 </action>            
> This is the edit action:
>                                <action name="ItemEdit" class="com.msp.portlets. ItemAction"
method="itemEdit">
>                                                 <interceptor-ref name="portletDefaultStack"/>
                                                                                         
                          
>                                                 <result type="redirectAction" name="success">
>                                                                 <param name="actionName">ItemView</param>
                                                               
>                                                 </result>
>                                                 <result type="redirectAction" name="input">

>                                                                 <param name="actionName">
ItemView </param>
>                                                  </result>
>                                 </action>
> This works perfectly if the redirectAction input is replaced with a standard JSP forward,
and the validation errors are shown to the user.
> Utilising validation XML instead of annotations produces the same problem - redirectAction
does not work, JSP does.
> Utilising the messageStoreInterceptor does not help.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message