Tutorials > Sales Center > Add a new search option in the IBM Sales Center

< Previous | Next >


Create a gridCompositeDefinition

In the previous step, you created three control widgets to define the new search option. In this step we will create the gridCompositeDefinition that groups the three widgets together. The composite definition is tied to the first composite control and adds the second and third controls as its children.

To create the gridCompositeDefinition:


Procedure

  1. In the Editor view, click the Extensions tab.

  2. Click Add.

  3. From the Available extension points list, select com.ibm.commerce.telesales.widgets.compositeDefinitions and click Finish.

  4. Right-click com.ibm.commerce.telesales.widgets.compositeDefinitions and click New > gridCompositeDefinition.

  5. In the Extension Element Details pane, set the following values. Notice that the id value is the same as the id you specified for the first control widget:

    Detail Value
    id productQuickPageMFPartNumCompositeDefinition
    layoutId com.ibm.commerce.telesales.ui.impl.standardGridLayout

  6. Save the file.

  7. In the All Extensions pane, right-click productQuickPageMFPartNumCompositeDefinition, and select New > row. This row will contain the label and input field.

  8. In the Extension Element Details pane, set the id of the new row to findProductMFPartNumberRow.

  9. Save the file.

  10. In the All Extensions pane, select findProductMFPartNumberRow, and select New > control.

  11. In the Extension Element Details pane, set the following values. Notice that the controlId value is the same as the id you specified in the label control:

    Detail Value
    controlId MyNewSearchOptionLabel
    dataId com.ibm.commerce.telesales.ui.impl.requiredLabelGridData

  12. Save the file.

  13. Repeat the previous two steps with the following values. Notice that the controlID value is the same as the id you specified in the input field control widget:

    Detail Value
    controlId MyNewSearchOptionField
    dataId com.ibm.commerce.telesales.ui.impl.findTextFieldGridData

  14. Save the file.


View the source code

To view the the changes in the source code of the plugin.xml file:

  1. Click the plugin.xml tab.

  2. Examine the source code and view the changes in the source code.

    <extension
    point="com.ibm.commerce.telesales.widgets.compositeDefinitions">
           
    <gridCompositeDefinition
     
    layoutId="com.ibm.commerce.telesales.ui.impl.standardGridLayout">
         
    <row >
                  
    <control controlId="
    MyNewSearchOptionLabel"
    dataId="com.ibm.commerce.telesales.ui.impl.requiredLabelGridData"/>
                 
    <control controlId="
    MyNewSearchOptionField"
    dataId="com.ibm.commerce.telesales.ui.impl.findTextFieldGridData"/>
         
    </row>
           
    </gridCompositeDefinition>
    </extension>
    

< Previous | Next >


+

Search Tips   |   Advanced Search