Category:Filter
From JRapid
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.
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.
In the following examples we will create filters for the companies instances to show only the ones which meets with de conditions.
|
|
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>
- entity: entity to be filtered.
- type: data type of the field to be filtered.
- property: property to be filtered.
- flag: sets the way that the input text is matched to the field being filtered.
- widget: sets the way the filter is displayed. See widgets section.
- 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.
