struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan Van Stalle" <jan.vansta...@skynet.be>
Subject Re: LookupDispatchAction and submit
Date Sat, 27 Sep 2003 01:16:54 GMT
Hello,

did you try putting a hidden input in your form with the name actionType and
a default value (which would map to one of your methods).

Jan

"Lars Bergström" <lars.bergstrom@systeam.se> wrote in message
news:E063C59E91313E47ADBF1DD4E848B5CB5E5916@infomail.igpdn1.infogrator.se...
> Hi everyone,
>
> I have a <html:form> in which i have several buttons like this:
>
>         <html:submit property="actionType">
>           <bean:message key="button.add"/>
>         </html:submit>
>         <html:submit property="actionType">
>           <bean:message key="button.delete"/>
>         </html:submit>
>         <html:submit property="actionType">
>           <bean:message key="button.update"/>
>         </html:submit>
>
> With the help of this I use the LookupDispatchAction which my Action
> class extends. This works fine for my submit buttons.
>
> My action-mapping
>
>     <action path="/MyAction"
>             type="com.mycompany.MyAction"
>             name="myBean"
>             parameter="actionType">
>       <forward name="input" path="/pages/myPage.jsp"/>
>     </action>
>
>
> However, I also have a <html:text property="propKey" size="55"/> in the
> same <html:form>. When the text field has focus and I press enter the
> LookupDispatchAction does not work.This because the execute method of
> LookupDispatchAction does not receive any value in the parameter
> actionType. Is this a trap, that LookupDispatchAction cannot handle this
> particular case?
>
> Best regards
>
> Lasse




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


Mime
View raw message