
In the Layout tab of the view editor, a black border appears around the table for order headers to indicate that the entire table is selected. The Properties pane (bottom-right view) displays all table properties.
Two buttons ( Go (disabled) and Create (enabled)) appear.
The event handler coding opens. The section that you need to edit is highlighted.
The complete code should be as follows:
|
/** * Event handler [onActionOnOrderHeaderSelect]. */ public void onActionOnOrderHeaderSelect (Event wdEvent) { //@@begin onActionOnOrderHeaderSelect(ServerEvent) OrderComp. getInstance ().getItemsByOrderId(); //@@end } |
Open
Java
Editor
.In the Outline pane (by default in the bottom-left corner), getItemsByOrderId() to find the right section.
The custom code executes the query, binds the query result to the respective node, and reloads the data into the node.
The complete code should be as follows:
|
/** * Method [getItemsByOrderId]. */ public void getItemsByOrderId() { //@@begin getItemsByOrderId() //$$begin (Mobile Service Component) if (wdContext.nodeorder_srv().nodegetOrderHeaders().nodegetOrderHeadersOutput().currentgetOrderHeadersOutputElement() != null ) { getItemsByOrderId.setPi_orderid(wdContext.nodeorder_srv().nodegetOrderHeaders().nodegetOrderHeadersOutput().currentgetOrderHeadersOutputElement().getOrderid()); wdContext.nodeorder_srv().nodegetItemsByOrderId().nodegetItemsByOrderIdOutput().bind(getItemsByOrderId.execute()); wdContext.nodeorder_srv().nodegetItemsByOrderId().nodegetItemsByOrderIdOutput().reload(); } //$$end |