RE: Localization in struts 2

2009-12-09 Thread Muthu Velappan
Hi,

From your struts.xml, it seems that u added i18n interceptor only for
index Action and that’s the reason why u get localized text in its result
index.jsp.

If you want this to be applied through out ur entire project, then create a
interceptor stack like this struts.xml and use that as part of your actions

package name=default extends=struts-default
   interceptors
interceptor-stack name=myI18nStack
interceptor-ref name=i18n/
interceptor-ref name=basicStack/
/interceptor-stack
/interceptors

default-interceptor-ref name=myI18nStack/ 

action


/action
/package

Regards,
Muthu

PS: I suggest you to post the message to Struts user group rather than
individual e-mail's. With this, you have a possibility of getting inputs
from larger group rather than specific individual. 

-Original Message-
From: sarava...@elogic.co.in [mailto:sarava...@elogic.co.in] 
Sent: Thursday, December 10, 2009 10:34 AM
To: muthu.velap...@aspiresys.com
Subject: RE: Localization in struts 2

Hi Muthu,
 
   I would like to know about Localization in struts 2 with examples
. I tried from sample

code( Strut2i18n) it's working. In my application, Once the user select the
language. it will reflect
in all other jsp. Now it's working.. but need to change in browser settings.


  In action file,
 
request.getSession().setAttribute(org.apache.struts.Globals.LOCALE_KEY, new
java.util.Locale(fr,FR));

 Struts.xml,

action name=index class=com.kogent.IndexAction
interceptor-ref name=i18n/
interceptor-ref name=basicStack/
result name=successindex.jsp/result
/action

In Index.jsp, 
s:textfield name=username key=app.username size=15
labelposition=top /

  In other jsp,  I just copied the same code s:textfield
name=username key=app.username size=15 labelposition=top / , not
getting the actual result.


   Can  you provide some suggestion.


Muthu Velappan wrote:
 
 
 I agree with Vishnu if the project is small, say 20-25 Actions spread
 around
 3-5 packages for the entire project. If it goes beyond that I would
 include
 a properties file named package.properties for each package and split
 the
 internationalization text based on each packages. I believe this will be
 more manageable than having a single properties file with 1000's of
 line...
 
 ~Muthu
 
 -Original Message-
 From: Vishnu Vyasan Nelliparmbil [mailto:vis...@mun.gov.bh]  
 Sent: Monday, June 22, 2009 12:33 PM
 To: Struts Users Mailing List
 Subject: RE: Localization in struts 2
 
 
 
 The best way would be to keep the properties file in the root folder and
 pecify the path in struts-config.
 So that you don’t have to write for all the packages.
 
 Keep an another properties file with name filename_FR.properties for
 french  where you will define all the hindi properties.
 
 
 
 
 
 -Original Message-
 From: Johnson nickel [mailto:sarava...@elogic.co.in] 
 Sent: 22 June 2009 09:58
 To: user@struts.apache.org
 Subject: RE: Localization in struts 2
 
 
 
 Hi,
   I have tried the sample project 'Struts2i18n' it's working fine.
 But,
 in my application
 i have different packages like, com.company.model, com.company.pojo etc.,
 I need write properties file for all the packages. In
 struts.properties,whether, i need to define
 
 struts.custom.i18n.resources=com.kogent.ResourceBundle 
 struts.custom.i18n.resources=com.company.model
 struts.custom.i18n.resources=com.company.pojo 
 
 And one more thing,for ex, If user select hindi 
 index.action?request_locale=hi Hindi 
 
 i need to change all hindi text in throughout my application all the jsp
 pages. 
 Can you  give me suggestion
 
 
 
  
 
 Muthu Velappan wrote:
 
 I think if an app has to support internationalization then all text
 should
 be written from properties file and not through static images content.
 So,
 I
 would be remove images and try to get write all text from properties file
 only.
  
 For Dynamic Data Issue - I believe you fetch the content from database.
 If
 you want to show them also in hindi then you should maintain that in db
 as
 well. For example: you want show all countries in English as well hindi. 
 
 Then your countries table should be like this
 
 Countryidnamename_hi
 name_fr 
 1India Hindi Translated Content   French Translated
 content
 2UK   -do-   -do-
 3USA  -do-   -do-
 and so no...
 
 While fetching you have to pass the ISO language code along with request
 and
 fetch data from respective column. This is one way of solving your issue.
 I
 don’t know how much of dynamic content you want to show like this. If you
 have a very huge list then this would be a very difficult job to
 complete.
 
 Regards,
 Muthu
 
 -Original Message-
 From: Johnson

Exception while registering AnnotationValidationInterceptor Class in JBOSS 5.1.0 GA...

2009-12-07 Thread Muthu Velappan
Hi,

 

I got a weird issue in my test environment today. So far, we have been using
Tomcat 6.0.14 as our web server and everything works fine. Today, I moved
that to JBOSS 5.1.0 GA for testing purpose and I got an exception trace as
pasted below. It says that exception in registering
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor
class.  I don't understand why, I have the same jar files as used in tomcat
environment. Can anyone help me out on how to clear this issue? I'm using
Struts 2.1.2 for this project, If this problem is addressed in next version
for either struts or jboss, do let me know I will try to upgrade it too.

 

 

12:49:01,886 INFO  [STDOUT] 2009-12-08 12:49:01,870 ERROR
(CommonsLogger.java:error:28) - Caught Exception while registering
Interceptor class
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor

Caught Exception while registering Interceptor class
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor -
interceptor -
vfszip:/E:/BIS/JBOSS/jboss-5.1.0.GA/server/default/deploy/Gemini.war/WEB-INF
/lib/struts2-core-2.1.2.jar/struts-default.xml:143:127

  at
com.opensymphony.xwork2.ObjectFactory.buildInterceptor(ObjectFactory.java:20
0)

  at
com.google.inject.struts2.GuiceObjectFactory.superBuildInterceptor(GuiceObje
ctFactory.java:139)

  at
com.google.inject.struts2.GuiceObjectFactory$LazyLoadedInterceptor.getDelega
te(GuiceObjectFactory.java:156)

  at
com.google.inject.struts2.GuiceObjectFactory$LazyLoadedInterceptor.intercept
(GuiceObjectFactory.java:171)

  at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:230)

  at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:229)

  at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack
.java:456)

  at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati
on.java:227)

  at
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(Con
versionErrorInterceptor.java:124)

  at
com.google.inject.struts2.GuiceObjectFactory$LazyLoadedInterceptor.intercept
(GuiceObjectFactory.java:171)

  at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:230)

  at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:229)

  at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack
.java:456)

  at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati
on.java:227)

  at
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(St
aticParametersInterceptor.java:104)

  at
com.google.inject.struts2.GuiceObjectFactory$LazyLoadedInterceptor.intercept
(GuiceObjectFactory.java:171)

  at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:230)

  at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:229)

  at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack
.java:456)

  at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati
on.java:227)

  at
org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInt
erceptor.java:208)

  at
com.google.inject.struts2.GuiceObjectFactory$LazyLoadedInterceptor.intercept
(GuiceObjectFactory.java:171)

  at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:230)

  at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:229)

  at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack
.java:456)

  at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati
on.java:227)

  at
com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDr
ivenInterceptor.java:88)

  at
