Java/Swing (and GUI in general) - technique or patterns to build dynamic search form with criterias/filters
I feel recurrent the need of building a search formula or filter panel using logic and expression.
Here are some example expressions: search all item with price >= $100 and available in stock. filter all files with (name like *.log or name = toto.txt) and modification date < 2 hours from now
I know how to implement such a search/filtering pattern for performing the search, but I hand code the gui part, losing a lot of possibilities (and/or stuff, ...).
Does someone know a generic way of building this kind of dynamic form allowing user to create its own request graphically ? In this kind of form the user will be able to select w开发者_JS百科hich criteria are relevant, enter its own values and create logical expression.
The JBoss Rules Guvnor interface provides a way to build your own criteria (albeit not for searching). If you have an instance of Thunderbird at hand, it's search criteria builder is quite similar. This is a fairly common pattern, but it's not one I tend to implement for enterprise applications.
精彩评论