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
- Data Science
- Android
- AJAX
- ASP.net
- C
- C++
- C#
- Cocoa
- Cloud Computing
- HTML5
- Java
- Javascript
- JSF
- JSP
- J2ME
- Java Beans
- EJB
- JDBC
- Linux
- Mac OS X
- iPhone
- MySQL
- Office 365
- Perl
- PHP
- Python
- Ruby
- VB.net
- Hibernate
- Struts
- SAP
- Trends
- Tech Reviews
- WebServices
- XML
- Certification
- Interview
categories
Related Tutorials
Java program to get location meta data from an image
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
Count number of vowels, consonants and digits in a String in Java
Student marks calculation program in Java
Calculate gross salary in Java
Calculate average sale of the week in Java
Vector in Java - Sample Program
Archived Comments
1. how to solve this while i am running the code it
View Tutorial By: nikhilmuddasani at 2009-07-23 04:32:31
2. thanks , but i want it some thing like fibonici se
View Tutorial By: Arpit Agrawal at 2015-01-04 18:34:41
3. hai sir... this is ROSHAN I am searching for voice
View Tutorial By: roshan at 2013-09-25 08:12:55
4. how to downlow the different 5 files please !!
View Tutorial By: Agnin at 2009-06-24 05:29:09
5. Great tutorial about ArrayList .It's a very great
View Tutorial By: umesh sharma at 2009-05-14 20:40:39
6. Hi, Razvan
I change over to using y
View Tutorial By: James at 2010-12-22 00:44:50
7. i can understand easily what is isset but i am not
View Tutorial By: sebestiraj at 2010-04-09 00:09:36
8. hi ... i want to receive SMS on the com port ... b
View Tutorial By: Ahsan at 2010-02-16 19:49:26
9. Can u send total code, i am in critical position n
View Tutorial By: ram at 2011-05-16 07:07:10
10. How can I delete the data that I have entered into
View Tutorial By: selina at 2011-08-15 05:15:45