com.google.inject.struts2.GuiceObjectFactory$LazyLoadedInterceptor.intercept
(GuiceObjectFactory.java:171)

  at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:230)

  at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:229)

  at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack
.java:456)

  at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati
on.java:227)

  at
com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingIn
terceptor.java:130)

  at
com.google.inject.struts2.GuiceObjectFactory$LazyLoadedInterceptor.intercept
(GuiceObjectFactory.java:171)

  at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:230)

  at

RE: How to get the host name if proxy is configured

2009-11-23 Thread Muthu Velappan

Yes, what Robert said is perfect, you can't get the remote host name. 

If you so critical about that client information then you can some
Geographic location software's like this to find that out
http://www.ip2location.com/. In one of our POC, we used this to identify the
country where our user is residing. If somebody sitting in India using a
proxy server located is UK then this software show only UK. Beware of this.
Since the possibility of this is very rare, we neglected it.

~Muthu

-Original Message- 
From: Robert Graf-Waczenski [mailto:r...@lsoft.com] 
Sent: Monday, November 23, 2009 5:04 PM
To: Struts Users Mailing List
Subject: Re: How to get the host name if proxy is configured

Mageshwaran schrieb:
 Hi All,

 In my application, am using  request.getRemoteHost() to get the host 
 name where the client is running. But it is returning the proxy 
 address if configured instead of host address/ host name. Can any one 
 help me to solve this issue?

 Thanks in Advance,
 Magesh.


 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org



Short answer: You can't. A proxy by definition executes the request on
behalf of the client and can therefore completely mask the actual client
host address. There are, however, non-RFC-complient request headers that
you might query:

request.getHeader(x-forwarded-for)

But be warned: Many proxies don't supply this information correctly, so
you have to live with what getRemoteHost() gives you.

Robert



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org




-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: UI Issues in s:doubleselect Double Select control

2009-11-05 Thread Muthu Velappan

I think you are right. Let me try that and get back to you. All I need is to
add a new attribute to take the second label name...

Thanks,
Muthu


-Original Message-
From: Dale Newfield [mailto:d...@newfield.org] 
Sent: Friday, November 06, 2009 3:19 AM
To: Struts Users Mailing List
Subject: Re: UI Issues in s:doubleselect Double Select control

I would suggest modifying template/simple/doubleselect.ftl to do
what you need.

-Dale

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org




-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: Is there any way to apply break from a s:iterator tag.

2009-11-05 Thread Muthu Velappan
I added a JIRA ticket for this and here is the URL for future tracking.
https://issues.apache.org/struts/browse/WW-3317 

Let me try to get this enhancement done and update the patch there in next
couple of weeks. Thanks for your thoughts anyway.

~Muthu

-Original Message-
From: Dale Newfield [mailto:d...@newfield.org] 
Sent: Thursday, November 05, 2009 10:09 PM
To: Struts Users Mailing List
Subject: Re: Is there any way to apply break from a s:iterator tag.

Muthu Velappan wrote:
 I have a 1000 items in a collection and iterating it through s:iterator 
 tag. At certain point of time, I would like to break from the loop with
out
 proceeding further items. Is there any way to do this in struts tags
itself
 or should I use JSTL?

If you're so inclined, it would probably be pretty easy to add this 
functionality to the iterator tag, and I would guess that a patch with 
that functionality would probably be accepted fairly quickly (just add 
it to a JIRA ticket).  My first guess would be to add an attribute like 
break that gets evaluated each time through the loop, potentially 
terminating the iterator early (corner condition--make sure that it can 
abort correctly even before the first time through the loop body).

-Dale

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org




-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: Struts 2.1 book

2009-11-01 Thread Muthu Velappan
Wes,

I tried to get access to the MEAP Version lately but publisher site has
mentioned that it has been taken out of print. Can we know the status of
this book now, will it be published by some other vendor?

Regards,
Muthu

-Original Message-
From: Yanto [mailto:yantob...@gmail.com] 
Sent: Monday, April 20, 2009 8:51 AM
To: Struts Users Mailing List; w...@wantii.com
Subject: Re: Struts 2.1 book

thanks wes for the information...will try the MEAP version then

Rgds
Yanto

On Mon, Apr 20, 2009 at 9:55 AM, Wes Wannemacher w...@wantii.com wrote:

 On Sunday 19 April 2009 21:47:24 Yanto wrote:
  Hi,
 
  Just wondering currently is there any book that cover Struts 2.1 ?
  try to google but so far not found yet.
 
  Thanks  Regards
  Yanto

 Yes, my book is in the works and when published, it will cover 2.1. You
can
 find a link to it in my signature, but it is not published yet. You can
 purchase what the publisher calls the MEAP version which allows you to
read
 and review chapters as they come out... I haven't released any new
chapters
 in
 a while, but I have finally sorted things out that have kept me from the
 book,
 so I will be back to it real soon.

 -Wes

 --

 Wes Wannemacher
 Author - Struts 2 In Practice
 Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
 http://www.manning.com/wannemacher


 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org





-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: UI Issues in s:doubleselect Double Select control

2009-10-22 Thread Muthu Velappan

Hi, 

I'm not sure whether it reached the group... Can any one please give your
thoughts at least to the 1'st point. 

I'm stuck with this for about a week and yet to identify a good solution for
that

Thanks,
Muthu



Muthu Velappan wrote:
 
 Hi,
 
 I have used a Double Select control display Division  Sub-Divisions in my
 project. Everything works fine except two UI Issues.
 
 1.I’m unable to get separate labels for 2 Select box controls. It uses
 only single label. Is that a limitation, if so how to work-around it?
 2.I want to add an empty option to Second Control Sub-Division list to
 search items based on Selected Division alone. This doesn't work because,
 as soon as I select a value in the parent control child populates with all
 items.
 
 Can anyone provide some insights to clear these 2 issues? 
 
 For the second one, I think I can populate the second control list itself
 with an empty item but I would like to know is there any parameter
 available to add a empty option straight away in tag rather than this
 round about workaround?
 
 Thanks,
 Muthu
 
 

-- 
View this message in context: 
http://www.nabble.com/UI-Issues-in-%3Cs%3Adoubleselect%3E-Double-Select-control-tp25903866p26020595.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



UI Issues in s:doubleselect Double Select control

2009-10-15 Thread Muthu Velappan

Hi,

I have used a Double Select control display Division  Sub-Divisions in my
project. Everything works fine except two UI Issues.

1.  I’m unable to get separate labels for 2 Select box controls. It uses 
only
single label. Is that a limitation, if so how to work-around it?
2.  I want to add an empty option to Second Control Sub-Division list to
search items based on Selected Division alone. This doesn't work because, as
soon as I select a value in the parent control child populates with all
items.

Can anyone provide some insights to clear these 2 issues? 

For the second one, I think I can populate the second control list itself
with an empty item but I would like to know is there any parameter available
to add a empty option straight away in tag rather than this round about
workaround?

Thanks,
Muthu

-- 
View this message in context: 
http://www.nabble.com/UI-Issues-in-%3Cs%3Adoubleselect%3E-Double-Select-control-tp25903866p25903866.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: How to populate drop down from propery file in Struts html

2009-10-15 Thread Muthu Velappan


Try this one..

