cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <jer...@media.demon.co.uk>
Subject Re: Accessing public static final constants from JXTemplate
Date Fri, 08 Aug 2003 19:16:52 GMT

On Friday, August 8, 2003, at 07:56 PM, Hunsberger, Peter wrote:

> Jeremy Quinn <jeremy@media.demon.co.uk> asks:
>
>>
>> I have a class called Constants, that is like this:
>>
>> 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 the first two working as expected, the third I
>> cannot work out
>> .....
>>
>> Is it possible to pass the Constants class to the JXTemplate
>> view layer
>> in such a way that I can extract their values?
>>
>> I have tried several ways of sending the Constants class to the view
>> layer, and using #{CANCEL_ACTION} (etc.) in my template, without
>> success.
>>
>> Any suggestions?
>>
> Yes, but you may not like it...  We build our static constants from an
> XML file using an XSLT transform to create the Java code:
>

Thanks for your reply, but I cannot work out what you mean from what 
you have written.

regards Jeremy


Mime
View raw message