On 16-May-04, at 21:17 Uhr, Daniel F. Savarese wrote:
wrote a GetStaticTag that works like this:

 <v:getStatic var="closeOperation" className="javax.swing.JFrame"
              field="EXIT_ON_CLOSE"/>

That allowed me to then do:

 <frame title="Tree Frame" var="frame" size="400,400"
        defaultCloseOperation="${closeOperation}">
   ...
 </frame>

Daniel,

I think your addition makes sense.

I keep believing, however, that such a thing should be done by Jexl or something else... it makes no sense to need this getStatic, at least compared to Java.

Yet an alternative way for this was partially done in GridBagConstraintBean: namely it has been tried to have custom converters that would decode such (expected) constants into an integer.
Indeed, as the value of the defaultCloseOperation one expects not much else than the value of the constants of JFrame that apply for this. The fact that they are integers is plain syntactic sugar.


I haven't found the best pattern to write such converters though. Maybe I've been missing the understanding of something on BeanUtils...

Feel free to go ahead but let's start this discussion on the usages of converters in jelly-attributes since it seems BeanUtils folks are "eagerly expecting users" ;-->

thanks

paul


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to