|
From: David I. (JIRA) <no...@at...> - 2007-02-01 10:22:41
|
AbstractTableMasterForm and refilter Master table after set new Matcher or changer Matcher properties
------------------------------------------------------------------------------------------------------
Key: RCP-462
URL: http://opensource.atlassian.com/projects/spring/browse/RCP-462
Project: Spring Framework Rich Client Project
Type: Improvement
Components: Application Framework
Versions: 0.3.0
Environment: last checkout
Reporter: David Ignjic
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://opensource.atlassian.com/projects/spring/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
|