|
From: Lieven D. (JIRA) <no...@sp...> - 2008-10-09 19:49:19
|
[ http://jira.springframework.org/browse/RCP-462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lieven Doclo updated RCP-462:
-----------------------------
Fix Version/s: 1.x
> AbstractTableMasterForm and refilter Master table after set new Matcher or changer Matcher properties
> ------------------------------------------------------------------------------------------------------
>
> Key: RCP-462
> URL: http://jira.springframework.org/browse/RCP-462
> Project: Spring Framework Rich Client Project
> Issue Type: Improvement
> Components: Application Framework
> Affects Versions: 1.0.0
> Environment: last checkout
> Reporter: David Ignjic
> Fix For: 1.x
>
>
> I make patch to AbstractTableMasterForm to refiltering master table
> Example usage is when you display master/detail with houndres record user need filter.
> Index: C:/develop/wokplace/spring-richclient/sandbox/src/main/java/org/springframework/richclient/form/AbstractTableMasterForm.java
> ===================================================================
> --- C:/develop/wokplace/spring-richclient/sandbox/src/main/java/org/springframework/richclient/form/AbstractTableMasterForm.java (revision 1704)
> +++ C:/develop/wokplace/spring-richclient/sandbox/src/main/java/org/springframework/richclient/form/AbstractTableMasterForm.java (working copy)
> @@ -61,7 +61,7 @@
> private Matcher matcher;
> private MatcherEditor matcherEditor;
> private Comparator comparator;
> -
> + private FilterList filterList;
> /**
> * Construct a new AbstractTableMasterForm using the given parent form model and
> * property path. The form model for this class will be constructed by getting the
> @@ -164,9 +164,9 @@
>
> // Install the matcher if configured (this will filter the list)
> if( matcher != null ) {
> - eventList = new FilterList(eventList, matcher);
> + eventList = filterList = new FilterList(eventList, matcher);
> } else if( matcherEditor != null ) {
> - eventList = new FilterList(eventList, matcherEditor);
> + eventList = filterList = new FilterList(eventList, matcherEditor);
> }
>
> // Install the sorter if configured
> @@ -311,5 +311,15 @@
> protected TableModel getMasterTableModel() {
> return getMasterTable() != null ? getMasterTable().getModel() : null;
> }
> -
> +
> + public void reFilter() {
> + if (filterList != null) {
> + if (matcher != null) {
> + filterList.setMatcher(matcher);
> + } else if (matcherEditor != null) {
> + filterList.setMatcherEditor(matcherEditor);
> + }
> +
> + }
> + }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.springframework.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|