Subject: Re: multiple html:image tags used as submits
From: "Scott Danzig" <[EMAIL PROTECTED]>
 ===
Well, unless someone has a better idea than this hack I found in the
archives:

In the JSP:
<html:image page="/someimage.gif" property="firstSubmit" value="whatever"
border="0"/>
<html:image page="/someimage.gif" property="secondSubmit" value="whatever"
border="0"/>


public String getFirstSubmit() {
    return buttonPressed = "first";
}

public String getSecondSubmit() {
    return buttonPressed = "second";
}

public String getButtonPressed() {
    return buttonPressed;
}

Then form.getButtonPressed() identifies the button.  It just seems like
there should be a more standardized way of doing this, and I didn't really
want to use StrutsX cause it seems like it's not stable.

So if you have a better idea, please tell me.  Thanks.

- Scott

"Scott Danzig" <[EMAIL PROTECTED]> wrote in message
news:a80214$9a8$[EMAIL PROTECTED]...
> I have a jsp page that has a number of images, each acting as a submit
> button for a form, as follows:
>
> <html:image page="/someimage.gif">
>
> Now, I know when doing a normal submit button, you can specify the
property
> and value to figure out which button was clicked.. if the property name is
> "action", then getAction in the form bean would work.  How can I get
similar
> functionality with an image?  Please don't assume I know too much :)



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to