struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dakota Jack" <dakota.j...@gmail.com>
Subject Re: multiple submit buttons: LookupDispatchAction / ActionForward formdata missing
Date Wed, 01 Mar 2006 14:24:36 GMT
P.S.  The lookup dispatch action is a new and improved version at
www.michaelmcgrady.com, not the bad one in Struts.


On 2/28/06, SIRAGHER, JOEL <JOEL_SIRAGHER@appsig.com> wrote:
>
> Greetings:
>
> I've been debugging now for a while, and don't know where to continue
> looking.
>
> I'm doing multiple submit buttons on my struts/jsp 1.1 page.  My
> debugger takes me to the correct action, but the action has no form data
> in it. On the jsp side, I am entering data, etc.
>
> Do I have to put something special in my struts-config.xml?
>
> Im pretty stuck here now for the last few days.
>
> Can some one make a suggestion?
>
>
> My .jsp:
> ======
>         <html:form action="/actions/retrieve"  method="post">
>         <TD align="center">
>                 <html:submit property="method">
>                 <bean:message key="button.UpdatePage" />
>                 </html:submit>
>         </TD>
>
> ....
>
> My Action Class:
> =========
> public class RetrieveAction extends LookupDispatchAction {
>         protected Map   getKeyMethodMap() {
>         Map map = new HashMap();
>         map.put("button.UpdatePage", "updatePage");
>         }
>
>
> public ActionForward updatePage(ActionMapping mapping, ActionForm form,
>         HttpServletRequest request, HttpServletResponse response)
>         throws IOException, ServletException {
>
> RetrieveFormBean dataForm = (RetrieveFormBean) form;
>    // form data comes back null. Contains no data forwarded.
>    .....
>    return mapping.findForward("retrieve");
> }
>
>
> My struts-config.xml
> ========
> <action path="/actions/retrieve"
>         name="RetrieveFormBean"
>         type="com.struts.action.RetrieveAction"
>         scope="session"
>         parameter="method">
>         <forward name="Retrieve" path="/tiles/Retrieve.jsp"/>
> </action>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


--
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message