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. thanks ........... its so easy and interesting to
View Tutorial          By: sammy at 2011-07-25 00:47:44

2. can you guys please help me in inserting values on
View Tutorial          By: Fariha at 2015-06-15 20:44:04

3. nice one
View Tutorial          By: priyaaaaaaaaaaaaaaa at 2011-06-21 08:04:39

4. Hi mate,
When I compile the DomParserExampl

View Tutorial          By: Suresh Kumar D at 2013-06-25 07:06:19

5. how to set the report for particularn form feilds
View Tutorial          By: mathivanan at 2012-09-21 00:05:07

6. your code helps a lot.....
thanx......

View Tutorial          By: beh at 2009-08-19 06:06:20

7. Thanks for your code. Nice working but I have one
View Tutorial          By: Ravinder Kumar at 2012-01-02 18:01:21

8. the above is perfect, but when i hit the export bu
View Tutorial          By: CH at 2009-06-02 03:01:34

9. Small modification.
System.out.println(&qu

View Tutorial          By: Rohit at 2012-02-07 16:22:52

10. The code gives the following exception :-
<

View Tutorial          By: swetha at 2009-03-12 07:19:23