struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmk...@earthlink.net (David M. Karr)
Subject Re: Logic Equals and Interface Constants
Date Sat, 11 Jan 2003 00:30:41 GMT
>>>>> "Sean" == Sean Cohan <Cohan> writes:

    Sean> I'd like to somehow use some final static int's defined in an interface
    Sean> within <logic:equal> tags.  Something like:

    Sean> <logic:equal name="columnType" value=DeltaItem.LONGTEXT>

    Sean> Can I do this or something like it (e.g., using chars instead of int's)?

You'll have to use expression scriptlets for the attribute value.  In those
expressions, you can produce any Java expression you want.

If you want/need to avoid scriptlets, then you'd have to use a more involved
process, using Struts-EL, along with a class that uses reflection to load
"static final" constants into a HashMap which can be referenced through the EL.

-- 
===================================================================
David M. Karr          ; Java/J2EE/XML/Unix/C++
dmkarr@earthlink.net   ; SCJP; SCWCD




--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message