Re: Simplified usage of:@com.company.Constants.StaticCOnstants

2008-08-11 Thread ravi_eze
hi, Thanks for the reply. We had done with the old approach (@[EMAIL PROTECTED]). However i think we can write an interceprotor read the constants (through java reflections) and put them in request scope. THe page can access them from there. The problem with this is that the action class variabl

Re: Simplified usage of:@com.company.Constants.StaticCOnstants

2008-08-11 Thread Ramanathan RV
Hello, This has always been a problem. And a quick and decent way of solving this is to forget OGNL and write your own implementation. Below listed the code from AppFuse project which essentially creates a tag to expose all the constants. *package com.company.app.webapp.taglib; import java.lang.

Re: Simplified usage of:@com.company.Constants.StaticCOnstants

2008-06-06 Thread Maxx
On Thu, May 1, 2008 at 5:21 PM, Jeromy Evans <[EMAIL PROTECTED]> wrote: > > I have a solution, but first... > OGNL only provides access to static fields and static methods. It cannot > reference a static class, nor even an inner static class. > > http://www.ognl.org/2.6.9/Documentation/html/Langua

Re: Simplified usage of:@com.company.Constants.StaticCOnstants

2008-05-01 Thread Jeromy Evans
ravi_eze wrote: hi, even this doesnt seem to be working. is it possible to load the constant class to the context and then display it form there.? or in that case it expects a setters and getters... or some way of getting this done.. the code is very bad to read 'cos every time i am using @com.

RE: Simplified usage of:@com.company.Constants.StaticCOnstants

2008-05-01 Thread ravi_eze
hi, even this doesnt seem to be working. is it possible to load the constant class to the context and then display it form there.? or in that case it expects a setters and getters... or some way of getting this done.. the code is very bad to read 'cos every time i am using @com.company any

RE: Simplified usage of:@com.company.Constants.StaticCOnstants

2008-04-29 Thread Wes Wannemacher
Did you try to import your Constants class? <%@ page import="com.company.Constants" %> As far as say C.staticconstant1, all I can really say is that the @ symbol is how you access static vars/methods in OGNL. Another choice might be to use regular ol' EL expressions. -Wes On Tue, 2008-04-2

RE: Simplified usage of:@com.company.Constants.StaticCOnstants

2008-04-29 Thread ravi_eze
hi, Does the following work - Yes it does. But my requirement is more like i would import the class into some bean/ variable (C) so that i can say C.staticconstant1 etc... but by the approach mentioned above, i should repeat the @com.company.Constant string always which reduces the readabil

RE: Simplified usage of:@com.company.Constants.StaticCOnstants

2008-04-29 Thread Wes Wannemacher
ht way to display it? > > Any other way of fixing this issue??? > > Ravi > > -Original Message- > From: Chris Pratt [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 29, 2008 10:40 AM > To: Struts Users Mailing List > Subject: Re: Simplified usage of:@com

RE: Simplified usage of:@com.company.Constants.StaticCOnstants

2008-04-28 Thread Ravichandra C
40 AM To: Struts Users Mailing List Subject: Re: Simplified usage of:@com.company.Constants.StaticCOnstants I think it may need to be: But I haven't tried it myself. (*Chris*) On Mon, Apr 28, 2008 at 9:44 PM, ravi_eze <[EMAIL PROTECTED]> wrote: > > hi, > > i tried

Re: Simplified usage of:@com.company.Constants.StaticCOnstants

2008-04-28 Thread Chris Pratt
I think it may need to be: But I haven't tried it myself. (*Chris*) On Mon, Apr 28, 2008 at 9:44 PM, ravi_eze <[EMAIL PROTECTED]> wrote: > > hi, > > i tried this way: > > > > > but its not working nor it throws an exception if its wrong way of doing. > > any help? > > cheers, > r

Re: Simplified usage of:@com.company.Constants.StaticCOnstants

2008-04-28 Thread ravi_eze
hi, i tried this way: but its not working nor it throws an exception if its wrong way of doing. any help? cheers, ravi Wes Wannemacher wrote: > > > http://struts.apache.org/2.x/docs/set.html > > > > On Mon, 2008-04-28 at 08:17 -0700, ravi_eze wrote: >> hi, >> >> we want to access

Re: Simplified usage of:@com.company.Constants.StaticCOnstants

2008-04-28 Thread Wes Wannemacher
http://struts.apache.org/2.x/docs/set.html On Mon, 2008-04-28 at 08:17 -0700, ravi_eze wrote: > hi, > > we want to access the constants in our jsp page. So we are proceeding as > follows: > > < s:text field name="[EMAIL PROTECTED]@STATIC_CONSTANTS1]" /> > > the problem with this is that we n

Simplified usage of:@com.company.Constants.StaticCOnstants

2008-04-28 Thread ravi_eze
hi, we want to access the constants in our jsp page. So we are proceeding as follows: < s:text field name="[EMAIL PROTECTED]@STATIC_CONSTANTS1]" /> the problem with this is that we need to repeat the @com.company.Constants always. So is there a simple way to get this working? I wanted to try ou