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
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 (
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
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,
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) {
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
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
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
8 matches
Mail list logo