Comment on Tutorial - Handling multiple buttons in HTML Form in Struts By Charles



Comment Added by : Pierre

Comment Added at : 2009-11-19 20:16:35

Comment on Tutorial : Handling multiple buttons in HTML Form in Struts By Charles
Thanks for the solution. I must say however that this solution works ALL the time, including internationalized apps. Here is how to make it work:

1) in your JSP you refer to the resourceBundle to set the value of the submit button
(i.e. <bean:message key=âbutton.saveâ/>)

2) use the same value in your action.
e.g.
ResourceBundle res = ResourceBundle.getBundle("ApplicationResources",(Locale) request.getSession().getAttribute(Globals.LOCALE_KEY));

if(custForm.getStep().equals(res.getString("button.save"))){
//Do your stuff here
{

This way, the resource bundle will always give you the value corresponding to the locale.

Cheers,
Pierre


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. syntax of java program in looping statement
View Tutorial          By: lokesh at 2009-03-25 06:57:56

2. how to connect database simple method
View Tutorial          By: kavimozhian at 2013-04-08 11:14:29

3. Any Solution for below Error,

*** t

View Tutorial          By: Mazher at 2009-08-02 02:08:52

4. I need some help. I am a programmer - but quite n
View Tutorial          By: Ron at 2013-06-21 00:58:27

5. Was useful
View Tutorial          By: Vasan at 2008-06-22 05:04:20

6. i tried, the coding dont hv any errors but its not
View Tutorial          By: anna at 2010-11-02 21:56:27

7. very well to understand
View Tutorial          By: Siva Krishna N at 2007-02-16 23:06:07

8. Hello Sir,

Is there a way to use JS

View Tutorial          By: rohit at 2008-04-02 09:07:41

9. it is a big help for us , as a IT student that kn
View Tutorial          By: nelson kent recites at 2012-01-19 08:56:26

10. Thanks this article helped (just needed to know wh
View Tutorial          By: sushi at 2008-12-17 08:09:51