The JSP files call the appropriate API (if needed), pick up the
appropriate template XML, and pass the values returned by the API
as data to the template XML.
A separate JSP file must be written for each of the following screen
components:
- Screen - for invoking the HTML template and rendering the screen
on the mobile client.
- Validation - for performing field level validations.
- Command button - for performing actions on clicking of the command
button.
A JSP file for a mobile UI screen typically contains three sections,
but not all bullets apply to every mobile JSP file:
Section |
Function |
1 |
- Extracts values from the pageContext or Session.
- Performs setAttribute for some of the input bindings.
|
2 |
- Calls an API using callAPI.
- Processes logic for the API output.
|
3 |
- Sends Form or Forward Page
- Sends Error
|
The example JSP files for the inventory inquiry scenario are available
for you to copy and reuse from the INSTALL_DIR/xapidocs/code_examples/rfinventory/
directory.