JspInspectionResultProcessor processes the inspection result and evaluates any expressions of the form ${...} using JSP EL. For example:
<entity type="com.myapp.Person"> <property name="pension" hidden="${!person.retired}"/> </entity>
JspInspectionResultProcessor would update this inspection result's hidden attribute based on evaluating the JSP expression ${!person.retired}. It could be used to show/hide the pension field in response to the retired checkbox being checked.
Arrays and collections are also supported:
<entity type="com.myapp.Person"> <property name="pension" lookup="${person.arrayOfValues}"/> </entity>
The JSP expression language also supports branching statements. For example:
import org.metawidget.inspector.annotation.*; public class ContactController { @UiAction @UiLabel( "${contactController.readOnly ? 'Back' : null}" ) public String cancel() { ... } }
JspInspectionResultProcessor would update the label of this action to be either 'Back' or default to 'Cancel', depending on whether the Contact was being edited. It is taken from the JSP Address Book sample (see Section 1.3.2, “Web Address Book”).