You can load the properties file in servlet using this line

URL url = servletContext.getResource(/WEB-INF/option.properties);
Properties props = new Properties().load(url.openStream());

Now you have all the key value pair from properties files into your
properties object. Prepare a collection object from this one and set it to
the request and use in jsp.

This is a quite a round about workaround but this will work for ur
requirement.

Thanks,
Muthu

-Original Message-
From: rajendar are [mailto:aare.rajen...@gmail.com] 
Sent: Thursday, October 15, 2009 12:34 PM
To: user@struts.apache.org
Subject: How to populate drop down from propery file in Struts html

Hi,

I want to populate drop down in my jsp(struts html) from property file.Still
I used property files for Action Fom properties and Messages.Please send if
any source code is there other wise please give me idea
1)how can i get the options list from property file to
HashMap/TreeMap/ArrayList in my Action

After that I will set this to my request and will call in jsp



Regards,
Rajendar



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Switching Action between different modules...

2009-09-23 Thread Muthu Velappan
Hi,

 

I have 3 different modules in my project and added that into struts.xml like
this

 

  !-- Membership module actions --

  include file=membership.xml /

  include file=home.xml /

  include file=admin.xml /

 

I got a feedback.jsp page in admin module. When user hit the cancel button
from this form, I want that to submit to home.action available in home
module.  Since I don't have the namespace option in submit button tag, this
is how I added this it in my submit button 

 

s:submit type=image src=../bis-images/button_send.png

  action=/home/HomeL align=right theme=simple / 

 

but it is not working. It throws the following exception. Can anyone please
let me know where I'm going wrong.


Struts Problem Report


Struts has detected an unhandled exception: 


Messages:

*  There is no Action mapped for namespace /admin and action name
/home/Home. 

  _  


Stacktraces


There is no Action mapped for namespace /admin and action name /home/Home. -
[unknown location] 

 
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:1
78)

 

Thanks,

Muthu



Switching Action between different modules in Struts 2.1.x...

2009-09-23 Thread Muthu Velappan

Hi,

I have 3 different modules in my project and added that into struts.xml like
this
  !-- Membership module actions --
  include file=membership.xml /
  include file=home.xml /
  include file=admin.xml /

I got a feedback.jsp page in admin module. When user hit the cancel button
from this form, I want that to submit to home.action available in home
module.  Since I don’t have the namespace option in submit button tag, this
is how I added this it in my submit button 

s:submit type=image src=../bis-images/button_send.png
  action=/home/HomeL align=right theme=simple / 

but it is not working. It throws the following exception. Can anyone please
let me know where I’m going wrong…

Struts Problem Report
Struts has detected an unhandled exception: 

Messages:
 ·  There is no Action mapped for namespace /admin and action name
/home/Home. 



Stacktraces
There is no Action mapped for namespace /admin and action name /home/Home. -
[unknown location] 
   
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:178)
 

Thanks,
Muthu

-- 
View this message in context: 
http://www.nabble.com/Switching-Action-between-different-modules-in-Struts-2.1.x...-tp25531036p25531036.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: Switching Action between different modules...

2009-09-23 Thread Muthu Velappan
Chris,

This is the content of my home.xml

package name=home namespace=/home
extends=propelj
action name=Home
class=com.asp.web.home.HomeAction
interceptor-ref name=defaultInsecureStack /
result name=input/membership/Home.jsp/result
/action
/package

It's namespace is /home where as admin.xml's namespace will be /admin and
that's where feedback.jsp related actions are configured.

~Muthu

-Original Message-
From: musom...@aol.com [mailto:musom...@aol.com] 
Sent: Wednesday, September 23, 2009 3:23 PM
To: user@struts.apache.org
Subject: Re: Switching Action between different modules...


 The name of the xml file is immaterial -- what is the namespace attribute
on the package you defined inside of home.xml?
I would use the config-browser to check that the configuration is what you
intended. 


 


Chris

 


 

-Original Message-
From: Muthu Velappan muthu.velap...@aspiresys.com
To: user@struts.apache.org
Sent: Wed, Sep 23, 2009 3:10 am
Subject: Switching Action between different modules...










Hi,

 

I have 3 different modules in my project and added that into struts.xml like
this

 

  !-- Membership module actions --

  include file=membership.xml /

  include file=home.xml /

  include file=admin.xml /

 

I got a feedback.jsp page in admin module. When user hit the cancel button
from this form, I want that to submit to home.action available in home
module.  Since I don't have the namespace option in submit button tag, this
is how I added this it in my submit button 

 

s:submit type=image src=../bis-images/button_send.png

  action=/home/HomeL align=right theme=simple / 

 

but it is not working. It throws the following exception. Can anyone please
let me know where I'm going wrong.


Struts Problem Report


Struts has detected an unhandled exception: 


Messages:

*  There is no Action mapped for namespace /admin and action name
/home/Home. 

  _  


Stacktraces


There is no Action mapped for namespace /admin and action name /home/Home. -
[unknown location] 

 
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:1
78)

 

Thanks,

Muthu




 




-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: Localization in struts 2

2009-06-22 Thread Muthu Velappan

I agree with Vishnu if the project is small, say 20-25 Actions spread around
3-5 packages for the entire project. If it goes beyond that I would include
a properties file named package.properties for each package and split the
internationalization text based on each packages. I believe this will be
more manageable than having a single properties file with 1000's of line...

~Muthu

-Original Message-
From: Vishnu Vyasan Nelliparmbil [mailto:vis...@mun.gov.bh]  
Sent: Monday, June 22, 2009 12:33 PM
To: Struts Users Mailing List
Subject: RE: Localization in struts 2



The best way would be to keep the properties file in the root folder and
pecify the path in struts-config.
So that you don’t have to write for all the packages.

Keep an another properties file with name filename_FR.properties for
french  where you will define all the hindi properties.





-Original Message-
From: Johnson nickel [mailto:sarava...@elogic.co.in] 
Sent: 22 June 2009 09:58
To: user@struts.apache.org
Subject: RE: Localization in struts 2



Hi,
  I have tried the sample project 'Struts2i18n' it's working fine. But,
in my application
i have different packages like, com.company.model, com.company.pojo etc.,
I need write properties file for all the packages. In
struts.properties,whether, i need to define

struts.custom.i18n.resources=com.kogent.ResourceBundle 
struts.custom.i18n.resources=com.company.model
struts.custom.i18n.resources=com.company.pojo 

And one more thing,for ex, If user select hindi 
index.action?request_locale=hi Hindi 

i need to change all hindi text in throughout my application all the jsp
pages. 
Can you  give me suggestion



 

