I think you will need to use the property attribute, example: <html:submit property="docType" value="pdf" alt="Create a pdf file"/>
You can put a String docType property in your form and examine it in the action to see what the user pressed. As an aside, in my experience this becomes a bit more complicated in a multilingual application where the value of the button changes depending upon the user's language. Paul Moody --- Thomas Sundberg <[EMAIL PROTECTED]> wrote: > Hi! > > I have a form where a user should be able to request > a report. The user > enters two dates and then presses either a button > labeled pdf, html och csv. > How can I read in my action which button was > pressed? > > My form looks something like this: > > The button part of my form looks something like > this: > > <html:submit value="pdf" > alt="Create a pdf file"/> > <html:submit value="html" > alt="View report as html online"/> > <html:submit value="csv" > alt="Create a tab separated text file > for import in Excel"/> > > I haven't seen any good examples when looking in the > docs and searching the > web. I assume I wan't to add something to the > html:submit, perhaps use the > property tag(?), or can I be able to read the value > of the button pressed? > How do I read the value in my action? > > /Thomas > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > ___________________________________________________________ Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]