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
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.
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
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.
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
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
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
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
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
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
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
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
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
13 matches
Mail list logo