Behavior: Filter

posted May 18, 2012, 6:00 AM by Eric Patrick


The Filter behavior is intended to provide an elegant method for users to filter search results. The standard theme include a Search box in the main menu, pictured below.
Users have two options:
  1. Enter search criteria into the text box and press enter, executing a 'Smart Search', or
  2. Click on the down arrow to get an 'advanced search' page
The advanced search page is simply an AJAX render of {Table}.Filter.xslt.


This control is wired as follows:
  • {Table}.Home.xslt: call the MainMenu template, and include a SearchOptions parameter
  • {Table}.Filter.xslt: include whatever fields you want to allow a user to search by
    • See Templates/Mortgage/Valuation.Filter.xslt
    • See Templates/Mortgage/Loan.Filter.xslt
{Table}.Home.xslt sample:

<xsl:call-template name="MainMenu">
<xsl:with-param name="SearchOptions">{url:'Templates/Mortgage/Loan.Filter.xslt'}</xsl:with-param>

You can unit test {Table}.Filter.xslt layouts by navigating to:
  • Theme.ashx/Test?Transform=Templates/{Namespace}/{Table}.Filter.xslt 
  • E.g. Theme.ashx/Test?Transform=Templates/Mortgage/Loan.Filter.xslt
  • E.g.  Theme.ashx/Test?Transform=Templates/Message/Message.Filter.xslt