You can configure the Mode toolbar button and Edit menu to show up in the view mode in one of these ways:
The user can toggle between the view and edit mode by clicking on the Mode button. In view mode, the Edit pull-down menu is disabled. When the user clicks the Mode button, the following changes happen in the structure browser:
If the Cancel or Submit buttons display in the footer, they are grayed out so the user will not confuse their usage with the Apply/Reset buttons in the toolbar.
If the initial data load for the structure browser used the program parameter, the RowEditable setting has a default value of true (typical for structure browsers with multiple root nodes). If the data load is based on an objectId (using the getRelatedObjects method in the JPO defined bythe expandProgram parameter), then the RowEditable setting has a default value of false. When the user cuts or copies a row, the system stores the relationship and direction used by that connection. When the cut or copied row is pasted, the system uses the relationship/direction to make the connection to the new parent object. If a relationship URL parameter was passed to the structure browser, the system selects a valid (for the combination of child/parent object) relationship to make the connection. To implement a different connection method, see Custom Logic for Connections in the Structure Browser for details. You can control which child rows can be cut and pasted using the editRelationship URL parameter. When a value is passed for this parameter to the structure browser, only child objects connected to the parent objects using one of the specified relationship can be cut and pasted. If this parameter is not passed, there are no restrictions on which child objects can be cut and pasted. The connectionProgram and expandProgram URL parameters also determine which objects can be edited, based on their internal logic. In addition, you can control which child rows can be cut/pasted from/to the same parent object. For example, if the sequence of child objects is significant to the business process, the user may want to move a child from one location in the list to another, while retaining the same parent object. The resequenceRelationship URL parameter defines which relationships permit this action. For example, if this parameter is passed as resequenceRelationship=relationship_EBOM, then only child objects connected with this relationship can be cut/pasted from/to the same parent object. If connected with a different relationship, it can still be cut, but must be pasted to a different parent object (depending on the value of the editRelationship URL parameter). When the user clicks on the Mode button again, the page toggles back to view mode. The following figure shows the structure browser in edit mode: In edit mode, there is a visual cue to indicate that some of the columns / cells in the table are editable. There are visual cues to indicate the edits after the user has clicked outside the editing area. The system displays an Apply button in the edit mode of the table so that the user can apply changes. This eliminates the need to submit a massive number of forms in a single submit. It also eliminates the need to draw a table with thousands of form elements.
Child rows of newly-added rows can be edited prior to applying the edit that added the row. |