Hello Isomoprhic or anyone,
in our application, we use a FilterBuilder to filter a ListGrid using the FilterBuilder.getCriteria() and ListGrid.FilterData(Criteria) methods. This all works fine.
What we want though, is a way of representing the actual criteria in a user-friendly readable string.
E.g.: criteria like these:
convert as such:
[Salary < 8000] and [[title contains(ignore case) Manager] or [reports notNull]]
So I'd have two questions:
1. Is there any method to achieve such conversion of Criteria into a nice looking string? I haven't found any.
2. If not, then it's no biggie for me as I do already have code to achieve this in some way.
The problem I'm having is with localization of operators from Criteria. The operators are being correctly localized inside the respective FormItems in the FilterBuilder but how do I localize an operator obtained from Criteria.getOperator() (which returns OperatorId String value)?
Thanks a lot
(SmartClient Version: v11.1p_2017-10-13/Pro Deployment (built 2017-10-13))
in our application, we use a FilterBuilder to filter a ListGrid using the FilterBuilder.getCriteria() and ListGrid.FilterData(Criteria) methods. This all works fine.
What we want though, is a way of representing the actual criteria in a user-friendly readable string.
E.g.: criteria like these:
Code:
{ _constructor:"AdvancedCriteria", operator:"and", criteria:[ { fieldName:"salary", operator:"lessThan", value:"80000" }, { operator:"or", criteria:[ { fieldName:"title", operator:"iContains", value:"Manager" }, { fieldName:"reports", operator:"notNull" } ] } ] }
[Salary < 8000] and [[title contains(ignore case) Manager] or [reports notNull]]
So I'd have two questions:
1. Is there any method to achieve such conversion of Criteria into a nice looking string? I haven't found any.
2. If not, then it's no biggie for me as I do already have code to achieve this in some way.
The problem I'm having is with localization of operators from Criteria. The operators are being correctly localized inside the respective FormItems in the FilterBuilder but how do I localize an operator obtained from Criteria.getOperator() (which returns OperatorId String value)?
Thanks a lot
(SmartClient Version: v11.1p_2017-10-13/Pro Deployment (built 2017-10-13))
Comment