struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Mitchell" <>
Subject Re: Form submit without button or image?
Date Tue, 03 Jun 2003 20:35:01 GMT
After speaking offline with Gregory, I decided to post this to the list in
case it helps anyone else.

Q. How would I set the property for the "submit"?  I'm using a
   LookupDispatchAction to process the submit.

A. From the LookupDispatchAction docs:
   "The button name is specified by the 'parameter' property of
   the corresponding ActionMapping."
   While the docs might be slightly off (you don't actually have to use a
   the name/value pair submitted will be used to lookup the key/value from
   resource bundle.  That value should match a method in your action.

Quick and dirty example:
<form name="frm" action="?same-page" method="GET">
<input type="hidden" name="action" value=""/>
<input type="checkbox" name="users" value="Test1">Test1<br>
<input type="checkbox" name="users" value="Test2">Test2<br>
<input type="checkbox" name="users" value="Test3">Test3<br>
<input type="checkbox" name="users" value="Test4">Test4<br>
<input type="checkbox" name="users" value="Test5">Test5<br>

<a href="JavaScript:doForm('users.actions.add')">Add</a> |
<a href="JavaScript:doForm('users.actions.delete')">Remove</a>

function doForm(action){
</script> the address bar as you click on either of the links.

James Mitchell
Software Developer/Struts Evangelist

----- Original Message ----- 
From: "Gregory F. March" <>
To: "Struts Users Mailing List" <>
Sent: Tuesday, June 03, 2003 3:22 PM
Subject: Form submit without button or image?

> I'm not sure if this is a struts question or not, but I have a
> DynaActionForm and I'd like to add, for lack of a better term, a
> "submit link".
> I want a link that submits the form, but I don't want a button or an
> image.  Can this be done?
> Thanks,
> /greg
> --
> Gregory F. March    -=-    -=-
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message