jeudi 26 février 2015

Dynamic Data filtering

I am creating a web project in which user enters some filter criteria and data are rendered to a grid. The criteria will be passed to a Rest Service and will be based on properties defined in the model classes defined on the server.


Example: let's assume that the service returns chocolates and the user requests ((ChocolateColor == DarkBlack) || (ChocolateColor == White) && ChocolatePrice > 1.5 Euros) || ChocolateOwner == "ChocoMan". I want to be able to extract the filter runtime and convert it to a filter against my model classes. Instead of creating tons of code parsing the filter is there more clever way to apply my filters ?


The filters will be given directly as boolean expressions or will be constructed by using a GUI.





Aucun commentaire:

Enregistrer un commentaire