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. its is good..I am developing a Form based applicat
View Tutorial          By: Bhavani at 2010-10-18 01:39:41

2. Its super explanation
View Tutorial          By: jose at 2011-12-08 13:36:29

3. great resource
View Tutorial          By: Anonymous at 2011-04-14 03:14:43

4. u doing good
View Tutorial          By: matsiko at 2009-04-14 08:05:00

5. java.lang.IllegalArgumentException means usually t
View Tutorial          By: Seink at 2008-11-12 11:03:00

6. Thanks - very useful!
View Tutorial          By: Adam Musial-Bright at 2010-02-28 06:14:39

7. Thanks for your tutorial.
View Tutorial          By: pre pais at 2015-01-09 00:14:29

8. Thanks, very helpful. Worked perfectly.
View Tutorial          By: Bob Knob at 2011-07-27 18:22:18

9. I want to know that what is the main use of the &q
View Tutorial          By: Krunal Patel at 2012-09-17 08:11:19

10. Do the serialized output is displayed in the file
View Tutorial          By: Atihs at 2012-11-17 02:38:52