From da40d1d2ef8b44222710aa5c26c383415289c80f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Aragunde=20P=C3=A9rez?= Date: Thu, 6 May 2010 15:02:58 +0200 Subject: [PATCH] ItEr57S10CUEscaladoPantallaCargaRecursosEmpresaItEr56S11: Partial rewrite of the name filter on the resources load panel. Now it works faster, and the bug that reset the filter right after having used it is solved. --- .../resourceload/ResourcesLoadPanel.java | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/ganttzk/src/main/java/org/zkoss/ganttz/resourceload/ResourcesLoadPanel.java b/ganttzk/src/main/java/org/zkoss/ganttz/resourceload/ResourcesLoadPanel.java index f43422656..97bd8b564 100644 --- a/ganttzk/src/main/java/org/zkoss/ganttz/resourceload/ResourcesLoadPanel.java +++ b/ganttzk/src/main/java/org/zkoss/ganttz/resourceload/ResourcesLoadPanel.java @@ -381,7 +381,28 @@ public class ResourcesLoadPanel extends HtmlMacroComponent { public void onSelectFilterByName(Integer filterByNamePosition) { this.filterByNamePosition = filterByNamePosition.intValue(); this.feedBackMessage = _("filtering by name"); - invalidatingChangeHappenedWithFeedback(); + changeNameFilterWithFeedback(); + } + + private void changeNameFilterWithFeedback() { + LongOperationFeedback.execute(componentOnWhichGiveFeedback, + new ILongOperation() { + + @Override + public void doAction() throws Exception { + treeModel = createModelForTree(); + timeTrackerComponent = timeTrackerForResourcesLoadPanel(timeTracker); + resourceLoadList = new ResourceLoadList(timeTracker, treeModel); + leftPane = new ResourceLoadLeftPane(treeModel, resourceLoadList); + registerNeededScripts(); + afterCompose(); + } + + @Override + public String getName() { + return getFeedBackMessage(); + } + }); } public void setNameFilterDisabled(boolean disabled) {