Muthu Velappan wrote:
 
 I think if an app has to support internationalization then all text should
 be written from properties file and not through static images content. So,
 I
 would be remove images and try to get write all text from properties file
 only.
  
 For Dynamic Data Issue - I believe you fetch the content from database. If
 you want to show them also in hindi then you should maintain that in db as
 well. For example: you want show all countries in English as well hindi. 
 
 Then your countries table should be like this
 
 Countryid namename_hi
 name_fr 
 1 India Hindi Translated Content   French Translated
 content
 2 UK   -do-   -do-
 3 USA  -do-   -do-
 and so no...
 
 While fetching you have to pass the ISO language code along with request
 and
 fetch data from respective column. This is one way of solving your issue.
 I
 don’t know how much of dynamic content you want to show like this. If you
 have a very huge list then this would be a very difficult job to complete.
 
 Regards,
 Muthu
 
 -Original Message-
 From: Johnson nickel [mailto:sarava...@elogic.co.in] 
 Sent: Thursday, June 18, 2009 1:15 PM
 To: user@struts.apache.org
 Subject: RE: Localization in struts 2
 
 
 
 Thank you.. it's working fine. I have other issue.. in my application most

 of the places i used the images. I want to change images(like
 username,password) also in hindi. 
 
 And, using this method, i can display the text from properties file only.
 in
 my application
 i have some dynamic data to add some data..for that i need to display in
 hindi only..
 
 Can you me a suggestions it will be helpful for further work. I 'm using
 struts 2 framework.
 
 
 Muthu Velappan wrote:
 
 Try this...
 
 Take a copy of ur current properties file and name it as
 hinditext.txt(save
 it in UTF-8 format)
 
 Now open command prompt and go to your JAVA_HOME/bin folder and run
 this
 command 
 
 native2ascii -encoding UTF-8 full path of hinditext.txt file
 app_hi.properties
 
 Now rename this app_hi.properties file with respect to ur application
 properties file and copy to the required place. Restart the server you
 should be able to see the hindi text properly in browser.
 
 Hope this solves your problem.
 
 Thanks,
 Muthu
 
 -Original Message-
 From: Johnson nickel [mailto:sarava...@elogic.co.in] 
 Sent: Thursday, June 18, 2009 12:28 PM
 To: user@struts.apache.org
 Subject: Re: Localization in struts 2
 
 
 I have tried to copy the properties files text and opening in notepad
 while saving i had selected the encoding type as UTF-8. But still i'm not

 able to see the hindi text in browser.
 
 And in my jsp i have added ,
  %@ page language=java pageEncoding=utf-8
 contentType=text/html;charset=utf-8% 
 meta equiv=Content-Type content=text/html; charset=UTF-8
 
 
 
 Girish Naik wrote:
 
 Is the Hindi text specified in the file in UTF8 format? ie /u0092 etc.
 
 
 
 Regards,
 -
 Girish Naik
 Mobile:-+91-09740091638
 girish.n...@gmail.com
 
 Mitch
 Hedberghttp://www.brainyquote.com/quotes/authors/m/mitch_hedberg.html
 - I drank some boiling water because I wanted to whistle.
 
 On Thu

RE: Localization in struts 2

2009-06-18 Thread Muthu Velappan
Try this...

Take a copy of ur current properties file and name it as hinditext.txt(save
it in UTF-8 format)

Now open command prompt and go to your JAVA_HOME/bin folder and run this
command 

native2ascii -encoding UTF-8 full path of hinditext.txt file
app_hi.properties

Now rename this app_hi.properties file with respect to ur application
properties file and copy to the required place. Restart the server you
should be able to see the hindi text properly in browser.

Hope this solves your problem.

Thanks,
Muthu

-Original Message-
From: Johnson nickel [mailto:sarava...@elogic.co.in] 
Sent: Thursday, June 18, 2009 12:28 PM
To: user@struts.apache.org
Subject: Re: Localization in struts 2


I have tried to copy the properties files text and opening in notepad
while saving i had selected the encoding type as UTF-8. But still i'm not 
able to see the hindi text in browser.

And in my jsp i have added ,
 %@ page language=java pageEncoding=utf-8
contentType=text/html;charset=utf-8% 
meta equiv=Content-Type content=text/html; charset=UTF-8



Girish Naik wrote:
 
 Is the Hindi text specified in the file in UTF8 format? ie /u0092 etc.
 
 
 
 Regards,
 -
 Girish Naik
 Mobile:-+91-09740091638
 girish.n...@gmail.com
 
 Mitch
 Hedberghttp://www.brainyquote.com/quotes/authors/m/mitch_hedberg.html
 - I drank some boiling water because I wanted to whistle.
 
 On Thu, Jun 18, 2009 at 10:45 AM, Johnson nickel
 sarava...@elogic.co.inwrote:
 

 Hi all,

I have tried the Struts2i18n sample project it's working fine. But
 i
 need to
 implement local language in the same manner. I have created
 ResourceBundle_Hi.properties for
 hindi language. I had specified the hindi text in this file. when i try
 to
 execute the application
 it shows some नाम: or ???. It's not actually taken the proper
 file.Give me a suggestions for this
 issue
 --
 View this message in context:
 http://www.nabble.com/Localization-in-struts-2-tp24086510p24086510.html
 Sent from the Struts - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org


 
 

-- 
View this message in context:
http://www.nabble.com/Localization-in-struts-2-tp24086510p24087439.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org







-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: Localization in struts 2

2009-06-18 Thread Muthu Velappan
I think if an app has to support internationalization then all text should
be written from properties file and not through static images content. So, I
would be remove images and try to get write all text from properties file
only.
 
For Dynamic Data Issue - I believe you fetch the content from database. If
you want to show them also in hindi then you should maintain that in db as
well. For example: you want show all countries in English as well hindi. 

Then your countries table should be like this

Countryid   namename_hi
name_fr 
1   India Hindi Translated Content   French Translated
content
2   UK   -do-   -do-
3   USA  -do-   -do-
and so no...

While fetching you have to pass the ISO language code along with request and
fetch data from respective column. This is one way of solving your issue. I
don’t know how much of dynamic content you want to show like this. If you
have a very huge list then this would be a very difficult job to complete.

Regards,
Muthu

-Original Message-
From: Johnson nickel [mailto:sarava...@elogic.co.in] 
Sent: Thursday, June 18, 2009 1:15 PM
To: user@struts.apache.org
Subject: RE: Localization in struts 2



Thank you.. it's working fine. I have other issue.. in my application most 
of the places i used the images. I want to change images(like
username,password) also in hindi. 

And, using this method, i can display the text from properties file only. in
my application
i have some dynamic data to add some data..for that i need to display in
hindi only..

Can you me a suggestions it will be helpful for further work. I 'm using
struts 2 framework.


Muthu Velappan wrote:
 
 Try this...
 
 Take a copy of ur current properties file and name it as
 hinditext.txt(save
 it in UTF-8 format)
 
 Now open command prompt and go to your JAVA_HOME/bin folder and run this
 command 
 
 native2ascii -encoding UTF-8 full path of hinditext.txt file
 app_hi.properties
 
 Now rename this app_hi.properties file with respect to ur application
 properties file and copy to the required place. Restart the server you
 should be able to see the hindi text properly in browser.
 
 Hope this solves your problem.
 
 Thanks,
 Muthu
 
 -Original Message-
 From: Johnson nickel [mailto:sarava...@elogic.co.in] 
 Sent: Thursday, June 18, 2009 12:28 PM
 To: user@struts.apache.org
 Subject: Re: Localization in struts 2
 
 
 I have tried to copy the properties files text and opening in notepad
 while saving i had selected the encoding type as UTF-8. But still i'm not 
 able to see the hindi text in browser.
 
 And in my jsp i have added ,
  %@ page language=java pageEncoding=utf-8
 contentType=text/html;charset=utf-8% 
 meta equiv=Content-Type content=text/html; charset=UTF-8
 
 
 
 Girish Naik wrote:
 
 Is the Hindi text specified in the file in UTF8 format? ie /u0092 etc.
 
 
 
 Regards,
 -
 Girish Naik
 Mobile:-+91-09740091638
 girish.n...@gmail.com
 
 Mitch
 Hedberghttp://www.brainyquote.com/quotes/authors/m/mitch_hedberg.html
 - I drank some boiling water because I wanted to whistle.
 
 On Thu, Jun 18, 2009 at 10:45 AM, Johnson nickel
 sarava...@elogic.co.inwrote:
 

 Hi all,

