Axel, thanks for resurrecting the thread with your suggestions.
On the first suggestion, how do you propose making the singleton available in the page context, to allow that call?
On the second one, how can a tld be used to define constants?
Obviously I'm missing something.
thanks Adam
ps the unstandard tag library looks great but I don't think I'll be able to get it accepted into the project at this point.
On 10/11/2004 03:28 PM Axel Gross wrote:
some ideas - get a singleton instance of GargantusLists and call it 'ns' (for namespace) then you just have to use ns.ESURVEY_RESULT_DISPLAY_TYPE_LIST - make a stupid tld in which you define those constants - use jakarta jexl or another expression language which allows more than jsp2.0 EL
hth, axel
On 2004-09-27 at 21:50:26 +0100, Adam Hardy wrote:
Just before this thread dies, on a closely related note, does anybody have a nice way to get the value of a constant from a static on a class? This is what I don't like:
<html:select property="resultDisplayTypeId" >
<html:options collection="<%=org.gargantus.GargantusLists.ESURVEY_RESULT_DISPLAY_TYPE_LIST %>"
property="resultDisplayTypeId"
labelProperty="typeName" />
</html:select>
I thought of JSTL variables, like: <c:set var="resultDisplayTypeListKey"> <%=org.gargantus.GargantusLists.ESURVEY_RESULT_DISPLAY_TYPE_LIST %> </c:set>
except somehow avoiding the <% %> tags?
I thought of instantiating the class and putting in the Application scope and trying to access it like this:
${applicationScope.get['myConstantsBean'].resultDisplayTypeId}
but it's still messy. Does anybody have any better ideas?
Thanks!
On 09/27/2004 04:53 PM Paul McCulloch wrote:
I think you can achieve what yopu want. For example:
<bean:define id="somevar"><bean:write property="whatever"/></bean:define>
<logic:equal name="somevar" value="one"> I'm some conditional html </logic:equal>
Paul
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]