Announcement Announcement Module
Collapse
No announcement yet.
Invoke static constant on a variable through EL? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Invoke static constant on a variable through EL?

    Hi,

    I would like to invoke a static constant on a variable with the EL. That is, I have a constants class:

    package org.kuali.rice.krad.uif;

    public class UifConstants {

    public static final String RIGHT = "RIGHT";

    }

    And I want to be able to use this constant in XML configuration. I know we can do it like this:

    ${T(org.kuali.rice.krad.uif.UifConstants).RIGHT}

    but I would like to provide a variable so the full classname does not have to be used each time. So I added a variable of 'UifConstants' with value UifConstants.class.

    I can't find a way to make this work from the el though. Couple of things I tried are:

    ${#UifConstants.RIGHT} (I suspect it tries to call getRight() in this case which it can't find)
    ${T(#UifConstants).RIGHT} (gives an error about not expecting the #)

    If anyone knows a way of accomplishing this I would greatly appreciate it!

    thanks,
    Jerry
Working...
X