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
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
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
MultiLevel Inheritance sample in Java
Archived Comments
1. hi,i am new in java..plz send me java programmes i
View Tutorial By: dinesh at 2012-12-30 15:58:31
2. thank you very much....
View Tutorial By: divya at 2013-01-06 15:50:43
3. ----- main---
Inside Run ...
OK 0 <
View Tutorial By: pushpam at 2009-01-23 06:14:07
4. To make this work with out error I had to add:
View Tutorial By: Jester at 2009-03-26 15:25:59
5. Yes, finaly toString start making sense to me, tha
View Tutorial By: Ted at 2010-04-10 19:15:50
6. Hi,
can we use only code given belo
View Tutorial By: Mahendra at 2012-05-24 10:57:25
7. Using ForwardAction for Integration is Good, Which
View Tutorial By: Ramesh Ram at 2013-06-05 17:57:25
8. Actually, the given accuracy just barely exceeds w
View Tutorial By: William Fraser at 2015-06-07 16:37:52
9. query:sorting date wise,and diplaying only resent
View Tutorial By: ramakanth at 2011-08-23 06:49:02
10. I want to get SCJP certification. please anyone c
View Tutorial By: Raju Salla at 2012-05-04 08:38:06