I have a DS as give below :
FilterBuilder is initialized using below code :
The filter builder shows both name,alive opetions in dropdown as expected.
I have many fields that I don't want to show in filterbuilder. For ex : I just want to show name, address field in filterBuilder and user should not be allowed to filter by 'alive' field.
How can I remove datasource fields from filterBuilder?
Thanks in advance.
Code:
<DataSource ID="Test" serverType="hibernate" beanClassName="com.test.Test" configBean="mySessionFactory" autoDeriveSchema="false" dropExtraFields="true"> <fields> <!-- Keys --> <field name="id" type="integer" primaryKey="true" hidden="true"/> <field name="name" type="text"/> <field name="alive" type="boolean"/> <field name="address" type="text"/> </fields> </DataSource>
Code:
FilterBuilder fb = new FilterBuilder(); fb.setDataSource(DataSource.get("Test"));
I have many fields that I don't want to show in filterbuilder. For ex : I just want to show name, address field in filterBuilder and user should not be allowed to filter by 'alive' field.
How can I remove datasource fields from filterBuilder?
Thanks in advance.
Comment