You could probably compare pRequest.getParameter("Submit") against the
internationalized string, though it might be better to go a way that won't
make you dependent on those labels. You could flip it around and decide
based on the Name of the submit button. Something like:
if ( pRequest.getParameter("update_submit") != null ) {
// do an update
} else if ( pRequest.getParameter("delete_submit") != null ) {
// do a delete
}
-john.
----- Original Message -----
From: "Pat Quinn" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 09, 2002 6:35 AM
Subject: Multiple Submit Buttons + Internationalisation
> Multiple Submit Buttons + Internationalisation
>
> I have a jsp with three submit buttons (update, delete etc..) each with a
> value as loaded from the resource bundle:
>
> <input type="submit" name="Submit" value="<bean:message
key='label.update'/>
>
>
> In my action class i do the following to identify which button has
submitted
> the form:
>
> if ("Update".equalsIgnoreCase(pRequest.getParameter("Submit"))) {
> //Process my update
> }
>
> This works fine when viewed from a browser with an English locale, if the
> locale is anything different it fails.
> Its obvious why this doesn't work as i've hardcode the action class to one
> locale (English).
>
> Can someone please suggest a different approach?
>
> Cheers
>
>
>
>
>
> _________________________________________________________________
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> http://join.msn.com/?page=features/virus
>
>
> --
> 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]>