The following example shows how this common JSP would be used within a search screen where two fields on the search screen need to be refreshed whenever the enterprise code field changes.
In the JSP of all entry point screens, the common_fields.jsp is included:
<table class="view">
<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="ShowNode" value="true"/>
<jsp:param name="NodeBinding" value="xml:/OrderRelease/Order/@Node"/>
<jsp:param name="RefreshOnNode" value="true"/>
<jsp:param name="RefreshOnEnterprise" value="true"/>
<jsp:param name="EnterpriseListForNodeField" value="true"/>
</jsp:include>
<% // Now call the APIs that are dependent on the common fields (Doc Type, Enterprise
Code, and Node)
// Product Classes and Unit of Measures are refreshed.
%>
<yfc:callAPI apiID="AP2"/>
<yfc:callAPI apiID="AP3"/>
<tr>
<td class="searchlabel"><yfc:i18n>field1</yfc:i18n></td>
</tr>
<tr>
<td nowrap="true" class="searchcriteriacell">
<select class="combobox" name="xml:/OrderRelease/@Field1QryType">
<yfc:loopOptions binding="xml:/QueryTypeList/StringQueryTypes/@QueryType"
name="QueryTypeDesc" value="QueryType" selected="xml:/OrderRelease/@Field1QryType "/>
</select>
<input type="text" class="unprotectedinput"
<%=getTextOptions("xml:/OrderRelease/@Field1")%> />
</td>
</tr>
APIs are defined in the application XML:
<View ViewGroupID="YOMSXXX" Priority="3" Name="By_Item" ID="YOMSXXX"
JSP="/om/order/search/wms_by_item.jsp"
OutputNode="Order">
<APIList>
<API Name="getQueryTypeList" OutputNode="QueryTypeList">
<Input>
<QueryType/>
</Input>
<Template>
<QueryTypeList>
<StringQueryTypes>
<QueryType QueryType="" QueryTypeDesc=""/>
</StringQueryTypes>
</QueryTypeList>
</Template>
</API>
<API Name="getCommonCodeList" OutputNode="ProductClassList" LoopAPI="Y">
<Input>
<CommonCode CodeType="PRODUCT_CLASS"
CallingOrganizationCode="xml:CommonFields:/CommonFields/@EnterpriseCode"/>
</Input>
<Template>
<CommonCodeList>
<CommonCode CodeValue="" CodeShortDescription=""/>
</CommonCodeList>
</Template>
</API>
<API Name="getCommonCodeList" OutputNode="UnitOfMeasureList" LoopAPI="Y">
<Input>
<CommonCode CodeType="UNIT_OF_MEASURE"
CallingOrganizationCode="xml:CommonFields:/CommonFields/@EnterpriseCode"/>
</Input>
<Template>
<CommonCodeList>
<CommonCode CodeValue="" CodeShortDescription=""/>
</CommonCodeList>
</Template>
</API>
</APIList>
</View>