Re: which button pressed?

2001-11-21 Thread Peter Pilgrim
From: emmanuel.boudrant [EMAIL PROTECTED] on 20/11/2001 16:20 CET Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject: Re: which button pressed? Hi, I suggest you to use : html:submit property

Re: which button pressed?

2001-11-20 Thread emmanuel.boudrant
Hi, I suggest you to use : html:submit property=propertyname value=buttonname/ ex: html:submit property=myAction value=add/ html:submit property=myAction value=del/ and in Action class, to determine witch button is pressed: String button = request.getParameter(myAction); if (

RE: which button pressed?

2001-11-20 Thread ltorrence
Users Mailing List Subject: Re: which button pressed? Hi, I suggest you to use : html:submit property=propertyname value=buttonname/ ex: html:submit property=myAction value=add/ html:submit property=myAction value=del/ and in Action class, to determine witch button is pressed: String button

RE: which button pressed?

2001-11-20 Thread Tom Klaasen (TeleRelay)
I've seen 2 ways to do this: (1) in the action, go over all possible values to check if it is not null: boolean prevPressed = request.getParameter(prev)!=null; boolean nextPressed = request.getParameter(next)!=null; ... (2) use a more bean-minded approach: add some setters to your form bean,

RE: which button pressed?

2001-11-20 Thread Maris Orbidans
Thanx a lot ! I was looking for an option like this !!! Maris (2) use a more bean-minded approach: add some setters to your form bean, like private String pressedButton; public void setPrev(String prev){ pressedButton = prev; } public void setNext(String next) {

Re: which button pressed?

2001-11-20 Thread Erik Hatcher
AM Subject: Re: which button pressed? Hi, I suggest you to use : html:submit property=propertyname value=buttonname/ ex: html:submit property=myAction value=add/ html:submit property=myAction value=del/ and in Action class, to determine witch button is pressed: String button

RE: which button pressed?

2001-11-20 Thread Maris Orbidans
PM To: Struts Users Mailing List Subject: RE: which button pressed? I've seen 2 ways to do this: (1) in the action, go over all possible values to check if it is not null: boolean prevPressed = request.getParameter(prev)!=null; boolean nextPressed = request.getParameter(next)!=null; ... (2) use

RE: which button pressed?

2001-11-20 Thread Tom Klaasen (TeleRelay)
I think it will work as it is... tomK -Original Message- From: Maris Orbidans [mailto:[EMAIL PROTECTED]] Sent: dinsdag 20 november 2001 16:49 To: Struts Users Mailing List Subject: RE: which button pressed? Do I have to change my JSP code ? Will it work as it is now