
The Order Details view displays the orders for the selected customer. The user selects the customer in the Customer Details view.
The view should have the following UI elements:
Orders table: It should display the attribute values of the Service data object. It should display only the orders of the selected customer and should allow the user to enter/ update specific values in the table.
Save button: On activation, the application should save the values entered in the Orders table to the local database.
Back button: On activation, the application should navigate to the Customer Details view.
In the Laptop UI explorer, expand the servapp development component.
Expand the nodes
Double-click the OrderDetails view.
In the Outline view of the SAP NetWeaver Developer Studio, click RootUIElementContainer with the secondary mouse button and choose ApplyTemplate .
Select the Table template, and enter Orders as the table name.
Select the attributes of the QueryResult node, and choose Next .
For the attributes EQUIPTYPE , HOURS_SPENT , and PERC_DONE - select InputField as the Editor .
In the Outline view of the SAP NetWeaver Developer Studio, arrange the order in which the columns should appear on the UI. You arrange the order by clicking the table attribute with the secondary mouse button and choosing either of the options Move Up or Move Down.
Enter the name for the column headers. Each table attribute has a header attribute and an editor attribute. You enter the name in the text property of the header attribute.
In the Outline view of the SAP NetWeaver Developer Studio, click RootUIElementContainer with the secondary mouse button, and choose Insert Child .
Choose Button , and enter Save for the button ID
In the Properties tab for the Save button, perform the following actions:
|
Property |
Actions |
|
Text |
Enter Save |
|
OnAction |
|
Choose Save .
In the Outline view, double-click the S ave button.
In the Properties tab, select the OnAction property and choose Go .
Enter the following code:
Variable declaration
|
//@@begin others ServiceModels model = ServiceModels.getInstance(); //@@end |
Save method
|
public void onActionSave(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent ) { //@@begin onActionSave(ServerEvent) model.commit(); //@@end |
Choose Button , and enter Back for the button ID.
In the Properties tab for the Back button, perform the following actions:
|
Property |
Actions |
|
Text |
Enter Back |
|
OnAction |
|