YfsGetTemplateRowOptions

Description

This JSP function XML binds input fields when the field appears within an editable table's template row. The template row appears when the plus icon (" + ") is selected in an editable table.

Syntax

String yfsGetTemplateRowOptions(String name, String allowModBinding, String modType, String controlType)

Input parameters

name - Required. Value of the name attribute for the input. Can be a binding or a literal.

allowModBinding - Required. Binding string that resolves to a list of elements containing all modification types permitted for the current status of the entity.

modType - Required. Modification type associated with the current control.

controlType - Required. Type of control. Can be a textbox, checkbox or textarea.

JSP usage

<input type="text" 
<%=yfsGetTemplateRowOptions("xml:/Order/OrderLines/OrderLine_/Item/@ItemID", 
"xml:/Order/AllowedModifications", "ADD_LINE", "text")%>/>

Example

This example shows how this function is used to store a template row in the list of order lines for an order in the Order detail view.
<tfoot>
   <tr style='display:none' TemplateRow="true">
    <td class="checkboxcolumn">
      <input type="hidden" 
<%=getTextOptions("xml:/Order/OrderLines/OrderLine_/@Action", "", 
"CREATE")%> />
    </td>
    <td class="tablecolumn">&nbsp;</td>
    <td class="tablecolumn">&nbsp;</td>
    <td class="tablecolumn" nowrap="true">
      <input type="text" 
<%=yfsGetTemplateRowOptions("xml:/Order/OrderLines/OrderLine_/Item/@ItemID",
"xml:/Order/AllowedModifications", "ADD_LINE", "text")%>/> 
      <img class="lookupicon"  
onclick="templateRowCallItemLookup(this,'ItemID','ProductClass','UnitOfMeasure',
'item')" <%=getImageOptions(YFSUIBackendConsts.LOOKUP_ICON, 
"Search_for_Item")%>/>
    </td>
    <td class="tablecolumn">
        <select 
<%=yfsGetTemplateRowOptions("xml:/Order/OrderLines/OrderLine_/Item/
@ProductClass", "xml:/Order/AllowedModifications", "ADD_LINE", "combo")%>>
          <yfc:loopOptions 
binding="xml:ProductClassList:/CommonCodeList/@CommonCode" name="CodeValue"
value="CodeValue" selected="xml:/Order/OrderLine/Item/@ProductClass"/>
        </select>
    </td>
    <td class="tablecolumn">
        <select 
<%=yfsGetTemplateRowOptions("xml:/Order/OrderLines/OrderLine_/Item/
@UnitOfMeasure", "xml:/Order/AllowedModifications", "ADD_LINE", "combo")%>>
         <yfc:loopOptions 
binding="xml:UnitOfMeasureList:/CommonCodeList/@CommonCode"  name="CodeValue"
value="CodeValue" selected="xml:/Order/OrderLine/Item/@UnitOfMeasure"/>
        </select>
        </td>
        <td class="tablecolumn">&nbsp;</td>
        <td class="tablecolumn" nowrap="true">
          <input type="text"  
<%=yfsGetTemplateRowOptions("xml:/Order/OrderLines/OrderLine_/@ReceivingNode",
 "xml:/Order/AllowedModifications", "ADD_LINE", "text")%>/>
         <img class="lookupicon" onclick="callLookup(this,'shipnode')"
 <%=getImageOptions(YFSUIBackendConsts.LOOKUP_ICON, 
"Search_for_Recieving_Node")%>/>
        </td>
        <td class="tablecolumn" nowrap="true">
           <input type="text"
<%=yfsGetTemplateRowOptions("xml:/Order/OrderLines/OrderLine_/@ShipNode", 
"xml:/Order/AllowedModifications", "ADD_LINE", "text")%>/>
              <img class="lookupicon" onclick="callLookup(this,'shipnode')" 
<%=getImageOptions(YFSUIBackendConsts.LOOKUP_ICON, "Search_for_Ship_Node")%>/>
        </td>
        <td class="tablecolumn" nowrap="true">
           <input type="text"
<%=yfsGetTemplateRowOptions("xml:/Order/OrderLines/OrderLine_/@ReqShipDate", 
"xml:/Order/AllowedModifications", "ADD_LINE", "text")%>/>
              <img class="lookupicon" onclick="invokeCalendar(this)" 
<%=getImageOptions(YFSUIBackendConsts.DATE_LOOKUP_ICON, "Calendar")%>/>
        </td>
        <td class="numerictablecolumn">
          <input type="text" 
<%=yfsGetTemplateRowOptions("xml:/Order/OrderLines/OrderLine_/@OrderedQty", 
"xml:/Order/AllowedModifications", "ADD_LINE", "text")%>>
        </td>
        <td class="tablecolumn">&nbsp;</td>
        <td class="tablecolumn">&nbsp;</td>
     </tr>
<%if (isModificationAllowed("xml:/@AddLine","xml:/Order/AllowedModifications"))
{ %>
     <tr>
       	<td nowrap="true" colspan="13">
       	 	<jsp:include page="/common/editabletbl.jsp" >
       	 	</jsp:include>
        </td>
     </tr>
     <%}%>
</tfoot>