Tutorial: Customizing Web services and WebSphere Portal to support a new search > < Previous | Next >

 

Add an expression-builder for the new search expression

This section refers to adding an expression-builder for the new search expression.In the project explorer view of the WebSphere Portal development environment:

  1. Expand WebContent/WEB-INF/config/com.ibm.commerce.catalog

  2. Open get-data-config.xml under com.ibm.commerce.catalog folder.

  3. Insert the following XML before the closing </_config:get-data-config> tag
    <expression-builder>              
                   
    <name>findCatalogEntriesDetailsByPriceRange</name>
                   
    <data-type-name>CatalogEntry</data-type-name>
            <expression-template>
                   
    {_wcf.ap=$accessProfile$}/CatalogEntry[Price[StandardPrice[Price[(Price[@criteria='$name$']
    and Price &gt;= '$minPrice$')  and (Price[@criteria='$name$']
    and Price &lt;= '$maxPrice$') ]]]]</expression-template>
                    <param>
                            <name>accessProfile</name>
                           
    <value>WC_CatalogEntryDetailsProfile</value>
                    </param>
                    <param>
                            <name>currency</name>
                            <value>USD</value>
                    </param>
    </expression-builder>
    

< Previous | Next >