Customizing the Customer Details View
Context
The Customer Details view is the default view of the application. When the application is accessed from the SAP NetWeaver Mobile client, this is the first view that is displayed.
The view should have the following UI elements:
-
Customertable: It should display all the attribute values of the Customer data object .
-
Show Orders button: On activation, the application should call the fireQuery method and navigate to the Order Details view.
-
Exit button: On activation, the application should exit from the window. For this, you have to call the exit method you defined in the CustomerCompWindow .
Procedure
-
In the Laptop UI explorer, expand the servapp development component
-
Expand the nodes
-
Double-click the CustomerDetails view.
-
Choose the Properties tab.
-
Choose Add , and select CustomerCompWindow as the required controller.
-
Choose Save , and then choose the Layout tab.
-
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 Customer as the table name.
-
Select the attributes of the Customer node, and choose Finish .
-
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 Show Orders for the button ID
-
In the Properties tab for the button, perform the following actions:
Property
Actions
Text
Enter ShowOrders
OnAction
-
Choose Create and enter the following details:
Name: ShowOrders
Fire Plug: ToOrderDetails
-
Choose Finish.
-
-
Choose Save .
-
In the Outline view, double-click the Show Orders button.
-
In the Properties tab, select the OnAction property and choose Go .
-
Enter the following code:
ShowOrders method
public void onActionShoworders(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionShoworders(ServerEvent)
wdThis.wdGetCustomerCompController().fireQuery();
wdThis.wdFirePlugToOrderDetails();
//@@end
-
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 Exit for the button ID.
-
In the properties tab for the button, perform the following actions:
Property
Actions
Text
Enter Exit
OnAction
-
Choose Create and enter the following details:
Name: ExitApp
-
Choose Finish .
-
-
Choose Save .
-
In the Outline view, double-click the Exit button.
-
In the Properties tab, select the OnAction property and choose Go .
-
Enter the following code:
ExitApp method
public void onActionExitApp(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionExitApp(ServerEvent)
wdThis.wdGetCustomerCompWindowController().wdFirePlugExit();
//@@end

