- type: the type of the property on which a restriction we will added.
- expr: an HQL expression that performs the filtering.
- param: params for the expression which can be the name of the filter to map the user input.
Use the "me" variable to reference the entity where you are creating the filter.
<filter display = DISPLAY label = LABEL name = NAME type = TYPE > <restriction expr = HQL> <param value = VALUE /> </restriction> </filter>
- Advanced filtering example.
<entity label="Opportunity" menu="Opportunities" name="Opportunity"> ... <filter display="primary" label="Contact" name="contactFilter"> <restriction expr="me.company in (select company from Company as company where ? in (select contact.surname from Contact as contact where contact.company=me.company))"> <param value="contactFilter"/> </restriction> </filter> ... </entity>