Portlet Factory, Version 6.1.2
About using the Choose Reference dialog
The Choose Reference dialog allows you to specify the value of a model entity as the value for a builder input. The Choose Reference dialog displays model elements as a tree, allowing you to navigate to the model element whose value you want to supply to the builder input. The syntax that the Choose Reference dialog produces is displayed in the builder input's text box and is called an indirect reference. You can also use indirect reference syntax to specify the value returned by a Java expression as the value for the builder input.
The Choose Reference dialog displays all the variables, methods, inputs, and pages from which you can choose to map the output value of the selected element to the input value for the builder call. For references to XML structures associated with a schema, the Choose Reference dialog displays all the elements as well as any attributes associated with those elements. Attributes are differentiated by an @ symbol preceding their name in the dialog tree.
The Choose Reference dialog does filter out non-valid possibilities. For example, you can set the Label input value for the button builder to be the output of a method, the value of a variable, or the value from an input on the previously submitted page. When you display the Choose Reference dialog for the Label input, it does not show the pages in the model because they are not a valid means of deriving a label for the button.
Creating references to methods
The Choose Reference dialog only shows methods that do not take arguments. When trying to supply an input with a value returned by a method, keep in mind that some builders do not support specifying arguments to a method selected in the Choose Reference dialog. To supply a builder call input with the value returned from a method that takes arguments, add a method call builder call to your model, calling the method and supplying arguments there. Set the input value by using the Choose Reference dialog and selecting the method call that you just created.
- Specifying values for builder inputs
You can specify values for builder inputs in multiple ways.
- Combining indirect reference types
You can use combinations of indirect reference types.
- Using Java expressions for builder input
You can also enter Java syntax for the input to a builder.
- Pre-Defined Java Expressions
The Java node of the Choose Reference dialog also offers you some pre-defined expressions you can use.
- Adding expressions to the Choose Reference dialog
You can add your own expressions to the Java node of the Choose Reference dialog.
- Nesting and concatenating indirect references
You can concatenate indirect references or nest them as needed.
Library | Support |