Re: JSTL and Java Constants

2005-09-07 Thread Rahul Akolkar
On 8/31/05, Martin Cooper <[EMAIL PROTECTED]> wrote: > On 8/30/05, Rahul Akolkar <[EMAIL PROTECTED]> wrote: > 2) Another approach that some choose is to provide a "Constants" bean > > that supplies getters for the constants, which is what we ended up > > doing for the RDC taglib. > > > Isn't tha

RE: JSTL and Java Constants

2005-08-31 Thread Erik Beijnoff
>Please posting the code , I am also interested. > >Thanks >John The big tradeoff is of course the extra fn:xxx('...') that needs to be written in the code. But a big plus is that once direct retrieval of constants from java classes is integrated into the EL, a conversion is simple a matter of sea

Re: JSTL and Java Constants

2005-08-31 Thread jmazzella
Erik, Please posting the code , I am also interested. Thanks John ">"Erik Beijnoff" <[EMAIL PROTECTED]> "Erik Beijnoff" <[EMAIL PROTECTED]> 08/31/2005 02:59 PM Please respond to "Tag Libraries Users List" To: taglibs-user@ja

Re: JSTL and Java Constants

2005-08-31 Thread Erik Beijnoff
>I would like to do something like: > >a) > > This won't work. I could hack it around with a scriptlet and an import >at the top of my JSP, but that seems to me like >violating the separation between View and Control > > >>You may want to see this - > >>http://forums.java.sun.com/thread.

Re: JSTL and Java Constants

2005-08-31 Thread Luca Passani
Martin Cooper wrote: Yes, it will work the same. It works like a charm. You rock. Thanks Luca - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: JSTL and Java Constants

2005-08-31 Thread Martin Cooper
On 8/31/05, Luca Passani <[EMAIL PROTECTED]> wrote: > > Martin Cooper wrote: > > > > >Done. I think. At least, everything seems to have worked out, so it > should > >be available in the next nightly build of Unstandard. > > > > > will I need to wait tomorrow to download? great. I am eager to try

Re: JSTL and Java Constants

2005-08-31 Thread Luca Passani
Martin Cooper wrote: Done. I think. At least, everything seems to have worked out, so it should be available in the next nightly build of Unstandard. will I need to wait tomorrow to download? great. I am eager to try it. One little doubt: | The constants are defined in an inte

Re: JSTL and Java Constants

2005-08-30 Thread Martin Cooper
On 8/30/05, Rahul Akolkar <[EMAIL PROTECTED]> wrote: > > On 8/30/05, Martin Cooper <[EMAIL PROTECTED]> wrote: > > On 8/30/05, Luca Passani <[EMAIL PROTECTED]> wrote: > > > > > > Martin Cooper wrote: > > > > > > > > > > >and then 'TheConstants' contains a map of all constants in the class, > so >

Re: JSTL and Java Constants

2005-08-30 Thread Martin Cooper
On 8/30/05, Martin Cooper <[EMAIL PROTECTED]> wrote: > > > > On 8/30/05, Luca Passani <[EMAIL PROTECTED]> wrote: > > > > Martin Cooper wrote: > > > > > > > >and then 'TheConstants' contains a map of all constants in the class, > > so you > > >can use, for example: > > > > > >${TheConstants.UR

Re: JSTL and Java Constants

2005-08-30 Thread Rahul Akolkar
On 8/30/05, Martin Cooper <[EMAIL PROTECTED]> wrote: > On 8/30/05, Luca Passani <[EMAIL PROTECTED]> wrote: > > > > Martin Cooper wrote: > > > > > > > >and then 'TheConstants' contains a map of all constants in the class, so > > you > > >can use, for example: > > > > > >${TheConstants.URL} > > > > >

Re: JSTL and Java Constants

2005-08-30 Thread Martin Cooper
On 8/30/05, Luca Passani <[EMAIL PROTECTED]> wrote: > > Martin Cooper wrote: > > > > >and then 'TheConstants' contains a map of all constants in the class, so > you > >can use, for example: > > > >${TheConstants.URL} > > > > > > > bang on. That would be cool. I have worked my problem around in m

Re: JSTL and Java Constants

2005-08-30 Thread Luca Passani
Martin Cooper wrote: and then 'TheConstants' contains a map of all constants in the class, so you can use, for example: ${TheConstants.URL} bang on. That would be cool. I have worked my problem around in my application, but your solution would be better, since it would decouple my acti

Re: JSTL and Java Constants

2005-08-30 Thread Martin Cooper
On 8/30/05, Luca Passani <[EMAIL PROTECTED]> wrote: > > Martin Cooper wrote: > > >Take a look at the 'bind' tag in the Jakarta Taglibs Unstandard tag > library. > >See: > > > > > http://jakarta.apache.org/taglibs/sandbox/doc/unstandard-doc/index.html#bind > > > > > > > interesting. Do you have a

Re: JSTL and Java Constants

2005-08-30 Thread Luca Passani
Martin Cooper wrote: Take a look at the 'bind' tag in the Jakarta Taglibs Unstandard tag library. See: http://jakarta.apache.org/taglibs/sandbox/doc/unstandard-doc/index.html#bind interesting. Do you have an example of how that should be used? Thanks Luca

Re: JSTL and Java Constants

2005-08-30 Thread Martin Cooper
Take a look at the 'bind' tag in the Jakarta Taglibs Unstandard tag library. See: http://jakarta.apache.org/taglibs/sandbox/doc/unstandard-doc/index.html#bind I have a useConstants tag that I've been meaning to donate that exposes all of the constants in a class, but I haven't got around to tha

Re: JSTL and Java Constants

2005-08-30 Thread Sudhaker Raj
And If you can't extend from that class then you can write adapter for that class. Something like this Using in a JSP page: [code] <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %> http://Constants.name>}"/> [/code] Where adapter class is [code] package com.utils; import jav

Re: JSTL and Java Constants

2005-08-30 Thread Luca Passani
Sudhaker Raj wrote: You may want to see this - http://forums.java.sun.com/thread.jspa?threadID=508847&messageID=2543490 very smart. A bit overkill for my problem, but very smart... Thanks Luca - To unsubscribe, e-mail:

Re: JSTL and Java Constants

2005-08-30 Thread Sudhaker Raj
You may want to see this - http://forums.java.sun.com/thread.jspa?threadID=508847&messageID=2543490 Cheers, Sudhaker Raj http://thej2ee.com On 8/30/05, Luca Passani <[EMAIL PROTECTED]> wrote: > > > Hi there, here is my big problem today. I am using JSTL in some JSPs. > SInce this is a struts