This JavaScript function shows the default view of the current entity in a pop-up window (modal dialog). It is a blocking call. It does not return until the modal dialog is closed.
showPopupDetailFor(key, name, width, height, argument)
key - Required. Entity key that is required by the detail view. If not passed, the current entity's key is automatically passed to the pop-up window.
name - Required. Pass as blank space (" "). Not used.
width - Required. Horizontal size of the pop-up window. Measured in pixels. If passed as 0, a certain default width is used.
height - Required. Vertical size of the pop-up window. Measured in pixels. If passed as 0, a certain default height is used.
argument - Required. Anything passed in this field is available in the modal dialog through the window.dialogArguments attribute.
None.
This example shows how the inventory audit detail is invoked from the inventory audit list screen.
The same list screen is used in a list view, as well as in a detail pop-up window. When you select the transaction date, if the current screen is a pop-up window, another pop-up window is invoked with the audit details. If the current view is list view, the audit detail screen comes up in the same window.
<tbody>
<yfc:loopXML name="InventoryAudits"
binding="xml:/InventoryAudits/@InventoryAudit" id="InventoryAudit">
<tr>
<yfc:makeXMLInput name="inventoryAuditKey">
<yfc:makeXMLKey binding="xml:/InventoryAudit/@InventoryAuditKey"
value="xml:/InventoryAudit/@InventoryAuditKey" />
<yfc:makeXMLKey binding="xml:/InventoryAudit/@OrganizationCode"
value="xml:/InventoryAudit/@InventoryOrganizationCode" />
</yfc:makeXMLInput>
<td class="checkboxcolumn">
<input type="checkbox" value='<%=getParameter("inventoryAuditKey")%>' name="EntityKey"/>
</td>
<td class="tablecolumn"
sortValue="<%=getDateValue("xml:/InventoryAudit/@Modifyts")%>">
<%if ( "Y".equals(request.getParameter
(YFCUIBackendConsts.YFC_IN_POPUP)) ) {%>
<a href=""
onClick="showPopupDetailFor('<%=getParameter("inventoryAuditKey")%>',
'','900','550',window.dialogArguments);return false;" >
<yfc:getXMLValue name="InventoryAudit"
binding="xml:/InventoryAudit/@Modifyts"/>
</a>
<%} else {%>
<a
href="javascript:showDetailFor('<%=getParameter("inventoryAuditKey")%>');">
<yfc:getXMLValue name="InventoryAudit"
binding="xml:/InventoryAudit/@Modifyts"/>
</a>
<%}%>
</td>
<td class="tablecolumn">
<yfc:getXMLValue name="InventoryAudit"
binding="xml:/InventoryAudit/@ItemID"/>
</td>
<td class="tablecolumn">
<yfc:getXMLValue
name="InventoryAudit" binding="xml:/InventoryAudit/@ProductClass"/>
</td>
<td class="tablecolumn">
<yfc:getXMLValue
name="InventoryAudit" binding="xml:/InventoryAudit/@UnitOfMeasure"/>
</td>
<td class="tablecolumn">
<yfc:getXMLValue
name="InventoryAudit" binding="xml:/InventoryAudit/@TransactionType"/>
</td>
<td class="tablecolumn">
<yfc:getXMLValue
name="InventoryAudit" binding="xml:/InventoryAudit/@ShipNode"/>
</td>
</tr>
</yfc:loopXML>
</tbody>