I have tried the Struts2i18n sample project it's working fine.
 But
 i
 need to
 implement local language in the same manner. I have created
 ResourceBundle_Hi.properties for
 hindi language. I had specified the hindi text in this file. when i try
 to
 execute the application
 it shows some नाम: or ???. It's not actually taken the proper
 file.Give me a suggestions for this
 issue
 --
 View this message in context:
 http://www.nabble.com/Localization-in-struts-2-tp24086510p24086510.html
 Sent from the Struts - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org


 
 
 
 -- 
 View this message in context:
 http://www.nabble.com/Localization-in-struts-2-tp24086510p24087439.html
 Sent from the Struts - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org
 
 
 
 
 
 
 
 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org
 
 
 

-- 
View this message in context:
http://www.nabble.com/Localization-in-struts-2-tp24086510p24088035.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org

RE: Localization in struts 2

2009-06-18 Thread Muthu Velappan

We just now completed working on SWING project which supports 5 Indian
Languages along with English (Indic Scripts like Tamil, Malayalam, Telugu,
Hindi, Bengali etc..). So, I don't see any problem in getting that to work
in Java with any framework. As Dave said, it was a confusion b/w I18N O/P
and encoding only. 

Regards,
Muthu

-Original Message-
From: Dave Newton [mailto:newton.d...@yahoo.com] 
Sent: Friday, June 19, 2009 5:25 AM
To: Struts Users Mailing List
Subject: Re: Localization in struts 2

Martin Gainty wrote:
 the lang lookup algorithm uses the provided locale to lookup the
accompanying text string
 romance and germanic languages come from the common EUROPEAN base which
originate from single byte character set(s)
 converting to other languages employing Double Byte Character becomes
problematic as representation for each character now takes 16 bits
 this means that every component,application and bean on the application
stack which will lookup that string needs to support DBCS 
 ALSO persisting DBCS information to a Database would require your DB to
support DBCS types such as NCHAR,NINTEGER and NVARCHAR
 
 Moreover the architects of J2SE left out Hindi support so you will
definitely have your work cut out for you
 http://java.sun.com/javase/6/docs/technotes/guides/intl/encoding.doc.html

AFAICT you're confusing I18N output with file encoding.

 I would stick with Single Byte Character Set business languages such as
german, french, spanish and italian

Come on... there are tons of multi-byte Java apps. Not to mention that 
the OP has stated that it's working:

http://www.mail-archive.com/user@struts.apache.org/msg89237.html

Dave

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org







-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: creating list in dropdown using struts

2009-04-20 Thread Muthu Velappan
I don't think there is any way to get both label and text from select box in
request option. You will get only the value specified in option tag. I
believe in ur case, ID is the value in option tag and that's the reason u
get Id back in action during postback...

There is couple of workaround's to overcome this. I think this is how ur
select tag will look like now

Select name=cmbNames
Option value=1John/Option
Option value=2Mark/Option 
Option value=3Carrie/Option   
/Select

So when you call request.getParameter(cmbNames), you will get the id of
the selected name. If John is selected, it will be 1.

Workaround:

Option 1: With this Id value 1, you can call a helper class/method to
retrive the name. This is the correct approach in most of the cases.

Option 2: While building the data in combo box itself build a parameter
which hold both Id  Name with some separator like | or ^. 

For ex, this is how you should build ur List,

ArrayList  LabelValueBean  list = new ArrayList LabelValueBean (5);
list.add(new LabelValueBean(1|John,John));
list.add(new LabelValueBean(2|Mark,Mark));
list.add(new LabelValueBean(3|Carrie,Carrie));

Now, label value bean contains both id  name in one property itself, set
that to option tag's value. So, your new select tag would be like this

Select name=cmbNames
Option value=1|JohnJohn/Option
Option value=2|MarkMark/Option
Option value=3|CarrieCarrie/Option
/Select

Now, when you call request.getParameter(cmbNames) on post back, you will
get the value of the selected name. If John is selected, it will be
1|John, split that content u will get both id and name of selected option.
This is crooked but works fine for small apps.

Hope this helps you.

~Muthu

-Original Message-
From: kunla [mailto:manish.mnit1...@gmail.com] 
Sent: Monday, April 20, 2009 11:45 AM
To: user@struts.apache.org
Subject: creating list in dropdown using struts



 creating list in dropdown using struts :

In action class
list.add(new LabelValueBean(ID,Name));

In Jsp
logic:present name=list scope=session
td align=left*nbsp;Select Item/td
td
html:select  property=selectedItem
html:option value=-1Select/html:option
html:options collection=list property=label labelProperty=value /
/html:select
/td
/tr
tr/tr
/logic:present 

In Form :
getter and setter for selectedItem.

query : Now I want to retrieve ID and Name both in action class.I am able to
retrieve ID,But i want to retrieve both. 

-- 
View this message in context:
http://www.nabble.com/creating-list-in-dropdown-using-struts-tp23130937p2313
0937.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org




-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: Struts Action Issue

2009-04-09 Thread Muthu Velappan
Out of curiosity, I gave the same value in my application and tested, I got
the exact junk back in my action not even a truncated one. So, please check
whether ur action bypasses only this kind of string or even valid string
like test or sample. If it doesn't show valid string then there is
problem with view file field name and action variable name. If valid strings
are working fine and only this kind of string seems to be a problem then
please generate the issue in a small testcase and send it across. 

Thanks,
Muthu

-Original Message-
From: riya [mailto:rachan...@gmail.com] 
Sent: Thursday, April 09, 2009 2:33 AM
To: user@struts.apache.org
Subject: Struts Action Issue


Hi, 

Recently I observed that if in JSP input text I have entered special
characters, lets say: 

displayIDNumber:  #...@#%$!#$%!(*)*()*(

In the action I get displayIDNumber as  i.e empty string. 

Nowhere in the code we are explicitly emptying the string whenever there are
special characters in the input string. 

I puzzled. Can someone please clarify? 

Thanks in advance!!
-- 
View this message in context:
http://www.nabble.com/Struts-Action-Issue-tp22959505p22959505.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org




-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Freemarker in JSP

2009-04-09 Thread Muthu Velappan

Struts 2's default markup language is Freemarker and all themes are written
in this language only. Your view is using this tag s:select
name=permissionlevel list=%{permissionlevel} theme=simple/ right, in
that look at the theme=simple attribute, these are written in freemarker
only. Its shipped as part ur jar. 

Now, coming to ur error. I think ur permissionlevel variable in action is
not properly populated and that's the reason why u get this error. Please
check where u populate this variable, if that is in input() or execute()
method change the location to prepare() method as mentioned in this link 
http://struts.apache.org/2.1.6/docs/how-do-we-repopulate-controls-when-validation-fails.html
Select/List control re-population issues  and then re-test code...
-- 
View this message in context: 
http://www.nabble.com/Freemarker-in-JSP-tp22965569p22969478.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: what is the equivalent of method in struts 2 for retrieve data?

