Hi all,
My requirement is to exclude a particular cabinet while a user performs advanced search.I override buildQuery method in my custom class as given in search development guide and added additional constraint to default query. However after doing this customisation search is working perfectly but when a user saves this search and again tries to edit it we get the error: Failed to bind a search constraint.
Follwing is the code which i wrote in my custom class:
public class CustomAdvanceSearch extends AdvSearchEx{
protected IDfQueryBuilder buildQuery() throws Exception
{
IDfQueryBuilder qb = super.buildQuery();
IDfExpressionSet rootSet = qb.getRootExpressionSet();
IDfExpressionSet setAnd = rootSet.addExpressionSet
(IDfExpressionSet.LOGICAL_OP_AND);
setAnd.addSimpleAttrExpression("acl_name", IDfValue.DF_STRING,
IDfSimpleAttrExpression.SEARCH_OP_DOES_NOT_CONTAIN, true, false, "custom_acl");
return qb;
}
}
here all the objects in the cabinet to be excluded use "custom_acl". webtop version is 6.5 SP2.
Can someone suggest how to achieve this without affecting saved search.
Regards
Gaurav