Hello Nic,
I may be over simplyfing the problem but why not just set the default value of the dispath hidden field [what ever that may be i.e. in your case method] in the form to the default value that you wanted insted of the default null. Anyhow, in case I was over simplifing the problem here is a like to a page that I found very useful when using the DispatchAciton:
http://husted.com/struts/tips/002.html
Also you may wanted to look into the LookupDispachAction which in my option is a better choice due to the fact that it is javascript free.
************************************* Ruben Cepeda [EMAIL PROTECTED] *************************************
----Original Message Follows---- From: Nic Werner <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: Struts Users Mailing List <user@struts.apache.org> Subject: DispatchAction defaults Date: Sat, 26 Mar 2005 16:07:48 -0800
Hi,
I'm using DispatchAction for grouping common items together, and one of them is to just load a form page, and the other action is to 'update' this page.
I call this with: addDevice.do?method=edit and: addDevice.do?method=update
The param for the first page seems a bit extraneous, is there a way that DispatchAction can just call a default method if the param isn't specified? I would like to just call: addDevice.do and have it bring up the form. I haven't seen mention of this practice or ability in any docs.
Does everybody else just work around this and add extra params?
- Nic.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]