Screen refreshing

For fields that depend on document type, enterprise code, or node, use the common JSP's screen refreshing features.

For example, in the order search by status screen, there is a "From Status" field that displays a list of statuses by which you can search. This list of valid statuses is different for different document types. Therefore, when the user selects a particular document type, a different list of statuses must appear in the field. Achieving this requires the following steps:

  1. Include the common_fields.jsp at the top of the JSP. Pass the "RefreshOnDocumentType" parameter as "true" as follows:
    <jsp:include page="/yfsjspcommon/common_fields.jsp" flush="true">
      <jsp:param name="DocumentTypeBinding" value="xml:/OrderRelease/Order/@DocumentType"/>
      <jsp:param name="EnterpriseCodeBinding" value="xml:/OrderRelease/Order/@EnterpriseCode"/>
      <jsp:param name="RefreshOnDocumentType" value="true"/>
    </jsp:include>
  2. In the application XML for your entity, define the getStatusList() API under the view. Define the API so that it is not called by the infrastructure layer when the view is displayed (set the "LoopAPI" attribute to "Y"). Specify a dynamic attribute for the DocumentType attribute so that it passes the document type selected in the field on the screen as follows:
    DocumentType="xml:CommonFields:/CommonFields/@DocumentType"
  3. In the JSP of your screen, call the getStatusList() API using the callAPI tag lib immediately after the common_fields.jsp is included.
Note: You can refresh the entire screen using any of the common fields (document type, enterprise code, or node). There is a corresponding dynamic binding that must be specified for each: (xml:CommonFields:/CommonFields/@DocumentType, xml:CommonFields:/CommonFields/@EnterpriseCode, xml:CommonFields:/CommonFields/@Node) respectively