Category:Filter

From JRapid

(Redirected from Filter)
Jump to: navigation, search

Filters allow end users specify restrictions to listings. They provide all the necessary programming structure (UI elements, server side code and web services).

A filter is defined primary by it's mode which defines it's capabilities and you can specify a subset to a filter in order to add extra filtering code.

Company filters

The "mode" attribute of a filter enables or disables filter's capabilities.

Filter modes:

  • auto mode: filter the listing by the value of a property.
  • basic mode: allows to specify multiple conditions for properties.
  • advanced mode: filter by an hql expression.
  • mixed mode: both basic and advanced mode.

Example:

In the following example we have a Company entity has three instances stored in the database.

All results

In the following examples we will create filters for the companies instances to show only the ones which meets with de conditions.

  • Filtering companies instances by "status":
Filtering by status
  • Filtering companies instances by "name":
Filtering by name

Code for the examples:

<entity name="Company" label="Company">
     <filter display="primary" flag="like" label="Name" name="name" property="name"/>
     <filter display="primary" label="Responsable" name="responsableFilter">
            <condition field="responsable" value="responsableFilter"/>
     </filter>
     <filter display="primary" flag="exact" label="Status" name="statusFilter" property="status"/>
</entity>

Usage:

 <filter 
             name = NAME
             entity = ENTITY
             type = TYPE
             label = LABEL
             property = COLUMN_NAME
             subset = SUBSET
             flag = "like | beginswith | exact"
             widget = WIDGET
             display = "primary | secondary"
             collection = "list | set | sortedset"
             comboproperty = COMBOPROPERTY>
             [Contents: enum*, restriction*, and*, or*, condition* ]   
 </filter>
  1. entity: entity to be filtered.
  2. type: data type of the field to be filtered.
  3. property: property to be filtered.
  4. flag: sets the way that the input text is matched to the field being filtered.
  5. widget: sets the way the filter is displayed. See widgets section.
  6. collection: indicates that what is being filtered is a collection.

See also:

Subcategories

This category has the following 2 subcategories, out of 2 total.

C

M

Pages in category "Filter"

The following 2 pages are in this category, out of 2 total.

D

R

Personal tools