cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Oliver <res1c...@verizon.net>
Subject Re: Accessing public static final constants from JXTemplate
Date Tue, 12 Aug 2003 17:25:29 GMT
This should work:

${Packages.org.iniva.util.Contstants.CANCEL_ACTION}

But make sure you update to the latest cvs. I only recently added a fix 
for this.

Chris


Jeremy Quinn wrote:

>
> On Friday, August 8, 2003, at 07:36 PM, Jeremy Quinn wrote:
>
>> Hi All,
>>
>>
>> I have a class called Constants, that is like this:
>
>
>> Package org.iniva.util;
>> public final class Constants {
>>     public static final String FAILURE = "Failed";
>>     public static final String CANCEL_ACTION = "Cancelled";
>>     // etc.
>> }
>>
>> I wish to share this between my Java 'biz logic', my FlowScripts and 
>> the View Layer.
>
>
> I have tried the following expressions in JXTemplate :
>
> #{org/iniva/util/Constants/CANCEL_ACTION}                 : No pointer 
> for xpath Exception
> #{Packages/org/iniva/util/Constants/CANCEL_ACTION} : No pointer for 
> xpath Exception
> #{org.iniva.util.Constants.CANCEL_ACTION}                   : no output
> #{Packages.org.iniva.util.Constants. CANCEL_ACTION}   : no output
> #{java.org.iniva.util.Constants. CANCEL_ACTION}            : no output
> ${org.iniva.util.Constants.CANCEL_ACTION}                    : no output
> ${Packages.org.iniva.util.Constants. CANCEL_ACTION}    : no output
> ${java.org.iniva.util.Constants. CANCEL_ACTION}            :
>             outputs "[JavaPackage java.org.iniva.util.Constants. 
> CANCEL_ACTION]"
>
>
> So I am not any closer ......
>
> Any suggestions?
>
> Thanks
>
> regards Jeremy
>
>



Mime
View raw message