Example Actions MenuThe following example URL shows how to pass the Actions menu for the View mode form. Because the default mode is View, the mode parameter does not have to be passed. ${COMMON_DIR}/emxForm.jsp?form=BuyerDesk&objectId=3243.32424.232 &relId=3432.2342.2344&formHeader=BuyerDesk&toolbar=SCSBuyerdeskToolbar You can assign the parameter actionMenuName to any valid menu object configured as an Actions menu. These menus contain the command objects that represent the toolbar items. This section describes some specific uses of Action menus with the configurable form. For instructions on configuring an Actions menu and toolbar items, see Menus. Using Default Edit LinkThe View mode form page supports a default Edit link that displays when the parameter "editLink=true" is passed to emxForm.jsp. Here is an example of the default Edit link. When a user clicks this link, the same form page opens, with the same web form object name, but in Edit mode. Edit mode can also be configured to open in a slidein frame, or to convert the existing View mode into Edit mode. Custom Page and RefreshYou can configure an action menu link to edit the object displayed in the View mode form page. Upon successful update, it then refreshes the View mode form to reflect the changes. To implement this kind of toolbar item, the action menu link command object must have these settings:
Here is an example of a command configured with these settings. After editing the selected item, you can refresh the View mode form page by calling an appropriate JavaScript API method, such as: //do Form refresh top.opener.top.refreshViewFormPage();
top.close(); To perform a form refresh from a modal window, you must call the JavaScript method "releaseMouse()" to release the mouse. The following JavaScript method shows how to implement this. function doDone() { //check for page errors here, if there are no errors, // Submit the data to edit/create the item //then continue on to do the following: top.opener.top.modalDialog.releaseMouse();
//do any page redirects/refreshes here - (Form refresh) top.opener.top.refreshViewFormPage();
top.close(); } If the Cancel button in a modal window refreshes the page underneath it, you must use the sample code shown above. If the Cancel button simply closes the window (top.close()), then it is not needed. |