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

< Previous | Next >


Determine the ID of the user interface widget to modify

In this step, you determine which user interface element of the IBM Sales Center to extend, and you gather the necessary information about the extension point.


Enable widget hover logging

  1. In the IBM Sales Center development environment, import all of the plug-ins with the name com.ibm.commerce.telesales.ui.impl* into the workspace as binary projects. By importing the projects, you can search for the ID of the user interface element that corresponds to the Order Items table.

    To import the plug-ins:

    1. Click the Plug-ins view and select all of the plug-ins that begin with com.ibm.commerce.telesales.ui.impl. By default, the Plug-ins view is displayed in the Plug-in Development perspective in the left pane.

    2. Right-click the selected plug-ins and select Import > As Binary Project. The imported projects are displayed in the Package Explorer view.

  2. Enable widget hover logging. When widget hover logging is enabled you can hover the mouse pointer over the user interface widget to be modified and its ID gets displayed in the console of the IBM Sales Center development environment. This is an efficient method for locating the widget ID.

    1. In the IBM Sales Center development environment, from the main menu, click Run > Run.

    2. On the Run dialog, select the Tracing tab.

    3. Select Enable tracing for the selected plug-ins.

    4. In the Plug-ins that support tracing pane, select the check box for com.ibm.commerce.telesales.widgets. The screen should appear as shown in the following screen capture:

    6.Click Run to open the IBM Sales Center client.


Hover over the user interface widget to modify

In this section, you hover the mouse pointer over the Order Items table to find its ID.

  1. To determine the user interface widget that corresponds to the Order Items table:

    1. Open the order you created before.

    2. Click the Order Items tab to display the Order Items table in the editor. Notice that the table headings are displayed as follows, without the Fulfillment Centers column:

  2. Notice how the trace changes as the mouse is moved over the user interface. Hover the mouse pointer over the Order Items table and note the user interface widget names that are displayed in the console view of the IBM Sales Center development environment. The trace indicates that the ID of the Order Items table definition is com.ibm.commerce.telesales.ui.impl.orderItemPageItemTable.orderitempage.

    Tip: To determine the widget ID, be able to view the Console output within the Sales Center plug-in development environment while navigating the Sales Center screens. Therefore you might need to reduce the size of the IBM Sales Center window so that the Console is also visible. You might also have to resize the Console trace window.

  3. Close the IBM Sales Center client.

  4. In the IBM Sales Center development environment, click Search > File.

  5. In the Containing text field, enter orderItemPageItemTable.orderitempage.

  6. In the File name patterns field, enter *.xml.

  7. Click Search.

  8. In the Search view, two search results are displayed. For the result in com.ibm.commerce.telesales.ui.impl.order, open the fragment.xml file to view the following text:

          
<control  
                tableDefinitionId="orderItemPageTableDefinition"   
   
                multi="true" type="table"
managerType="salesContainerItemPageManager"       
                modelPath="salescontainer.items">              
            
<property name="tableType"
value="orderItemPageItemTable"/> 
          
</control>

At this point, you know that the user interface widget that to modify is the Order Items table, and it is defined in the com.ibm.commerce.telesales.ui.impl.order plug-in, with the tableDefinitionId orderItemPageTableDefinition.default.


Disable the previously enabled hover logging

  1. In the Sales Center plug-in development environment, from the main menu, select Run > Run.

  2. In the Run window, select the Tracing tab and clear Enable tracing for the selected plug-ins.

  3. Click Apply and then click Close.

< Previous | Next >


+

Search Tips   |   Advanced Search