Tutorials > Sales Center > Add an editable column to the Order Items table by creating a new widget manager

< Previous | Next >


Determine which BOD is used to store information about the fulfillment center

In this step of the tutorial, you determine what BOD is used to communicate with Sales Center and which class needs to be extended on the server side.

Sales Center relies on BOD to communicate with Commerce. Because BOD messages are event-driven, after each action, a BOD might be created depending on what the action entails. You can run Sales Center and see instantaneously what BOD messages are created. By default, the tracing of BOD messages is disabled. To enable it, complete steps 1-5 of Tutorial Step 8, Determining which BOD is used to communicate from the server to the client.

For the purpose of this tutorial, you have to determine in which BOD it makes sense to store information about the selected fulfillment center when choosing it in the orders item table. Look at the default BODs, keeping in mind that the editable column is in the order item editor. Select the Order Items tab:

In the directory where the BOD messages are kept, four BODs are created as a result of this:

Because you are dealing with orders, intuitively, you can see that Sales Center sends the GetSalesOrder BOD to the WebSphere Commerce Server, and it in returns replies by sending ShowSalesOrder BOD. It is the ShowSalesOrder BOD that you are interested in modifying. Open this BOD to study its contents and attempt to match it with the APIs found in the next section.


Determine which class to extend

Now to see how the ShowSalesOrder BOD is created. Specifically, you want determine which class creates this BOD.

To do this, refer to the ShowSalesOrder API.

To pass only single name-value data by way of the BOD, Sales Center, by design, lets you use its UserData section without extending client side as you did when extending GetStoreRequest for extending the ShowStore BOD. After going through the methods and examining the ShowSalesOrder BOD, you can see that the createUserdataInLineElement method is probably the best method to create the UserData section in the ShowSalesOrder BOD. Typically, you can tell by the name, but in cases where you are uncertain, you can also look at the method that calls createUserdataInLineElement. In this case, the call sequence is buildNounElementDetailInfo -> createLineElement -> createLineDetailElement -> createSingleLineDetailElement -> createUserdataInLineElement, which explains clearly how createUserdataInLineElement is invoked.

< Previous | Next >


+

Search Tips   |   Advanced Search