2009-04-09 Thread Muthu Velappan

Have u checked this http://struts.apache.org/2.0.14/docs/iterator.html

~Muthu

-Original Message-
From: john lee [mailto:sh_thorn_b...@yahoo.com] 
Sent: Thursday, April 09, 2009 1:37 AM
To: user@struts.apache.org
Subject: what is the equivalent of method in struts 2 for retrieve data?

in struts 1, i saved the data into session
  session.setAttribute(BeanNames.PARTS_LIST,partsList);
  then, in the jsp file, retrieve the data by 
  logic:iterate id=plist name=partslist scope=session
type=neuco.PartForm
 
what is the equivalent method in struts 2?
 
tks in advance
 
john


  



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: [s2] Using UTF-8 in .properties files

2009-04-09 Thread Muthu Velappan
Christian,

You can create a properties file with display text in required language
itself like 

Newkey.label1 = Gracias
...
...

Save it to somefile.txt and then call native2ascii program in
JAVA_HOME/bin folder to convert the contents to appropriate Unicode
characters and save the file with appropriate properties file naming
convention. In the example, it will be somefile_es.properties.

You can also automate this file generation build script too. Hope this
helps.

~Muthu

-Original Message-
From: Charlesmel Carino [mailto:charlesmel1...@yahoo.com] 
Sent: Thursday, April 09, 2009 7:46 PM
To: Struts Users Mailing List
Cc: Rommel Garcia
Subject: Re: [s2] Using UTF-8 in .properties files

Hi Christian,

There are two sides of the story here. 

One is to type those UTF-8 characters onto your properties file (probably
several combination of key strokes) and make sure that file editor you are
using
is configured for encoding UTF-8.

The other is ensuring your code to read UTF-8 encoded files. If that is not
happening then your characters get funky.

Rommel




From: Cristian Peraferrer corellia...@gmail.com
To: user@struts.apache.org
Sent: Thursday, April 9, 2009 5:28:29 AM
Subject: [s2] Using UTF-8 in .properties files

Hi,

How I can use UTF-8 in the .properties files? (I need the .properties files
for i18n, so loggically I will need characters other than the contained in
ASCII or latin1).

Thanks,
Cristian.

--GPG Key-ID: 0x564903FA - Jabber ID: corellian at swissjabber.ch


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Change single .properties file to one .properties file for every JSP

2009-04-08 Thread Muthu Velappan

I believe the question is more about whether any tool available to split his
current bulk properties into a small package/action specific properties. I
think there is no tool to do that, It has to be manually split into
different properties file based on either package or action class as
specified by Terry..

~Muthu


Terry Gardner-2 wrote:
 
 .properties file can be looked up based on the current Action, or a  
 hierarchy is used to search for a key. If the Action is named  
 EnterEmployeeAction, then the .properties files are all preceded by  
 EnterEmployeeAction, viz, EnterEmployeeAction_en.properties, and so  
 forth. There is also a package.properties file for an entire package,  
 and global properties that can be configured in struts.xml:
 
 constant name=struts.custom.i18n.resources value=globalMessages /
 
 The above can also be a list:
 
 constant name=struts.custom.i18n.resources  
 value=globalMessages,moreGlobalMessages /
 
 
 On Apr 8, 2009, at 6:54 AM, walki2 wrote:
 

 Hi,

 I am new to Struts. I have a website that uses Struts (.properties  
 files) to
 show the website's content in either english, french or german.

 SomeFileName.properties
 SomeFileName_en.properties
 SomeFileName_fr.properties
 SomeFileName_de.properties

 Unfortunately all the text is stored in one big properties file!! Is  
 there
 an easy way to make a .properties file for every jsp? Or do I have  
 to make
 it manually using copy and paste for about 80 JSP's?

 Greetings,
 walki2
 -- 
 View this message in context:
 http://www.nabble.com/Change-single-.properties-file-to-one-.properties-file-for-every-JSP-tp22947889p22947889.html
 Sent from the Struts - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org

 
 
 ==
 
 
 terry.gard...@sun.com
 Blog: http://blogs.sun.com/terrygardner
 Blog: http://dtfar.blogspot.com
 Twitter: http://twitter.com/tgardner
 SLAMD: http://slamd2.dev.java.net
 
 ”The knights are dust, and their good swords rust”
 
 
 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Change-single-.properties-file-to-one-.properties-file-for-every-JSP-tp22947889p22948309.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: html:base tag doubt

2009-04-07 Thread Muthu Velappan
Hi,

html:base tag will always be rendered with href attribute. This will by
default add href attribute pointing to the absolute location of the
enclosing JSP page. I believe list.jsp is the enclosing page in ur case. 

If you want to change that then u should use optional ref attribute with
either page or site has values. If u put page then it will add href
pointing to enclosing page which is default and happening to u now. If
site is used then base url of the site is added (for eg: html:base
ref=site target=_self/ will add base href=https://abc.com/...;
target=_self) 

First of all, why does u want to use a base tag without any href value? You
can simply remove the tag itself, isn't it?

Regards,
Muthu

-Original Message-
From: sugany...@tcs.com [mailto:sugany...@tcs.com] 
Sent: Wednesday, April 08, 2009 7:56 AM
To: user@struts.apache.org
Subject: html:base tag doubt

Hi,

In my JSP page I am setting the base target value in the header .

 html:base target=_self/

I am not setting the Href value anywhere in my application. But when I run 
the application I checked the source for that JSP page. the base tag have 
2 attributes href and target.

base href=https://abc.com/Ebooks/./common/List.jsp; target=_self 

By default will it assign any value to the href field if yes How it is 
doing that ?

Please help me.


Thanks,
Suganya C
=-=-=
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you





-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: hidden data

2009-04-06 Thread Muthu Velappan

How to send data to action without displaying it in form? Is that your
question?If yes, then u can use s:hidden field to hold the data and post
it back to the action, right?

If this is not what you intent, please explain ur issue a bit detail..
 
~Muthu


PEGASUS84 wrote:
 
 good moorning;
 i've a question: can I send an hidden String with link to an action?
 i don't want that on query string there is the value of my string
 

-- 
View this message in context: 
http://www.nabble.com/hidden-data-tp22905294p22905606.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: checkboxlist

2009-03-26 Thread Muthu Velappan

s:checkboxlist required=true key=permissions list=activePermissions
value=permissions name=permissions
s:param name=rowstyle value=%{'row31'} /
/s:checkboxlist
 

list=activePermissions hold the entire collection holding MapPermission
Id, Perimssion Name.
value=permissions holds the SetPermission Id that are applicable for
this user. 

So, you can assume it like this.. The set you provide in list will get
rendered as checkboxes and set in value will be used to check the rendered
textboxes.

Hope this helps you...

~Muthu.
-Original Message-
From: sandy.verfai...@roularta.be [mailto:sandy.verfai...@roularta.be] 
Sent: Tuesday, March 24, 2009 3:53 PM
To: user@struts.apache.org
Subject: checkboxlist

Hi,
 
