This JavaScript functions shows a specific view ID in a pop-up window (modal dialog). It is a blocking call. It does not return until the modal dialog is closed.
Use this function in situations where the default key generated by the Presentation Framework to be passed on the detail view is not accepted by the detail view being invoked.
yfcShowDetailPopupWithKeys(viewID, name, width, height, argument, keyName, entity, selectionKeyName)
viewID - Required. Resource ID of the detail view to be shown as a pop-up window. If passed as an empty string, the default detail view of the specified entity is displayed.
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 - Optional. Passed as the argument parameter to the showModalDialog() function that is used to show the pop-up window. This then becomes available in the modal dialog through the window.dialogArguments attribute. If not passed, a new Object is created and passed to the pop-up window.
keyName - Required. Name attribute of a control that contains the Entity Key that is required by the detail view. If it is not passed, defaults to the value EntityKey.
entity - Optional. Resource ID for the detail view being shown. If not passed, defaults to the current entity.
selectionKeyName - Optional. Name of the checkbox control that must be checked by the user before the pop-up window is invoked. If this name is not passed (or is passed as null), the check is not performed, and the pop-up window is invoked immediately.
None.
This example shows how to invoke the modify address dialog from an inner panel that specifies its own entity key.
function doModifyAddressDialogWithKeys(source, viewID, entityKeyName) {
var myObject=new Object();
myObject.currentwindow=window;
myObject.currentsource=source;
if(viewID == null) {
viewID="YADD001";
}
if (entityKeyName == null) {
entityKeyName="EntityKey";
}
yfcShowDetailPopupWithKeys(viewID, "", "600", "425", myObject,
entityKeyName);
}