You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Sean Ferguson <se...@comcast.net> on 2003/07/21 20:29:34 UTC
[JELLY] Constants reference
How do I reference a constant file?
Example, ${WindowConstants.DISPOSE_ON_CLOSE} does absolutely nothing.
How would I go about using that value?
Thanks
Re: [JELLY] Constants reference
Posted by Paul Libbrecht <pa...@activemath.org>.
Sean Ferguson wrote:
> How do I reference a constant file?
>
> Example, ${WindowConstants.DISPOSE_ON_CLOSE} does absolutely nothing.
jexl tends to be a bit lean (as javascript is) when it comes to objects
that have no properties or don't have the wished property... I guess the
"nothing" here is actually a null which is converted to "" so to provide
something outside of the ${}.
> How would I go about using that value?
I fear you have found a bug as even based on an instance, the constant
seems not to be picked...
<j:new className="javax.swing.JFrame" var="frame"/>
<echo> This should be a size ${frame.getSize()}.</echo>
<echo> This should be an integer "${frame.DISPOSE_ON_CLOSE}".</echo>
Only responds me:
[echo] This should be a size java.awt.Dimension[width=0,height=0].
[echo] This should be an integer "".
Paul