Can anyone tell me how I can make a checkboxlist on my jsp that knows
which checkbox should be checked and which not.
I have my list of objects with three strings.
string1: name (label for the checkbox)
string2: key (value that identifies which object is checked)
string3: true or false (that says if that checkbox should already be
checked)
 
But for the checkboxlist tag I see only the listValue and listKey
parameters that write a property of the object.
All the other properties are not dependent on the object of the list..
 
Thx,



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: Dojo plugin deprecated on Struts 2.1: why ?

2009-03-23 Thread Muthu Velappan

I'm not sure on the reason for deprecation. From the recent post, I
understand that JQuery has replaced DOJO...

~Muthu

-Original Message-
From: cel...@yahoo.com [mailto:cel...@yahoo.com] 
Sent: Tuesday, March 24, 2009 9:42 AM
To: user@struts.apache.org
Subject: Dojo plugin deprecated on Struts 2.1: why ?

hi,
I just read that the Dojo plugin will be deprecated on Struts 2.1

http://struts.apache.org/2.1.6/docs/ajax-tags.html

I have two main questions about that : 
1) What is the reason ? Is it because it is slow ?
2) Will it be replaced by another Javascript library ?

Please let us know. 
Thanks



  



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: org.apache.jasper.JasperException: tag 'select', field 'list', name 'fieldTypeID'

2009-03-15 Thread Muthu Velappan

Thanks Greg, that tutorial helped me a lot... I cleared the issue by using
Prepare Interceptor and everything works fine now... I'm still not that much
clear on resolving the issue with s:action tag but I will look into that a
little later...

Thanks again to u  chris for giving ur inputs

~Muthu 


Greg Lindholm wrote:
 
 Have you looked at this?
 
 http://struts.apache.org/2.1.6/docs/how-do-we-repopulate-controls-when-validation-fails.html
 
 
 
 Muthu Velappan wrote:
 
 Thanks for the reply, Chris.. 
 
 My problem is that in there is no two separate actions for loading and
 submitting the data back from this JSP.. To be precise, while loading the
 page it will use the input() method where as while submitting it will use
 the execute() method in my Action class
 
 Actual headache when the validator throws error, the control will not
 even come to execute() method and I believe that's correct. Hence, it
 throws the error. 
 
 Can you please eloborate this point in ur mail.. 
 create a small action that gives you the Map and use the s:action tag
 as you populate the select
  
 I believe this will clear my issue but right now I don't know how to
 implement this.. Since, I'm new to this Struts development, If you could
 just point me to any tutorial or sample that would be great...
 
 Thanks
 ~Muthu
 
 
 musomesa wrote:
 
 Looks like your JSP pulls the data from one action, which I will call A,
 and posts to another action, EditField. 
 When there is an error you are bounced back to the JSP (assuming 'input'
 leads back to this JSP but 
 now the JSP is trying to populate the select from a property called
 fieldTypeMap on EditField instead of fieldTypeMap on A.
  There is probably no such property on EditField and so it gives you the
 stacktrace.
 
 Quick and dirty solution is to create such a propertyon the EditField
 action. If you want to avoid code duplication you could
 create a small action that gives you the Map and use the s:action tag
 as you populate the select.
 
 Cheers
 Chris aka musomesa
 
 
 
 
 -Original Message-
 From: Muthu Velappan muthu.velap...@aspiresys.com
 To: user@struts.apache.org
 Sent: Fri, 13 Mar 2009 2:12 pm
 Subject: org.apache.jasper.JasperException: tag 'select', field 'list',
 name 'fieldTypeID'
 
 
 
 
 Hi,
 
 I have a JSP page containing data like this...
 
 s:form name=form1 theme=qxhtml
 s:bean name=java.util.HashMap id=qTableLayout
 s:param name=tablecolspan value=%{2} /
 /s:bean
 s:textfield name=fieldName required=true
 key=fieldmgmt.fieldname
 s:param name=rowstyle value=%{'row21'} /
 /s:textfield
 s:textfield name=displayName required=true
 key=fieldmgmt.displayname
 s:param name=rowstyle value=%{'row31'} /
 /s:textfield
 s:select list=fieldTypeMap
 name=fieldTypeID key=fieldmgmt.fieldtype
 s:param name=rowstyle value=%{'row31'} /
 /s:select
 s:submit value=Save Changes align=center
 cssClass=buttonstyle1
 action=EditField
 s:param name=rowstyle value=%{'row31'} /
 /s:submit
 /s:form   
 
 this page works fine in first load.. However, I end up getting problem
 when
 there is any validation error occured fieldname or displayname fields.
 The
 select box values are not loaded properly in this case, It shows a big
 stack
 trace like the one shown below. I found that map is not loaded back in
 this
 Validator error loop but I don't know how to fix this.. Can any one
 throw
 some light on how to clear this out...
 
 SEVERE: Servlet.service() for servlet jsp threw exception
 tag 'select', field 'list', name 'fieldTypeID': The requested list key
 'fieldTypeMap' could not be resolved as a
 collection/array/map/enumeration/iterator type. Example: people or
 people.{name} - [unknown location]
 at
 org.apache.struts2.components.Component.fieldError(Component.java:230)
 at
 org.apache.struts2.components.Component.findValue(Component.java:292)
 at
 org.apache.struts2.components.ListUIBean.evaluateExtraParams(ListUIBean.java:80)
 at
 org.apache.struts2.components.Select.evaluateExtraParams(Select.java:105)
 at
 org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:858)
 at org.apache.struts2.components.UIBean.end(UIBean.java:509)
 at
 org.apache.struts2.views.j
 sp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)
 
 
 2009-03-13 10:16:04,002 ERROR (CommonsLogger.java:error:28) - 
 java.security.PrivilegedActionException:
 org.apache.jasper.JasperException:
 tag 'select', field 'list', name 'fieldTypeID': The requested list key
 'fieldTypeMap' could not be resolved as a
 collection/array/map/enumeration/iterator type. Example: people or
 people.{name} - [unknown location]
 at java.security.AccessController.doPrivileged(Native Method)
 at javax.security.auth.Subject.doAs(Subject.java:396)
 at
 com.aspire.propel.web.membership.SecurityInterceptor.intercept(SecurityInterceptor.java:49

Re: org.apache.jasper.JasperException: tag 'select', field 'list', name 'fieldTypeID'

2009-03-13 Thread Muthu Velappan

Thanks for the reply, Chris.. 

My problem is that in there is no two separate actions for loading and
submitting the data back from this JSP.. To be precise, while loading the
page it will use the input() method where as while submitting it will use
the execute() method in my Action class

Actual headache when the validator throws error, the control will not even
come to execute() method and I believe that's correct. Hence, it throws the
error. 

Can you please eloborate this point in ur mail.. 
create a small action that gives you the Map and use the s:action tag as
you populate the select
 
I believe this will clear my issue but right now I don't know how to
implement this.. Since, I'm new to this Struts development, If you could
just point me to any tutorial or sample that would be great...

Thanks
~Muthu


musomesa wrote:
 
 Looks like your JSP pulls the data from one action, which I will call A,
 and posts to another action, EditField. 
 When there is an error you are bounced back to the JSP (assuming 'input'
 leads back to this JSP but 
 now the JSP is trying to populate the select from a property called
 fieldTypeMap on EditField instead of fieldTypeMap on A.
  There is probably no such property on EditField and so it gives you the
 stacktrace.
 
 Quick and dirty solution is to create such a propertyon the EditField
 action. If you want to avoid code duplication you could
 create a small action that gives you the Map and use the s:action tag as
 you populate the select.
 
 Cheers
 Chris aka musomesa
 
 
 
 
 -Original Message-
 From: Muthu Velappan muthu.velap...@aspiresys.com
 To: user@struts.apache.org
 Sent: Fri, 13 Mar 2009 2:12 pm
 Subject: org.apache.jasper.JasperException: tag 'select', field 'list',
 name 'fieldTypeID'
 
 
 
 
 Hi,
 
 I have a JSP page containing data like this...
 
 s:form name=form1 theme=qxhtml
 s:bean name=java.util.HashMap id=qTableLayout
 s:param name=tablecolspan value=%{2} /
 /s:bean
 s:textfield name=fieldName required=true
 key=fieldmgmt.fieldname
 s:param name=rowstyle value=%{'row21'} /
 /s:textfield
 s:textfield name=displayName required=true
 key=fieldmgmt.displayname
 s:param name=rowstyle value=%{'row31'} /
 /s:textfield
 s:select list=fieldTypeMap
 name=fieldTypeID key=fieldmgmt.fieldtype
 s:param name=rowstyle value=%{'row31'} /
 /s:select
 s:submit value=Save Changes align=center cssClass=buttonstyle1
 action=EditField
 s:param name=rowstyle value=%{'row31'} /
 /s:submit
 /s:form   
 
 this page works fine in first load.. However, I end up getting problem
 when
 there is any validation error occured fieldname or displayname fields. The
 select box values are not loaded properly in this case, It shows a big
 stack
 trace like the one shown below. I found that map is not loaded back in
 this
 Validator error loop but I don't know how to fix this.. Can any one throw
 some light on how to clear this out...
 
 SEVERE: Servlet.service() for servlet jsp threw exception
 tag 'select', field 'list', name 'fieldTypeID': The requested list key
 'fieldTypeMap' could not be resolved as a
 collection/array/map/enumeration/iterator type. Example: people or
 people.{name} - [unknown location]
 at
 org.apache.struts2.components.Component.fieldError(Component.java:230)
 at
 org.apache.struts2.components.Component.findValue(Component.java:292)
 at
 org.apache.struts2.components.ListUIBean.evaluateExtraParams(ListUIBean.java:80)
 at
 org.apache.struts2.components.Select.evaluateExtraParams(Select.java:105)
 at
 org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:858)
 at org.apache.struts2.components.UIBean.end(UIBean.java:509)
 at
 org.apache.struts2.views.j
 sp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)
 
 
 2009-03-13 10:16:04,002 ERROR (CommonsLogger.java:error:28) - 
 java.security.PrivilegedActionException:
 org.apache.jasper.JasperException:
 tag 'select', field 'list', name 'fieldTypeID': The requested list key
 'fieldTypeMap' could not be resolved as a
 collection/array/map/enumeration/iterator type. Example: people or
 people.{name} - [unknown location]
 at java.security.AccessController.doPrivileged(Native Method)
 at javax.security.auth.Subject.doAs(Subject.java:396)
 at
 com.aspire.propel.web.membership.SecurityInterceptor.intercept(SecurityInterceptor.java:49)
 at
 com.google.inject.struts2.GuiceObjectFactory$LazyLoadedInterceptor.intercept(GuiceObjectFactory.java:171)
 at
 com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
 at
 com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
 at
 com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:456)
 at
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227

