Come join us on November 27-29, 2018 at the Gartner Application Strategies & Solutions Summit 2018 in Las Vegas, USA.

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

NameDescription
Prefixbeanshell
DescriptionUsing environment variable to execute bean shell script. Passing parameter using URL query string syntax.
Attributes
  • #beanshell.ENVIRONMENT_VARIABLE#

  • #beanshell.ENVIRONMENT_VARIABLE#VARIABLE[PARAMETERS_URL_QUERY_STRING]#

Scopeof Use
  • All components within the App.
Sample Attributes

To execute a script stored in "welcome" environment variable with parameter "username" and "dept":

Code Block
languagejava
if (username != null && username.length == 1 && !username[0].isEmpty()) {
       return "Welcome " + username[0] + " (" + dept[0] + "),";
} else {
       return "";
}
  • #beanshell.welcome[username={currentUser.username}&dept={currentUser.department.name}]#

...