Portlet Factory, Version 6.1.2


 

Java expression usage

You can enter Java syntax for the input to a builder. The IBM® WebSphere Portlet Factory servlet evaluates the Java expression at generation time, and supplies the input to the builder call with the value. You can use a Java expression for indirect references when you want to specify an element in the WebApp that the chooser or builder call editor does not directly support. For example, if you wanted to supply the input with the URL to WebSphere Portlet Factory, you could use the following Java expression:

${Java/webAppAccess.getRequestData().getContextURL()}

To call a method named MethodName that takes two arguments:

${Java/webAppAccess.callMethod("MethodName", arg1,  arg2)}

Parent topic: The reference chooser


Library | Support |