Author: heiko.braun(a)jboss.com
Date: 2009-05-19 10:04:18 -0400 (Tue, 19 May 2009)
New Revision: 4847
Modified:
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DeleteInstanceAction.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceDetailView.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/LoadDefinitionsAction.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/LoadInstancesAction.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDetailView.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/StateChangeAction.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstanceDetailAction.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateProcessDetailAction.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/LoadTasksAction.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/LoadTasksParticipationAction.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksView.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/ParticipantPanel.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskDetailView.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/UpdateDetailsAction.java
Log:
Replace clear() with clearView(). Use controller to clear detail panels
Modified:
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java
===================================================================
---
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java 2009-05-19
10:32:53 UTC (rev 4846)
+++
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java 2009-05-19
14:04:18 UTC (rev 4847)
@@ -21,24 +21,21 @@
*/
package org.jboss.bpm.console.client.process;
+import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.ChangeListener;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.Widget;
-import com.google.gwt.core.client.GWT;
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
-import com.mvc4g.client.ViewInterface;
import org.gwt.mosaic.ui.client.ListBox;
+import org.gwt.mosaic.ui.client.MessageBox;
import org.gwt.mosaic.ui.client.ToolBar;
import org.gwt.mosaic.ui.client.ToolButton;
-import org.gwt.mosaic.ui.client.MessageBox;
import org.gwt.mosaic.ui.client.layout.*;
import org.gwt.mosaic.ui.client.list.DefaultListModel;
-import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
-import org.jboss.bpm.console.client.LazyPanel;
-import org.jboss.bpm.console.client.util.ConsoleLog;
-import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
import org.jboss.bpm.console.client.common.AbstractView;
+import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
import java.util.List;
@@ -130,7 +127,7 @@
{
if(isInitialized())
{
- // update details
+ // clear details
controller.handleEvent(
new Event(UpdateProcessDetailAction.ID, null)
);
@@ -226,6 +223,8 @@
{
model.add(def);
}
+
+
}
public ProcessDefinitionRef getSelection()
Modified:
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DeleteInstanceAction.java
===================================================================
---
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DeleteInstanceAction.java 2009-05-19
10:32:53 UTC (rev 4846)
+++
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DeleteInstanceAction.java 2009-05-19
14:04:18 UTC (rev 4847)
@@ -61,14 +61,14 @@
public void handleSuccessfulResponse(final Controller controller, final Object event,
Response response)
{
- DefinitionListView view =
(DefinitionListView)controller.getView(DefinitionListView.ID);
- ProcessDefinitionRef proc = view.getSelection();
+ InstanceListView view = (InstanceListView) controller.getView(InstanceListView.ID);
+ ProcessDefinitionRef def = view.getCurrentDefinition();
// refresh instances
controller.handleEvent(
new Event(
LoadInstancesAction.ID,
- proc
+ def
)
);
}
Modified:
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceDetailView.java
===================================================================
---
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceDetailView.java 2009-05-19
10:32:53 UTC (rev 4846)
+++
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceDetailView.java 2009-05-19
14:04:18 UTC (rev 4847)
@@ -71,7 +71,7 @@
grid.update(values);
}
- public void clear()
+ public void clearView()
{
grid.clear();
this.currentInstance = null;
Modified:
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/LoadDefinitionsAction.java
===================================================================
---
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/LoadDefinitionsAction.java 2009-05-19
10:32:53 UTC (rev 4846)
+++
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/LoadDefinitionsAction.java 2009-05-19
14:04:18 UTC (rev 4847)
@@ -26,6 +26,7 @@
import com.google.gwt.json.client.JSONParser;
import com.google.gwt.json.client.JSONValue;
import com.mvc4g.client.Controller;
+import com.mvc4g.client.Event;
import org.jboss.bpm.console.client.ApplicationContext;
import org.jboss.bpm.console.client.util.ConsoleLog;
import org.jboss.bpm.console.client.common.AbstractRESTAction;
@@ -72,6 +73,11 @@
DefinitionListView view = (DefinitionListView)
controller.getView(DefinitionListView.ID);
view.update(definitions);
+ // clear details
+ controller.handleEvent(
+ new Event(UpdateProcessDetailAction.ID, null)
+ );
+
ConsoleLog.info("Loaded " + definitions.size() + " process
definitions");
}
else
Modified:
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/LoadInstancesAction.java
===================================================================
---
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/LoadInstancesAction.java 2009-05-19
10:32:53 UTC (rev 4846)
+++
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/LoadInstancesAction.java 2009-05-19
14:04:18 UTC (rev 4847)
@@ -26,6 +26,7 @@
import com.google.gwt.json.client.JSONParser;
import com.google.gwt.json.client.JSONValue;
import com.mvc4g.client.Controller;
+import com.mvc4g.client.Event;
import org.jboss.bpm.console.client.ApplicationContext;
import org.jboss.bpm.console.client.util.ConsoleLog;
import org.jboss.bpm.console.client.common.AbstractRESTAction;
@@ -75,6 +76,11 @@
InstanceListView view = (InstanceListView) controller.getView(InstanceListView.ID);
view.update(def, instances);
+ // clear details
+ controller.handleEvent(
+ new Event(UpdateInstanceDetailAction.ID, null)
+ );
+
ConsoleLog.info("Loaded " + instances.size() + " process
instances");
}
Modified:
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDetailView.java
===================================================================
---
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDetailView.java 2009-05-19
10:32:53 UTC (rev 4846)
+++
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDetailView.java 2009-05-19
14:04:18 UTC (rev 4847)
@@ -72,7 +72,7 @@
grid.update(values);
}
- public void clear()
+ public void clearView()
{
grid.clear();
this.currentProcess = null;
Modified:
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/StateChangeAction.java
===================================================================
---
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/StateChangeAction.java 2009-05-19
10:32:53 UTC (rev 4846)
+++
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/StateChangeAction.java 2009-05-19
14:04:18 UTC (rev 4847)
@@ -65,8 +65,7 @@
public void handleSuccessfulResponse(final Controller controller, final Object event,
Response response)
{
- InstanceListView view = (InstanceListView)
- controller.getView(InstanceListView.ID);
+ InstanceListView view = (InstanceListView) controller.getView(InstanceListView.ID);
ProcessDefinitionRef def = view.getCurrentDefinition();
// force reload instance list
Modified:
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstanceDetailAction.java
===================================================================
---
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstanceDetailAction.java 2009-05-19
10:32:53 UTC (rev 4846)
+++
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstanceDetailAction.java 2009-05-19
14:04:18 UTC (rev 4847)
@@ -40,6 +40,6 @@
if(instance!=null)
view.update(instance);
else
- view.clear();
+ view.clearView();
}
}
Modified:
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateProcessDetailAction.java
===================================================================
---
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateProcessDetailAction.java 2009-05-19
10:32:53 UTC (rev 4846)
+++
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateProcessDetailAction.java 2009-05-19
14:04:18 UTC (rev 4847)
@@ -40,6 +40,6 @@
if(process!=null)
view.update(process);
else
- view.clear();
+ view.clearView();
}
}
Modified:
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java
===================================================================
---
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java 2009-05-19
10:32:53 UTC (rev 4846)
+++
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java 2009-05-19
14:04:18 UTC (rev 4847)
@@ -63,7 +63,7 @@
super();
this.appContext = appContext;
ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
- setTitle("Your Tasks");
+ setTitle("Personal Tasks");
setIcon(icons.userIcon());
this.detailsView = detailsView;
@@ -118,6 +118,7 @@
}
else
{
+ // clear details
controller.handleEvent(
new Event(UpdateDetailsAction.ID, new
DetailViewEvent("AssignedDetailView", null))
);
@@ -273,7 +274,9 @@
{
if(TaskRef.STATE.ASSIGNED ==task.getCurrentState())
model.add(task);
- }
+ }
+
+ this.invalidate();
}
}
Modified:
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/LoadTasksAction.java
===================================================================
---
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/LoadTasksAction.java 2009-05-19
10:32:53 UTC (rev 4846)
+++
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/LoadTasksAction.java 2009-05-19
14:04:18 UTC (rev 4847)
@@ -23,12 +23,14 @@
import org.jboss.bpm.console.client.common.AbstractRESTAction;
import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.task.events.DetailViewEvent;
import org.jboss.bpm.console.client.util.ConsoleLog;
import org.jboss.bpm.console.client.model.DTOParser;
import org.jboss.bpm.console.client.model.TaskRef;
import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.http.client.Response;
import com.mvc4g.client.Controller;
+import com.mvc4g.client.Event;
import java.util.List;
@@ -74,5 +76,10 @@
ConsoleLog.info("Loaded " + tasks.size() + " tasks");
view.update(identity, tasks);
+
+ // clear details
+ controller.handleEvent(
+ new Event(UpdateDetailsAction.ID, new
DetailViewEvent("AssignedDetailView", null))
+ );
}
}
Modified:
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/LoadTasksParticipationAction.java
===================================================================
---
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/LoadTasksParticipationAction.java 2009-05-19
10:32:53 UTC (rev 4846)
+++
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/LoadTasksParticipationAction.java 2009-05-19
14:04:18 UTC (rev 4847)
@@ -23,12 +23,14 @@
import org.jboss.bpm.console.client.common.AbstractRESTAction;
import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.task.events.DetailViewEvent;
import org.jboss.bpm.console.client.util.ConsoleLog;
import org.jboss.bpm.console.client.model.DTOParser;
import org.jboss.bpm.console.client.model.TaskRef;
import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.http.client.Response;
import com.mvc4g.client.Controller;
+import com.mvc4g.client.Event;
import java.util.List;
@@ -73,6 +75,11 @@
OpenTasksView view = (OpenTasksView)controller.getView(OpenTasksView.ID);
ConsoleLog.info("Loaded " + tasks.size() + " tasks");
- view.update(identity, tasks);
+ view.update(identity, tasks);
+
+ // details
+ controller.handleEvent(
+ new Event(UpdateDetailsAction.ID, new DetailViewEvent("OpenDetailView",
null))
+ );
}
}
Modified:
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksView.java
===================================================================
---
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksView.java 2009-05-19
10:32:53 UTC (rev 4846)
+++
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksView.java 2009-05-19
14:04:18 UTC (rev 4847)
@@ -57,7 +57,7 @@
this.appContext = appContext;
ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
- setTitle("Open Tasks");
+ setTitle("Group Tasks");
setIcon(icons.taskIcon());
this.detailsView = detailView;
Modified:
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/ParticipantPanel.java
===================================================================
---
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/ParticipantPanel.java 2009-05-19
10:32:53 UTC (rev 4846)
+++
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/ParticipantPanel.java 2009-05-19
14:04:18 UTC (rev 4847)
@@ -147,7 +147,7 @@
this.invalidate();
}
- public void clear()
+ public void clearView()
{
tree.clear();
currentTask = null;
Modified:
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskDetailView.java
===================================================================
---
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskDetailView.java 2009-05-19
10:32:53 UTC (rev 4846)
+++
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskDetailView.java 2009-05-19
14:04:18 UTC (rev 4847)
@@ -30,6 +30,7 @@
import org.gwt.mosaic.ui.client.DeckLayoutPanel;
import org.gwt.mosaic.ui.client.layout.BoxLayout;
import org.gwt.mosaic.ui.client.layout.BoxLayoutData;
+import org.gwt.mosaic.ui.client.layout.LayoutPanel;
import org.jboss.bpm.console.client.common.PropertyGrid;
import org.jboss.bpm.console.client.model.TaskRef;
import org.jboss.bpm.console.client.LazyPanel;
@@ -57,8 +58,7 @@
{
// render
- super("Task details");
- this.setLayout(new BoxLayout(BoxLayout.Orientation.VERTICAL));
+ super("Task details");
super.setStyleName("bpm-detail-panel");
@@ -110,7 +110,9 @@
}
else
{
- this.add(grid);
+ LayoutPanel p = new LayoutPanel();
+ p.add(grid);
+ this.add(p);
}
this.initialzed = true;
@@ -139,13 +141,14 @@
participantPanel.update(task);
}
- public void clear()
+ public void clearView()
{
- currentTask = null;
grid.clear();
if(openView && participantPanel !=null) // event handling is broken. The
change listener fires too early
- participantPanel.clear();
+ participantPanel.clearView();
+
+ currentTask = null;
}
}
Modified:
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/UpdateDetailsAction.java
===================================================================
---
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/UpdateDetailsAction.java 2009-05-19
10:32:53 UTC (rev 4846)
+++
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/UpdateDetailsAction.java 2009-05-19
14:04:18 UTC (rev 4847)
@@ -43,6 +43,6 @@
if(task!=null)
view.update(task);
else
- view.clear();
+ view.clearView();
}
}