1
0
-1

Hi everyone,

How can I use hash variable in Bean shell? I wanted to use it as my form load binder.

String x = #requestParam.category#;

String y = #currentUser.firstName#;

I also try to add "" or '  ' but still nothing happen......

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      I tested with the following Java code in a "Form > BeanShell Load Binder" to display the string variable in the joget.log file, after populating with the current user hash variable, works with no errors:

      import org.joget.commons.util.LogUtil;
      
      String my_username = "#currentUser.username#";
      
      System.out.println("----------" + my_username);
      LogUtil.error("----------Username", null, my_username);
        CommentAdd your comment...