How to compare string reference variables using ognl?

2011-12-12 Thread mohan rao
Please delete my previous thread my query was not posted completely. s:set var=selectedOffer value=%{offers.dicountkey}/ s:iterator var =entry value = #session.eligibleEcOffersMap s:set var=queryString value=%{#entry.key}/ T/Fs:property value=selectedOffer.equals(queryString)/ Nothing is

Re: How to compare string reference variables using ognl?

2011-12-12 Thread mohan rao
s:set var=selectedOffer value=%{ecOffers.dicountKey}/ s:iterator var =entry value = #session.discountOffers s:set var=queryString value=%{#entry.key}/ s:property value=selectedOffer.equals(queryString)/ It supposed to print true or false. But not printing any value s:property

Re: How to compare string reference variables using ognl?

2011-12-12 Thread Eric Lentz
When you use a value from the set tag you'll need to prefix with the '#' as per the documentation [1] I've definitely used equals in the past and know it works (although not in the property tag like you are, but should be the same as in s:if; OGNL either way) Something like this might work:

Re: How to compare string reference variables using ognl?

2011-12-12 Thread Li Ying
In OGNL, the == test will call the equals method, so, I believe the expression #selectedOffer==#queryString should work. Read the following document: http://commons.apache.org/ognl/language-guide.html In the sector [Operators], there is a table describe all the operators. If you think the test

Re: Dynamically setting the template directory in an Action

2011-12-12 Thread Li Ying
My suggestion: You can create a file(or folder) link on your file system. From the view of your web app, it works like a file(or folder) inside the [document root directory], but the real file(or folder) is actually somewhere outside the [document root directory]. 2011/12/8 Gurcharan Singh

Re: struts2 string to map conversion

2011-12-12 Thread Li Ying
What is your client side code (JSP)? In OGNL expression, a value assignment is something like: aMap[aKey] = aValue So, you need create HTML code like: input name=aMap[aKey] value=aValue / On the server side, the OGNL expression will be converted into Java method invoking like:

Re: Dynamically setting the template directory in an Action

2011-12-12 Thread Gurcharan Singh
Hi Li Sorry, not able to understand your point. Can you kindly elaborate. Thanks! On Tue, Dec 13, 2011 at 8:13 AM, Li Ying liying.cn.2...@gmail.com wrote: My suggestion: You can create a file(or folder) link on your file system. From the view of your web app, it works like a file(or

Re: Dynamically setting the template directory in an Action

2011-12-12 Thread Li Ying
I mean: If the OS is unix/linux, you can create file link (or folder link) on the file system. This doc describes more details: http://www.cyberciti.biz/faq/creating-hard-links-with-ln-command/ 2011/12/13 Gurcharan Singh gurcha...@rachna.co.in: Hi Li Sorry, not able to understand your point.

Re: Dynamically setting the template directory in an Action

2011-12-12 Thread Gurcharan Singh
Thanks for the clarification. Will sure give it a try. On Tue, Dec 13, 2011 at 9:04 AM, Li Ying liying.cn.2...@gmail.com wrote: I mean: If the OS is unix/linux, you can create file link (or folder link) on the file system. This doc describes more details: