I think the design of struts is that you should have get/setters in your form beans for the button parameters rather than look at the request parms directly.
in form bean ================================ boolean createButton; public void setCreateButton(String createButtonParm) { createButton = true; } public boolean isCreateButton() { return createButton; } ==== in form bean reset have createButton = false; ====== Then in your action code you can test if (formBean.isCreateButton()) ====== hope that helps K. --- "Andres Marcel (KASO 211)" <[EMAIL PROTECTED]> wrote: > Hi John > > You can use the <html:image> tag and set the property to a value. > Then in the action, you are able to find out, which button was presed like > this : > > // find out if the create button was clicked > Enumeration enum = request.getParameterNames(); > int clickedButton = 0; > for(int idx = 0; enum.hasMoreElements() & clickedButton == 0; idx++) { > String paramName = (String)enum.nextElement(); > if(paramName.startsWith("VALUE-OF-PROPERTY-NAME")) { > // what ever you want to do > } > } > > > Marcel > > -----Original Message----- > From: Mattos, John [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, February 13, 2002 4:12 PM > To: '[EMAIL PROTECTED]' > Subject: HTML / Struts Help > > > Hi. > > I have a form that can be submitted by three different buttons, for example > the buttons read > > (Button Labels) > Process > View by Org > View by Product > > What I want to do is in the Action Class handling the submission, find out > which button was pressed, and act accordingly, whether it's an actionForward > (in the case of the "view" options) or kicking off another process (as will > be done by the "process" button) > > So, how can I figure out what button was pressed in that Action class? Is > there a way to do that? > > John Mattos > Sr. Developer and Architect > iNDEMAND > 345 Hudson St. 16th Floor > New York, New York > 10014 > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > ===== __________________________________________________ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>