I added the following to Wiki. This is the cleanest solution I came up with without resorting to JavaScript.
public void doValidation() { ActionContext context = ActionContext.getContext(); Map parameters = context.getParameters(); for (Iterator iter = parameters.keySet().iterator(); iter.hasNext(); ) { String key = (String) iter.next(); if (doSignIn == null && key.indexOf( "doSignIn" ) >= 0) { setDoSignIn( "true" ); } else if (doUpdate == null && key.indexOf( "doUpdate" ) >=0) { setDoUpdate( "true" ); } } } -----Original Message----- From: Scott Farquhar [mailto:[EMAIL PROTECTED]] Sent: Wed 2/5/2003 3:31 AM To: [EMAIL PROTECTED] Cc: Subject: Re: [OS-webwork] Graphical submit buttons and WW 1.2.1 One thing we could do with the dispatcher is handle this? It should be possible to write a webwork dispatcher (or even a webwork filter in 2.0) that converts ABC.x and ABC.y to call ABC? Would there be any problems with that? It would make the code a lot simpler to do it in a dispatcher. Perhaps actions can be ImageRequestAware or some sort? Jason? Patrick? Cheers, Scott Jason Carreira wrote: > Good question. I don't have an answer, but whoever figures this out, > please Wiki it too. :-) > > >>-----Original Message----- >>From: Kirk Rasmussen [mailto:[EMAIL PROTECTED]] >>Sent: Tuesday, February 04, 2003 3:50 PM >>To: webwork list >>Subject: [OS-webwork] Graphical submit buttons and WW 1.2.1 >> >> >>Hi All, >> >>I was wondering if someone has tried using multiple graphical >>submit buttons on a single form? >> >>For example let's say I have the following: >> >><form> >><ui:textfield label="'Email'" name="'userID'" >>maxlength="100"/> <ui:password label="'Password'" >>name="'password'" maxlength="32"/> >> >><input type="image" src="/img/sign_on.gif" name="doSignIn" >>value="Sign In" /> <input type="image" src="/img/update.gif" >>name="doUpdate" value="Update Settings" /> </form> >> >>If I had regular submit buttons (i.e. type=submit), the >>dispatcher would call "setDoSignIn()" and "setDoUpdate()) >>because the parameter name would simply be "doSignIn" and >>"doUpdate" respectively. >> >>But in the case of graphical submit buttons the parameters >>sent from the browser become "doSignIn.x" and "doSignIn.y" >>and "doUpdate.x" and "doUpdate.y". Other than making my >>action ServletRequestAware and using the servlet request >>directly to look at the parameter is there a best practices >>for dealing with this issue? >> >>Thanks, >>Kirk Rasmussen >>Lucasfilm Ltd. >> >> >> >>------------------------------------------------------- >>This SF.NET email is sponsored by: >>SourceForge Enterprise Edition + IBM + LinuxWorld =omething 2 >>See! http://www.vasoftware.com >>_______________________________________________ >>Opensymphony-webwork mailing list >>[EMAIL PROTECTED] >>https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork >> > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld http://www.vasoftware.com > _______________________________________________ > Opensymphony-webwork mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > -- ATLASSIAN - http://www.atlassian.com Expert J2EE Software, Services and Support ------------------------------------------------------- Need a simple, powerful way to track and manage issues? Try JIRA - http://www.atlassian.com/software/jira ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork