You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Matt and Ange Campbell <ma...@hotmail.com> on 2004/05/12 14:44:19 UTC

Using DispatchAction with Images

Hi

I would like to use Dispatch Action to avoid using nested ifs in my Action 
Class.

Currently I am using javaScript functions that are called by clicking 
images. They set a flag in my form bean then submit the form, the action 
class then determines the value of the flag in if statements.

function save() {
	document.form.currentOperation.value = 'SAVE';
	document.form.submit();
}


I wanted to separate the logic contained in the if into methods and was 
following the process outlined on this page. 
http://husted.com/struts/tips/002.html

The problem is I am using images rather then html:submit button.

I have also found the following resource 
http://www.jguru.com/faq/view.jsp?EID=893423 which appears as a work around 
to this, however if I follow this I will still end up with nested If's in my 
action class.

Any ideas or suggestions?

Thanks,

Matt

_________________________________________________________________
SEEK: Now with over 50,000 dream jobs! Click here:  
http://ninemsn.seek.com.au?hotmail


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