Hello
If I understand you want to have multiple submit buttons?
I would suggest to look at Dmitri Vladin's solution at
http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg03458.html
More specifically take a look at mapping.findForwards()
match the individual 'forward' to the 'request parameter' you sent in to to
submit
and submitAction returns mapping.findForward(forwards[iterator]))
Anyone else??
HTH,
Martin-
----- Original Message -----
From: "Catherine" <[EMAIL PROTECTED]>
To: <user@struts.apache.org>
Sent: Friday, September 23, 2005 9:48 AM
Subject: Re:Submit form with <html:submit> and <html:button>
Hi,
I am posting from roomity. Somehow my origainal post was truncated. Here
is my question.
I have several buttons in my form.
1. <html:submit property="submitAction" value="Save">
This is fine, I get submitAction="Save" when action is invoked.
2. <html:button property="submitAction" value="Delete"
onclick="javascript:show('myAction.do?submitAction=Delete&.....')">
Function show(url) is defined as in my first post. I found that the
property is not submitted, so I have to append "submitAction=Delete" after
the action. So if I use javascript, what does the property field give me?
3. <html:button property="submitAction" value="Add Property"
onclick="javascript:checkProp()">
This is my real problem. I have a single selection dropdown menu which
contains the allowed properties of the object. When user selects a
property and clicks the Add Property button, I call checkProp() to check
if it already added to the object. If yes, I alert user and don't submit
form; if no, I call form.submit(). I found that submitAction="" if the
form is submitted this way. I tried to do form.submitAction.value = "Add
Property" before submit(), but that didn't help. How can I pass that
value?
Thanks,
Catherine
-------------------------------------------------------------
<a href="http://Struts_User_List.roomity.com">roomity.com</a>
roomity.com is broadband internet. ~~1127483281913~~
-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]