org.apache.jasper.JasperException: tag 'select', field 'list', name 'fieldTypeID'

2009-03-12 Thread Muthu Velappan

Hi,

I have a JSP page containing data like this...

s:form name=form1 theme=qxhtml
s:bean name=java.util.HashMap id=qTableLayout
s:param name=tablecolspan value=%{2} /
/s:bean
s:textfield name=fieldName required=true key=fieldmgmt.fieldname
s:param name=rowstyle value=%{'row21'} /
/s:textfield
s:textfield name=displayName required=true
key=fieldmgmt.displayname
s:param name=rowstyle value=%{'row31'} /
/s:textfield
s:select list=fieldTypeMap
name=fieldTypeID key=fieldmgmt.fieldtype
s:param name=rowstyle value=%{'row31'} /
/s:select
s:submit value=Save Changes align=center cssClass=buttonstyle1
action=EditField
s:param name=rowstyle value=%{'row31'} /
/s:submit
/s:form   

this page works fine in first load.. However, I end up getting problem when
there is any validation error occured fieldname or displayname fields. The
select box values are not loaded properly in this case, It shows a big stack
trace like the one shown below. I found that map is not loaded back in this
Validator error loop but I don't know how to fix this.. Can any one throw
some light on how to clear this out...

SEVERE: Servlet.service() for servlet jsp threw exception
tag 'select', field 'list', name 'fieldTypeID': The requested list key
'fieldTypeMap' could not be resolved as a
collection/array/map/enumeration/iterator type. Example: people or
people.{name} - [unknown location]
at 
org.apache.struts2.components.Component.fieldError(Component.java:230)
at org.apache.struts2.components.Component.findValue(Component.java:292)
at
org.apache.struts2.components.ListUIBean.evaluateExtraParams(ListUIBean.java:80)
at
org.apache.struts2.components.Select.evaluateExtraParams(Select.java:105)
at org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:858)
at org.apache.struts2.components.UIBean.end(UIBean.java:509)
at
org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)


2009-03-13 10:16:04,002 ERROR (CommonsLogger.java:error:28) - 
java.security.PrivilegedActionException: org.apache.jasper.JasperException:
tag 'select', field 'list', name 'fieldTypeID': The requested list key
'fieldTypeMap' could not be resolved as a
collection/array/map/enumeration/iterator type. Example: people or
people.{name} - [unknown location]
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at
com.aspire.propel.web.membership.SecurityInterceptor.intercept(SecurityInterceptor.java:49)
at
com.google.inject.struts2.GuiceObjectFactory$LazyLoadedInterceptor.intercept(GuiceObjectFactory.java:171)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:456)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)
at
com.aspire.propel.transaction.TransactionActionInterceptor$1.executeTransaction(TransactionActionInterceptor.java:58)
at
com.aspire.propel.transaction.TransactionManager.executeTransaction(TransactionManager.java:82)
at
com.aspire.propel.transaction.TransactionActionInterceptor.intercept(TransactionActionInterceptor.java:54)
at
com.google.inject.struts2.GuiceObjectFactory$LazyLoadedInterceptor.intercept(GuiceObjectFactory.java:171)


at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.jasper.JasperException: tag 'select', field 'list',
name 'fieldTypeID': The requested list key 'fieldTypeMap' could not be
resolved as a collection/array/map/enumeration/iterator type. Example:
people or people.{name} - [unknown location]
at
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:541)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:435)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
...
...
... 61 more


Advance Thanks for any help..

~Muthu
-- 
View this message in context: 
http://www.nabble.com/org.apache.jasper.JasperException%3A-tag-%27select%27%2C-field-%27list%27%2C-name-%27fieldTypeID%27-tp22490368p22490368.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional