Overlord SVN: r953 - in bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client: common and 4 other directories.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2010-02-05 09:31:54 -0500 (Fri, 05 Feb 2010)
New Revision: 953
Added:
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/PreferencesModule.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ServerStatusModule.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/Model.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/ModelCommands.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/ModelParts.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentModule.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/JobListModule.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessModule.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportModule.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksModule.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksModule.java
Modified:
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ErraiApplication.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentListView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/UpdateDeploymentsAction.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstancesAction.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksView.java
Log:
Add code split points. Use message bus for inter module dependencies
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ErraiApplication.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ErraiApplication.java 2010-02-04 16:05:51 UTC (rev 952)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ErraiApplication.java 2010-02-05 14:31:54 UTC (rev 953)
@@ -30,10 +30,7 @@
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
import org.gwt.mosaic.ui.client.MessageBox;
-import org.jboss.bpm.console.client.engine.UpdateDeploymentsAction;
-import org.jboss.bpm.console.client.engine.ViewDeploymentAction;
import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
-import org.jboss.bpm.console.client.process.UpdateDefinitionsAction;
import org.jboss.bpm.console.client.util.ConsoleLog;
import org.jboss.errai.bus.client.ClientMessageBus;
import org.jboss.errai.bus.client.ErraiBus;
@@ -153,10 +150,6 @@
// register global views and actions, available across editors
//controller.addView(Header.ID, header);
controller.addAction(LoadingStatusAction.ID, new LoadingStatusAction());
- controller.addAction(BootstrapAction.ID, new BootstrapAction());
-
- controller.addAction(ViewDeploymentAction.ID, new ViewDeploymentAction());
- controller.addAction(UpdateDeploymentsAction.ID, new UpdateDeploymentsAction());
- controller.addAction(UpdateDefinitionsAction.ID, new UpdateDefinitionsAction());
+ controller.addAction(BootstrapAction.ID, new BootstrapAction());
}
}
Added: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/PreferencesModule.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/PreferencesModule.java (rev 0)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/PreferencesModule.java 2010-02-05 14:31:54 UTC (rev 953)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.RunAsyncCallback;
+import org.jboss.bpm.console.client.util.ConsoleLog;
+import org.jboss.errai.common.client.framework.WSComponent;
+import org.jboss.errai.common.client.framework.WidgetCallback;
+import org.jboss.errai.workspaces.client.framework.annotations.LoadTool;
+
+@LoadTool(name = "Preferences", group = "Settings", icon = "runtimeIcon")
+public class PreferencesModule implements WSComponent
+{
+ static PreferencesView instance = null;
+
+ public void getWidget(final WidgetCallback callback)
+ {
+ GWT.runAsync(
+ new RunAsyncCallback()
+ {
+ public void onFailure(Throwable err)
+ {
+ ConsoleLog.error("Failed to load tool", err);
+ }
+
+ public void onSuccess()
+ {
+ if (instance == null) {
+ instance = new PreferencesView();
+ }
+ instance.getWidget(callback);
+ }
+ }
+ );
+
+ }
+}
Added: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ServerStatusModule.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ServerStatusModule.java (rev 0)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ServerStatusModule.java 2010-02-05 14:31:54 UTC (rev 953)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.RunAsyncCallback;
+import org.jboss.bpm.console.client.util.ConsoleLog;
+import org.jboss.errai.common.client.framework.WSComponent;
+import org.jboss.errai.common.client.framework.WidgetCallback;
+import org.jboss.errai.workspaces.client.framework.annotations.LoadTool;
+
+@LoadTool(name = "System", group = "Settings", icon="docIcon")
+public class ServerStatusModule implements WSComponent
+{
+ static ServerStatusView instance = null;
+
+ public void getWidget(final WidgetCallback callback)
+ {
+ GWT.runAsync(
+ new RunAsyncCallback()
+ {
+ public void onFailure(Throwable err)
+ {
+ ConsoleLog.error("Failed to load tool", err);
+ }
+
+ public void onSuccess()
+ {
+ if (instance == null) {
+ instance = new ServerStatusView();
+ }
+ instance.getWidget(callback);
+ }
+ }
+
+ );
+
+ }
+}
Added: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/Model.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/Model.java (rev 0)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/Model.java 2010-02-05 14:31:54 UTC (rev 953)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client.common;
+
+
+/**
+ * @see org.jboss.bpm.console.client.common.ModelCommands
+ * @see org.jboss.bpm.console.client.common.ModelParts
+ */
+public interface Model
+{
+ public String SUBJECT = "appContext.model.listener";
+ public String DEPLOYMENT_MODEL = "deploymentModel";
+ public String PROCESS_MODEL = "processModel";
+ public String TASK_MODEL = "taskModel";
+
+}
Added: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/ModelCommands.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/ModelCommands.java (rev 0)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/ModelCommands.java 2010-02-05 14:31:54 UTC (rev 953)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client.common;
+
+public enum ModelCommands
+{
+ // Somebody please update the model
+ HAS_BECOME_STALE,
+
+ // It's done, please refresh the view
+ HAS_BEEN_UPDATED
+
+}
Added: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/ModelParts.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/ModelParts.java (rev 0)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/ModelParts.java 2010-02-05 14:31:54 UTC (rev 953)
@@ -0,0 +1,28 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client.common;
+
+public enum ModelParts
+{
+ // What model are we talking about?
+ CLASS
+}
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentListView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentListView.java 2010-02-04 16:05:51 UTC (rev 952)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentListView.java 2010-02-05 14:31:54 UTC (rev 953)
@@ -102,6 +102,7 @@
controller.addAction(SuspendDeploymentAction.ID, new SuspendDeploymentAction());
controller.addAction(ResumeDeploymentAction.ID, new ResumeDeploymentAction());
controller.addAction(ExecuteJobAction.ID, new ExecuteJobAction());
+ //controller.addAction(ViewDeploymentAction.ID, new ViewDeploymentAction());
controller.addView(DeploymentListView.ID, this);
Added: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentModule.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentModule.java (rev 0)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentModule.java 2010-02-05 14:31:54 UTC (rev 953)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client.engine;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.RunAsyncCallback;
+import org.jboss.bpm.console.client.util.ConsoleLog;
+import org.jboss.errai.bus.server.annotations.security.RequireRoles;
+import org.jboss.errai.common.client.framework.WSComponent;
+import org.jboss.errai.common.client.framework.WidgetCallback;
+import org.jboss.errai.workspaces.client.framework.annotations.LoadTool;
+
+@LoadTool(name = "Deployments", group = "Runtime", icon="deploymentIcon")
+@RequireRoles({"administrator"})
+public class DeploymentModule implements WSComponent
+{
+ static DeploymentListView instance = null;
+
+ public void getWidget(final WidgetCallback callback)
+ {
+ GWT.runAsync(
+ new RunAsyncCallback()
+ {
+ public void onFailure(Throwable err)
+ {
+ ConsoleLog.error("Failed to load tool", err);
+ }
+
+ public void onSuccess()
+ {
+ if (instance == null) {
+ instance = new DeploymentListView();
+ }
+ instance.getWidget(callback);
+ }
+ }
+
+ );
+ }
+}
Added: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/JobListModule.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/JobListModule.java (rev 0)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/JobListModule.java 2010-02-05 14:31:54 UTC (rev 953)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client.engine;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.RunAsyncCallback;
+import org.jboss.bpm.console.client.util.ConsoleLog;
+import org.jboss.errai.bus.server.annotations.security.RequireRoles;
+import org.jboss.errai.common.client.framework.WSComponent;
+import org.jboss.errai.common.client.framework.WidgetCallback;
+import org.jboss.errai.workspaces.client.framework.annotations.LoadTool;
+
+@LoadTool(name = "Jobs", group = "Runtime", icon="jobsIcon")
+@RequireRoles({"administrator"})
+public class JobListModule implements WSComponent
+{
+ static JobListView instance;
+
+ public void getWidget(final WidgetCallback callback)
+ {
+ GWT.runAsync(
+ new RunAsyncCallback()
+ {
+ public void onFailure(Throwable err)
+ {
+ ConsoleLog.error("Failed to load tool", err);
+ }
+
+ public void onSuccess()
+ {
+ if (instance == null) {
+ instance = new JobListView();
+ }
+ instance.getWidget(callback);
+ }
+ }
+
+ );
+ }
+}
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/UpdateDeploymentsAction.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/UpdateDeploymentsAction.java 2010-02-04 16:05:51 UTC (rev 952)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/UpdateDeploymentsAction.java 2010-02-05 14:31:54 UTC (rev 953)
@@ -26,13 +26,12 @@
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.URLBuilder;
-import org.jboss.bpm.console.client.common.AbstractRESTAction;
-import org.jboss.bpm.console.client.common.DataDriven;
+import org.jboss.bpm.console.client.common.*;
import org.jboss.bpm.console.client.model.DTOParser;
import org.jboss.bpm.console.client.model.DeploymentRef;
-import org.jboss.bpm.console.client.process.UpdateDefinitionsAction;
+import org.jboss.errai.bus.client.ErraiBus;
+import org.jboss.errai.bus.client.MessageBuilder;
import java.util.List;
@@ -89,9 +88,13 @@
view.select(deploymentId);
// refresh process definitions
- controller.handleEvent(
- new Event(UpdateDefinitionsAction.ID, null)
- );
+ MessageBuilder.createMessage()
+ .toSubject(Model.SUBJECT)
+ .command(ModelCommands.HAS_BEEN_UPDATED)
+ .with(ModelParts.CLASS, Model.DEPLOYMENT_MODEL)
+ .noErrorHandling()
+ .sendNowWith(ErraiBus.get()
+ );
}
}
}
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java 2010-02-04 16:05:51 UTC (rev 952)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java 2010-02-05 14:31:54 UTC (rev 953)
@@ -27,8 +27,11 @@
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.gen2.table.event.client.RowSelectionEvent;
import com.google.gwt.gen2.table.event.client.RowSelectionHandler;
+import com.google.gwt.user.client.Command;
+import com.google.gwt.user.client.DeferredCommand;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.HTML;
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
import com.mvc4g.client.ViewInterface;
@@ -36,11 +39,11 @@
import org.gwt.mosaic.ui.client.ToolBar;
import org.gwt.mosaic.ui.client.layout.*;
import org.gwt.mosaic.ui.client.list.DefaultListModel;
-import org.jboss.bpm.console.client.common.DataDriven;
-import org.jboss.bpm.console.client.common.LoadingOverlay;
-import org.jboss.bpm.console.client.common.PagingCallback;
-import org.jboss.bpm.console.client.common.PagingPanel;
+import org.jboss.bpm.console.client.common.*;
import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
+import org.jboss.errai.bus.client.ErraiBus;
+import org.jboss.errai.bus.client.Message;
+import org.jboss.errai.bus.client.MessageCallback;
import org.jboss.errai.common.client.framework.WSComponent;
import org.jboss.errai.common.client.framework.WidgetCallback;
import org.jboss.errai.workspaces.client.Registry;
@@ -87,6 +90,7 @@
controller.addAction(StateChangeAction.ID, new StateChangeAction());
controller.addAction(DeleteDefinitionAction.ID, new DeleteDefinitionAction());
controller.addAction(DeleteInstanceAction.ID, new DeleteInstanceAction());
+ controller.addAction(UpdateDefinitionsAction.ID, new UpdateDefinitionsAction());
initialize();
@@ -133,14 +137,7 @@
new Button("Refresh", new ClickHandler() {
public void onClick(ClickEvent clickEvent)
{
- final DefaultListModel<ProcessDefinitionRef> model =
- (DefaultListModel<ProcessDefinitionRef>) listBox.getModel();
- model.clear();
-
- // force loading
- controller.handleEvent(
- new Event(UpdateDefinitionsAction.ID, null)
- );
+ reload();
}
}
)
@@ -212,10 +209,46 @@
panel.add(layout);
+ // deployments model listener
+ ErraiBus.get().subscribe(Model.SUBJECT,
+ new MessageCallback()
+ {
+ public void callback(Message message)
+ {
+ switch (ModelCommands.valueOf(message.getCommandType()))
+ {
+ case HAS_BEEN_UPDATED:
+ if(message.get(String.class, ModelParts.CLASS).equals(Model.DEPLOYMENT_MODEL))
+ reload();
+ break;
+ }
+ }
+ });
+
isInitialized = true;
}
}
+ private void reload()
+ {
+ DeferredCommand.addCommand(
+ new Command()
+ {
+ public void execute()
+ {
+ final DefaultListModel<ProcessDefinitionRef> model =
+ (DefaultListModel<ProcessDefinitionRef>) listBox.getModel();
+ model.clear();
+
+ // force loading
+ controller.handleEvent(
+ new Event(UpdateDefinitionsAction.ID, null)
+ );
+ }
+ }
+ );
+ }
+
private ListBox createListBox()
{
final ListBox<ProcessDefinitionRef> listBox =
@@ -230,7 +263,8 @@
ProcessDefinitionRef item) {
switch (column) {
case 0:
- listBox.setText(row, column, item.getName());
+ String text = item.isSuspended() ? "<div style=\"color:#CCCCCC\">"+item.getName()+"</div>" : item.getName();
+ listBox.setWidget(row, column, new HTML(text));
break;
case 1:
listBox.setText(row, column, String.valueOf(item.getVersion()));
@@ -255,18 +289,21 @@
{
ProcessDefinitionRef item = listBox.getItem(index);
- // update details
- controller.handleEvent(
- new Event(UpdateProcessDetailAction.ID, item)
- );
+ if(!item.isSuspended())
+ {
+ // update details
+ controller.handleEvent(
+ new Event(UpdateProcessDetailAction.ID, item)
+ );
- // load instances
- controller.handleEvent(
- new Event(
- UpdateInstancesAction.ID,
- item
- )
- );
+ // load instances
+ controller.handleEvent(
+ new Event(
+ UpdateInstancesAction.ID,
+ item
+ )
+ );
+ }
}
}
}
Added: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessModule.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessModule.java (rev 0)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessModule.java 2010-02-05 14:31:54 UTC (rev 953)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client.process;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.RunAsyncCallback;
+import org.jboss.bpm.console.client.util.ConsoleLog;
+import org.jboss.errai.common.client.framework.WSComponent;
+import org.jboss.errai.common.client.framework.WidgetCallback;
+import org.jboss.errai.workspaces.client.framework.annotations.LoadTool;
+
+@LoadTool(name = "Process Overview", group = "Processes", icon = "processIcon")
+public class ProcessModule implements WSComponent
+{
+ static MergedProcessView instance = null;
+
+ public void getWidget(final WidgetCallback callback)
+ {
+ ProcessModule.createInstance(callback);
+ }
+
+ public static void createInstance(final WidgetCallback callback)
+ {
+ GWT.runAsync(
+ new RunAsyncCallback()
+ {
+ public void onFailure(Throwable err)
+ {
+ ConsoleLog.error("Failed to load tool", err);
+ }
+
+ public void onSuccess()
+ {
+ if (instance == null) {
+ instance = new MergedProcessView();
+ }
+ instance.getWidget(callback);
+ }
+ }
+
+ );
+
+ }
+}
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstancesAction.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstancesAction.java 2010-02-04 16:05:51 UTC (rev 952)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstancesAction.java 2010-02-05 14:31:54 UTC (rev 953)
@@ -25,12 +25,13 @@
import com.google.gwt.http.client.Response;
import com.mvc4g.client.Controller;
import org.jboss.bpm.console.client.URLBuilder;
-import org.jboss.bpm.console.client.common.AbstractRESTAction;
-import org.jboss.bpm.console.client.common.DataDriven;
+import org.jboss.bpm.console.client.common.*;
import org.jboss.bpm.console.client.model.JSOParser;
import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
import org.jboss.bpm.console.client.model.ProcessInstanceRef;
import org.jboss.bpm.console.client.util.ConsoleLog;
+import org.jboss.errai.bus.client.ErraiBus;
+import org.jboss.errai.bus.client.MessageBuilder;
import java.util.List;
@@ -78,6 +79,15 @@
ConsoleLog.info("Loaded " + instances.size() + " process instance(s) in "+(System.currentTimeMillis()-start)+" ms");
+ // refresh tasks
+ MessageBuilder.createMessage()
+ .toSubject(Model.SUBJECT)
+ .command(ModelCommands.HAS_BEEN_UPDATED)
+ .with(ModelParts.CLASS, Model.PROCESS_MODEL)
+ .noErrorHandling()
+ .sendNowWith(ErraiBus.get()
+ );
+
}
}
Added: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportModule.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportModule.java (rev 0)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportModule.java 2010-02-05 14:31:54 UTC (rev 953)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client.report;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.RunAsyncCallback;
+import org.jboss.bpm.console.client.util.ConsoleLog;
+import org.jboss.errai.common.client.framework.WSComponent;
+import org.jboss.errai.common.client.framework.WidgetCallback;
+import org.jboss.errai.workspaces.client.framework.annotations.LoadTool;
+
+@LoadTool(name = "Report Templates", group = "Reporting", icon="reportIcon")
+public class ReportModule implements WSComponent
+{
+ ReportView instance = null;
+
+ public void getWidget(final WidgetCallback callback)
+ {
+ GWT.runAsync(
+ new RunAsyncCallback()
+ {
+ public void onFailure(Throwable err)
+ {
+ ConsoleLog.error("Failed to load tool", err);
+ }
+
+ public void onSuccess()
+ {
+ if (instance == null) {
+ instance = new ReportView();
+ }
+ instance.getWidget(callback);
+ }
+ }
+
+ );
+ }
+}
Added: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksModule.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksModule.java (rev 0)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksModule.java 2010-02-05 14:31:54 UTC (rev 953)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client.task;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.RunAsyncCallback;
+import org.jboss.bpm.console.client.util.ConsoleLog;
+import org.jboss.errai.common.client.framework.WSComponent;
+import org.jboss.errai.common.client.framework.WidgetCallback;
+import org.jboss.errai.workspaces.client.framework.annotations.LoadTool;
+
+@LoadTool(name = "Personal Tasks", group = "Tasks", priority = 2, icon = "userIcon")
+public class AssignedTasksModule implements WSComponent
+{
+ static AssignedTasksView instance = null;
+
+ public void getWidget(final WidgetCallback callback)
+ {
+ GWT.runAsync(
+ new RunAsyncCallback()
+ {
+ public void onFailure(Throwable err)
+ {
+ ConsoleLog.error("Failed to load tool", err);
+ }
+
+ public void onSuccess()
+ {
+ if (instance == null) {
+ instance = new AssignedTasksView();
+ }
+ instance.getWidget(callback);
+ }
+ }
+
+ );
+ }
+}
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java 2010-02-04 16:05:51 UTC (rev 952)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java 2010-02-05 14:31:54 UTC (rev 953)
@@ -41,6 +41,9 @@
import org.jboss.bpm.console.client.task.events.DetailViewEvent;
import org.jboss.bpm.console.client.task.events.TaskIdentityEvent;
import org.jboss.bpm.console.client.util.SimpleDateFormat;
+import org.jboss.errai.bus.client.ErraiBus;
+import org.jboss.errai.bus.client.Message;
+import org.jboss.errai.bus.client.MessageCallback;
import org.jboss.errai.common.client.framework.WSComponent;
import org.jboss.errai.common.client.framework.WidgetCallback;
import org.jboss.errai.workspaces.client.Registry;
@@ -159,10 +162,8 @@
new Button("Refresh", new ClickHandler() {
public void onClick(ClickEvent clickEvent)
{
- // force loading
- controller.handleEvent(
- new Event(LoadTasksAction.ID, appContext.getAuthentication().getUsername())
- );
+ reload();
+
}
}
)
@@ -189,9 +190,7 @@
{
public void onWindowClosed()
{
- controller.handleEvent(
- new Event(LoadTasksAction.ID, appContext.getAuthentication().getUsername())
- );
+ reload();
}
}
);
@@ -271,15 +270,29 @@
viewBtn.setEnabled(hasDispatcherPlugin);
+ // deployments model listener
+ ErraiBus.get().subscribe(Model.SUBJECT,
+ new MessageCallback()
+ {
+ public void callback(Message message)
+ {
+ switch (ModelCommands.valueOf(message.getCommandType()))
+ {
+ case HAS_BEEN_UPDATED:
+ if(message.get(String.class, ModelParts.CLASS).equals(Model.PROCESS_MODEL))
+ reload();
+ break;
+ }
+ }
+ });
+
Timer t = new Timer()
{
@Override
public void run()
{
// force loading
- controller.handleEvent(
- new Event(LoadTasksAction.ID, appContext.getAuthentication().getUsername())
- );
+ reload();
}
};
@@ -289,6 +302,14 @@
}
}
+ private void reload()
+ {
+ // force loading
+ controller.handleEvent(
+ new Event(LoadTasksAction.ID, appContext.getAuthentication().getUsername())
+ );
+ }
+
public void reset()
{
final DefaultListModel<TaskRef> model =
Added: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksModule.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksModule.java (rev 0)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksModule.java 2010-02-05 14:31:54 UTC (rev 953)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client.task;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.RunAsyncCallback;
+import org.jboss.bpm.console.client.util.ConsoleLog;
+import org.jboss.errai.common.client.framework.WSComponent;
+import org.jboss.errai.common.client.framework.WidgetCallback;
+import org.jboss.errai.workspaces.client.framework.annotations.LoadTool;
+
+@LoadTool(name = "Group Tasks", group = "Tasks", priority = 1, icon = "taskIcon")
+public class OpenTasksModule implements WSComponent
+{
+ static OpenTasksView instance = null;
+
+ public void getWidget(final WidgetCallback callback)
+ {
+ GWT.runAsync(
+ new RunAsyncCallback()
+ {
+ public void onFailure(Throwable err)
+ {
+ ConsoleLog.error("Failed to load tool", err);
+ }
+
+ public void onSuccess()
+ {
+ if (instance == null) {
+ instance = new OpenTasksView();
+ }
+ instance.getWidget(callback);
+ }
+ }
+
+ );
+ }
+}
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksView.java 2010-02-04 16:05:51 UTC (rev 952)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksView.java 2010-02-05 14:31:54 UTC (rev 953)
@@ -35,14 +35,14 @@
import org.gwt.mosaic.ui.client.layout.*;
import org.gwt.mosaic.ui.client.list.DefaultListModel;
import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.common.DataDriven;
-import org.jboss.bpm.console.client.common.LoadingOverlay;
-import org.jboss.bpm.console.client.common.PagingCallback;
-import org.jboss.bpm.console.client.common.PagingPanel;
+import org.jboss.bpm.console.client.common.*;
import org.jboss.bpm.console.client.model.TaskRef;
import org.jboss.bpm.console.client.task.events.DetailViewEvent;
import org.jboss.bpm.console.client.task.events.TaskIdentityEvent;
import org.jboss.bpm.console.client.util.SimpleDateFormat;
+import org.jboss.errai.bus.client.ErraiBus;
+import org.jboss.errai.bus.client.Message;
+import org.jboss.errai.bus.client.MessageCallback;
import org.jboss.errai.common.client.framework.WSComponent;
import org.jboss.errai.common.client.framework.WidgetCallback;
import org.jboss.errai.workspaces.client.Registry;
@@ -184,11 +184,9 @@
new Button("Refresh", new ClickHandler() {
public void onClick(ClickEvent clickEvent)
{
- // force loading
- controller.handleEvent(
- new Event(LoadTasksParticipationAction.ID, getAssignedIdentity())
- );
+ reload();
+
}
}
)
@@ -249,15 +247,30 @@
controller.addView("OpenDetailView", detailsView);
detailsView.initialize();
+
+ // deployments model listener
+ ErraiBus.get().subscribe(Model.SUBJECT,
+ new MessageCallback()
+ {
+ public void callback(Message message)
+ {
+ switch (ModelCommands.valueOf(message.getCommandType()))
+ {
+ case HAS_BEEN_UPDATED:
+ if(message.get(String.class, ModelParts.CLASS).equals(Model.PROCESS_MODEL))
+ reload();
+ break;
+ }
+ }
+ });
+
Timer t = new Timer()
{
@Override
public void run()
{
// force loading
- controller.handleEvent(
- new Event(LoadTasksParticipationAction.ID, getAssignedIdentity())
- );
+ reload();
}
};
@@ -267,7 +280,15 @@
}
}
+ private void reload()
+ {
+ // force loading
+ controller.handleEvent(
+ new Event(LoadTasksParticipationAction.ID, getAssignedIdentity())
+ );
+ }
+
public void reset()
{
final DefaultListModel<TaskRef> model =
14 years, 3 months
Overlord SVN: r952 - in bpm-console/trunk/gui/war: src/main/java/org/jboss/bpm/console/client and 5 other directories.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2010-02-04 11:05:51 -0500 (Thu, 04 Feb 2010)
New Revision: 952
Modified:
bpm-console/trunk/gui/war/pom.xml
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ErraiApplication.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/PreferencesView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ServerStatusView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/AbstractRESTAction.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/LoadingOverlay.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/WidgetWindowPanel.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentListView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/JobListView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceListView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/MergedProcessView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportFrame.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AbstractTaskList.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksView.java
Log:
Set split points
Modified: bpm-console/trunk/gui/war/pom.xml
===================================================================
--- bpm-console/trunk/gui/war/pom.xml 2010-02-04 11:04:12 UTC (rev 951)
+++ bpm-console/trunk/gui/war/pom.xml 2010-02-04 16:05:51 UTC (rev 952)
@@ -200,7 +200,7 @@
<runTarget>app.html</runTarget>
<warSourceDirectory>war</warSourceDirectory>
<extraJvmArgs>-Xmx512m</extraJvmArgs>
- <localWorkers>2</localWorkers>
+ <localWorkers>2</localWorkers>
</configuration>
<executions>
<execution>
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ErraiApplication.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ErraiApplication.java 2010-02-04 11:04:12 UTC (rev 951)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ErraiApplication.java 2010-02-04 16:05:51 UTC (rev 952)
@@ -41,7 +41,6 @@
import org.jboss.errai.workspaces.client.Registry;
import org.jboss.errai.workspaces.client.framework.annotations.DefaultBundle;
import org.jboss.errai.workspaces.client.framework.annotations.GroupOrder;
-import org.jboss.errai.workspaces.client.modules.auth.AuthenticationModule;
/**
* Main entry point for the BPM console module
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java 2010-02-04 11:04:12 UTC (rev 951)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java 2010-02-04 16:05:51 UTC (rev 952)
@@ -36,14 +36,9 @@
import org.jboss.bpm.console.client.util.ConsoleLog;
import org.jboss.errai.bus.client.ErraiBus;
import org.jboss.errai.bus.client.MessageBuilder;
-import org.jboss.errai.bus.client.protocols.SecurityCommands;
import org.jboss.errai.bus.client.protocols.SecurityParts;
import org.jboss.errai.bus.client.security.SecurityService;
-import org.jboss.errai.workspaces.client.Preferences;
import org.jboss.errai.workspaces.client.Registry;
-import org.jboss.errai.workspaces.client.Workspace;
-import org.jboss.errai.workspaces.client.protocols.LayoutCommands;
-import org.jboss.errai.workspaces.client.protocols.LayoutParts;
import java.util.List;
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/PreferencesView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/PreferencesView.java 2010-02-04 11:04:12 UTC (rev 951)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/PreferencesView.java 2010-02-04 16:05:51 UTC (rev 952)
@@ -25,7 +25,6 @@
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.ListBox;
-import com.google.gwt.user.client.ui.Widget;
import com.mvc4g.client.Controller;
import com.mvc4g.client.ViewInterface;
import org.gwt.mosaic.ui.client.layout.BoxLayout;
@@ -34,17 +33,16 @@
import org.gwt.mosaic.ui.client.layout.MosaicPanel;
import org.jboss.bpm.console.client.common.HeaderLabel;
import org.jboss.errai.common.client.framework.WSComponent;
+import org.jboss.errai.common.client.framework.WidgetCallback;
import org.jboss.errai.workspaces.client.Preferences;
import org.jboss.errai.workspaces.client.Registry;
import org.jboss.errai.workspaces.client.framework.ToolSet;
-import org.jboss.errai.workspaces.client.framework.annotations.LoadTool;
import java.util.List;
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-@LoadTool(name = "Preferences", group = "Settings", icon = "runtimeIcon")
public class PreferencesView implements ViewInterface, WSComponent
{
@@ -61,7 +59,7 @@
this.controller = controller;
}
- public Widget getWidget()
+ public void getWidget(WidgetCallback callback)
{
panel = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));
@@ -108,7 +106,7 @@
panel.add(layout, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
- return panel;
+ callback.onSuccess(panel);
}
}
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ServerStatusView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ServerStatusView.java 2010-02-04 11:04:12 UTC (rev 951)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ServerStatusView.java 2010-02-04 16:05:51 UTC (rev 952)
@@ -21,7 +21,10 @@
*/
package org.jboss.bpm.console.client;
-import com.google.gwt.user.client.ui.*;
+import com.google.gwt.user.client.ui.Grid;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.Image;
+import com.google.gwt.user.client.ui.Label;
import com.mvc4g.client.Controller;
import com.mvc4g.client.ViewInterface;
import org.gwt.mosaic.ui.client.layout.BoxLayout;
@@ -32,13 +35,12 @@
import org.jboss.bpm.console.client.model.PluginInfo;
import org.jboss.bpm.console.client.model.ServerStatus;
import org.jboss.errai.common.client.framework.WSComponent;
+import org.jboss.errai.common.client.framework.WidgetCallback;
import org.jboss.errai.workspaces.client.Registry;
-import org.jboss.errai.workspaces.client.framework.annotations.LoadTool;
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-@LoadTool(name = "System", group = "Settings", icon="docIcon")
public class ServerStatusView
implements ViewInterface, LazyPanel, WSComponent
{
@@ -61,7 +63,7 @@
}
@Override
- public Widget getWidget()
+ public void getWidget(WidgetCallback callback)
{
layoutPanel = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));
@@ -95,7 +97,7 @@
update(ServerPlugins.getStatus());
- return layoutPanel;
+ callback.onSuccess(layoutPanel);
}
public void setController(Controller controller)
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/AbstractRESTAction.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/AbstractRESTAction.java 2010-02-04 11:04:12 UTC (rev 951)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/AbstractRESTAction.java 2010-02-04 16:05:51 UTC (rev 952)
@@ -23,7 +23,6 @@
import com.google.gwt.http.client.*;
import com.google.gwt.user.client.Timer;
-import com.google.gwt.user.client.ui.Widget;
import com.mvc4g.client.ActionInterface;
import com.mvc4g.client.Controller;
import org.jboss.bpm.console.client.ApplicationContext;
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/LoadingOverlay.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/LoadingOverlay.java 2010-02-04 11:04:12 UTC (rev 951)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/LoadingOverlay.java 2010-02-04 16:05:51 UTC (rev 952)
@@ -21,7 +21,6 @@
*/
package org.jboss.bpm.console.client.common;
-import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Widget;
import org.gwt.mosaic.ui.client.infopanel.InfoPanel;
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/WidgetWindowPanel.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/WidgetWindowPanel.java 2010-02-04 11:04:12 UTC (rev 951)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/WidgetWindowPanel.java 2010-02-04 16:05:51 UTC (rev 952)
@@ -22,10 +22,7 @@
package org.jboss.bpm.console.client.common;
import com.google.gwt.user.client.Window;
-import com.google.gwt.user.client.WindowCloseListener;
-import com.google.gwt.user.client.WindowResizeListener;
import com.google.gwt.user.client.ui.Widget;
-import org.gwt.mosaic.core.client.Dimension;
import org.gwt.mosaic.ui.client.Caption;
import org.gwt.mosaic.ui.client.WindowPanel;
import org.jboss.bpm.console.client.util.WindowUtil;
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentListView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentListView.java 2010-02-04 11:04:12 UTC (rev 951)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentListView.java 2010-02-04 16:05:51 UTC (rev 952)
@@ -21,13 +21,11 @@
*/
package org.jboss.bpm.console.client.engine;
-import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.gen2.table.event.client.RowSelectionEvent;
import com.google.gwt.gen2.table.event.client.RowSelectionHandler;
import com.google.gwt.user.client.Timer;
-import com.google.gwt.user.client.ui.AbstractImagePrototype;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ChangeListener;
import com.google.gwt.user.client.ui.Widget;
@@ -39,16 +37,13 @@
import org.gwt.mosaic.ui.client.ToolBar;
import org.gwt.mosaic.ui.client.layout.*;
import org.gwt.mosaic.ui.client.list.DefaultListModel;
-import org.jboss.bpm.console.client.common.AbstractView;
import org.jboss.bpm.console.client.common.DataDriven;
import org.jboss.bpm.console.client.common.LoadingOverlay;
-import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
import org.jboss.bpm.console.client.model.DeploymentRef;
import org.jboss.bpm.console.client.util.SimpleDateFormat;
-import org.jboss.errai.bus.server.annotations.security.RequireRoles;
import org.jboss.errai.common.client.framework.WSComponent;
+import org.jboss.errai.common.client.framework.WidgetCallback;
import org.jboss.errai.workspaces.client.Registry;
-import org.jboss.errai.workspaces.client.framework.annotations.LoadTool;
import java.util.Date;
import java.util.List;
@@ -57,8 +52,6 @@
* List of deployments
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-@LoadTool(name = "Deployments", group = "Runtime", icon="deploymentIcon")
-@RequireRoles({"administrator"})
public class DeploymentListView implements ViewInterface, WSComponent, DataDriven
{
public final static String ID = DeploymentListView.class.getName();
@@ -92,7 +85,7 @@
}
- public Widget getWidget()
+ public void getWidget(WidgetCallback callback)
{
panel = new MosaicPanel(new BorderLayout());
listBox = createListBox();
@@ -113,7 +106,8 @@
controller.addView(DeploymentListView.ID, this);
- return panel;
+ callback.onSuccess(panel);
+
}
private ListBox createListBox()
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/JobListView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/JobListView.java 2010-02-04 11:04:12 UTC (rev 951)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/JobListView.java 2010-02-04 16:05:51 UTC (rev 952)
@@ -43,10 +43,9 @@
import org.jboss.bpm.console.client.common.LoadingOverlay;
import org.jboss.bpm.console.client.model.JobRef;
import org.jboss.bpm.console.client.util.SimpleDateFormat;
-import org.jboss.errai.bus.server.annotations.security.RequireRoles;
import org.jboss.errai.common.client.framework.WSComponent;
+import org.jboss.errai.common.client.framework.WidgetCallback;
import org.jboss.errai.workspaces.client.Registry;
-import org.jboss.errai.workspaces.client.framework.annotations.LoadTool;
import java.util.Date;
import java.util.List;
@@ -57,8 +56,6 @@
*
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-@LoadTool(name = "Jobs", group = "Runtime", icon="jobsIcon")
-@RequireRoles({"administrator"})
public class JobListView implements ViewInterface, WSComponent, DataDriven
{
public final static String ID = JobListView.class.getName();
@@ -89,7 +86,7 @@
controller = Registry.get(Controller.class);
}
- public Widget getWidget()
+ public void getWidget(WidgetCallback callback)
{
panel = new MosaicPanel();
@@ -101,7 +98,7 @@
controller.addView(JobListView.ID, this);
- return panel;
+ callback.onSuccess(panel);
}
private ListBox createListBox()
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java 2010-02-04 11:04:12 UTC (rev 951)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java 2010-02-04 16:05:51 UTC (rev 952)
@@ -29,8 +29,6 @@
import com.google.gwt.gen2.table.event.client.RowSelectionHandler;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.ui.Button;
-import com.google.gwt.user.client.ui.ChangeListener;
-import com.google.gwt.user.client.ui.Widget;
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
import com.mvc4g.client.ViewInterface;
@@ -44,6 +42,7 @@
import org.jboss.bpm.console.client.common.PagingPanel;
import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
import org.jboss.errai.common.client.framework.WSComponent;
+import org.jboss.errai.common.client.framework.WidgetCallback;
import org.jboss.errai.workspaces.client.Registry;
import java.util.ArrayList;
@@ -75,7 +74,7 @@
private MosaicPanel panel;
- public Widget getWidget()
+ public void getWidget(WidgetCallback callback)
{
panel = new MosaicPanel();
@@ -104,7 +103,7 @@
t.schedule(500);
- return panel;
+ callback.onSuccess(panel);
}
public boolean isInitialized()
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceListView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceListView.java 2010-02-04 11:04:12 UTC (rev 951)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceListView.java 2010-02-04 16:05:51 UTC (rev 952)
@@ -26,7 +26,6 @@
import com.google.gwt.gen2.table.event.client.RowSelectionEvent;
import com.google.gwt.gen2.table.event.client.RowSelectionHandler;
import com.google.gwt.user.client.ui.Button;
-import com.google.gwt.user.client.ui.Widget;
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
import com.mvc4g.client.ViewInterface;
@@ -42,6 +41,7 @@
import org.jboss.bpm.console.client.process.events.InstanceEvent;
import org.jboss.bpm.console.client.util.SimpleDateFormat;
import org.jboss.errai.common.client.framework.WSComponent;
+import org.jboss.errai.common.client.framework.WidgetCallback;
import org.jboss.errai.workspaces.client.Registry;
import java.util.ArrayList;
@@ -81,7 +81,7 @@
private Button startBtn, terminateBtn, deleteBtn;
- public Widget getWidget()
+ public void getWidget(WidgetCallback callback)
{
this.appContext = Registry.get(ApplicationContext.class);
@@ -96,7 +96,7 @@
// riftsaw?
isRiftsawInstance = appContext.getConfig().getProfileName().equals("BPEL Console");
- return panel;
+ callback.onSuccess(panel);
}
public boolean isInitialized()
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/MergedProcessView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/MergedProcessView.java 2010-02-04 11:04:12 UTC (rev 951)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/MergedProcessView.java 2010-02-04 16:05:51 UTC (rev 952)
@@ -22,16 +22,14 @@
package org.jboss.bpm.console.client.process;
import com.google.gwt.user.client.ui.Widget;
-import com.mvc4g.client.Controller;
import org.gwt.mosaic.ui.client.layout.*;
+import org.jboss.bpm.console.client.util.ConsoleLog;
import org.jboss.errai.common.client.framework.WSComponent;
-import org.jboss.errai.workspaces.client.Registry;
-import org.jboss.errai.workspaces.client.framework.annotations.LoadTool;
+import org.jboss.errai.common.client.framework.WidgetCallback;
/**
* Combined view of process and instance data in a single screen
*/
-@LoadTool(name = "Process Overview", group = "Processes", icon = "processIcon")
public class MergedProcessView implements WSComponent
{
MosaicPanel panel;
@@ -39,22 +37,46 @@
DefinitionListView definitionView;
InstanceListView instanceView;
- public Widget getWidget()
+ public void getWidget(WidgetCallback callback)
{
- Controller controller = Registry.get(Controller.class);
-
panel = new MosaicPanel(new BorderLayout());
panel.setPadding(0);
definitionView = new DefinitionListView();
instanceView = new InstanceListView();
- MosaicPanel splitPanel = new MosaicPanel(new ColumnLayout());
+ final MosaicPanel splitPanel = new MosaicPanel(new ColumnLayout());
splitPanel.setPadding(0);
- splitPanel.add(definitionView.getWidget(), new ColumnLayoutData("250 px"));
- splitPanel.add(instanceView.getWidget());
+ definitionView.getWidget(new WidgetCallback()
+ {
+ public void onSuccess(Widget instance)
+ {
+ splitPanel.add(instance, new ColumnLayoutData("250 px"));
+ }
+
+ public void onUnavailable()
+ {
+ ConsoleLog.error("Failed to load DefinitionListView.class");
+ }
+ });
+
+ instanceView.getWidget(
+ new WidgetCallback()
+ {
+ public void onSuccess(Widget instance)
+ {
+ splitPanel.add(instance);
+ }
+
+ public void onUnavailable()
+ {
+ ConsoleLog.error("Failed to load DefinitionListView.class");
+ }
+ }
+ );
+
panel.add(splitPanel, new BorderLayoutData(BorderLayout.Region.CENTER, false));
- return panel;
+ callback.onSuccess(panel);
}
}
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportFrame.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportFrame.java 2010-02-04 11:04:12 UTC (rev 951)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportFrame.java 2010-02-04 16:05:51 UTC (rev 952)
@@ -24,7 +24,6 @@
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.ui.Frame;
import org.gwt.mosaic.ui.client.layout.MosaicPanel;
-import org.jboss.bpm.console.client.LazyPanel;
import java.util.Date;
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportView.java 2010-02-04 11:04:12 UTC (rev 951)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportView.java 2010-02-04 16:05:51 UTC (rev 952)
@@ -22,7 +22,6 @@
package org.jboss.bpm.console.client.report;
import com.google.gwt.user.client.Timer;
-import com.google.gwt.user.client.ui.Widget;
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
import com.mvc4g.client.ViewInterface;
@@ -32,15 +31,14 @@
import org.jboss.bpm.console.client.search.UpdateSearchDefinitionsAction;
import org.jboss.bpm.report.model.ReportReference;
import org.jboss.errai.common.client.framework.WSComponent;
+import org.jboss.errai.common.client.framework.WidgetCallback;
import org.jboss.errai.workspaces.client.Registry;
-import org.jboss.errai.workspaces.client.framework.annotations.LoadTool;
import java.util.List;
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-@LoadTool(name = "Report Templates", group = "Reporting", icon="reportIcon")
public class ReportView implements ViewInterface, WSComponent
{
public final static String ID = ReportView.class.getName();
@@ -51,7 +49,7 @@
private MosaicPanel panel;
- public Widget getWidget()
+ public void getWidget(WidgetCallback callback)
{
panel = new MosaicPanel(new FillLayout());
panel.setPadding(0);
@@ -75,7 +73,7 @@
t.schedule(500);
- return panel;
+ callback.onSuccess(panel);
}
public boolean isInitialized()
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AbstractTaskList.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AbstractTaskList.java 2010-02-04 11:04:12 UTC (rev 951)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AbstractTaskList.java 2010-02-04 16:05:51 UTC (rev 952)
@@ -25,9 +25,7 @@
import com.mvc4g.client.ViewInterface;
import org.gwt.mosaic.ui.client.ListBox;
import org.gwt.mosaic.ui.client.layout.MosaicPanel;
-import org.jboss.bpm.console.client.ApplicationContext;
import org.jboss.bpm.console.client.Authentication;
-import org.jboss.bpm.console.client.common.AbstractView;
import org.jboss.bpm.console.client.model.TaskRef;
import org.jboss.errai.workspaces.client.Registry;
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java 2010-02-04 11:04:12 UTC (rev 951)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java 2010-02-04 16:05:51 UTC (rev 952)
@@ -27,7 +27,6 @@
import com.google.gwt.gen2.table.event.client.RowSelectionHandler;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.ui.Button;
-import com.google.gwt.user.client.ui.Widget;
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
import org.gwt.mosaic.ui.client.ListBox;
@@ -43,15 +42,14 @@
import org.jboss.bpm.console.client.task.events.TaskIdentityEvent;
import org.jboss.bpm.console.client.util.SimpleDateFormat;
import org.jboss.errai.common.client.framework.WSComponent;
+import org.jboss.errai.common.client.framework.WidgetCallback;
import org.jboss.errai.workspaces.client.Registry;
-import org.jboss.errai.workspaces.client.framework.annotations.LoadTool;
import java.util.List;
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-@LoadTool(name = "Personal Tasks", group = "Tasks", priority = 2, icon = "userIcon")
public class AssignedTasksView extends AbstractTaskList implements WSComponent, DataDriven
{
@@ -77,7 +75,7 @@
appContext = Registry.get(ApplicationContext.class);
}
- public Widget getWidget()
+ public void getWidget(WidgetCallback callback)
{
panel = new MosaicPanel(new BorderLayout());
@@ -88,7 +86,7 @@
controller.addView(AssignedTasksView.ID, this);
- return panel;
+ callback.onSuccess(panel);
}
public void initialize()
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksView.java 2010-02-04 11:04:12 UTC (rev 951)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksView.java 2010-02-04 16:05:51 UTC (rev 952)
@@ -27,7 +27,6 @@
import com.google.gwt.gen2.table.event.client.RowSelectionHandler;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.ui.Button;
-import com.google.gwt.user.client.ui.Widget;
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
import org.gwt.mosaic.ui.client.ListBox;
@@ -45,15 +44,14 @@
import org.jboss.bpm.console.client.task.events.TaskIdentityEvent;
import org.jboss.bpm.console.client.util.SimpleDateFormat;
import org.jboss.errai.common.client.framework.WSComponent;
+import org.jboss.errai.common.client.framework.WidgetCallback;
import org.jboss.errai.workspaces.client.Registry;
-import org.jboss.errai.workspaces.client.framework.annotations.LoadTool;
import java.util.List;
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-@LoadTool(name = "Group Tasks", group = "Tasks", priority = 1, icon = "taskIcon")
public class OpenTasksView extends AbstractTaskList implements WSComponent, DataDriven
{
@@ -90,7 +88,7 @@
}
}
- public Widget getWidget()
+ public void getWidget(WidgetCallback callback)
{
panel = new MosaicPanel(new BorderLayout());
@@ -115,7 +113,7 @@
panel.add(taskList, new BorderLayoutData(BorderLayout.Region.CENTER));
panel.add(detailsView, new BorderLayoutData(BorderLayout.Region.SOUTH, 10,200));
- return panel;
+ callback.onSuccess(panel);
}
public void initialize()
14 years, 3 months
Overlord SVN: r951 - in bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client: icons and 1 other directory.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2010-02-04 06:04:12 -0500 (Thu, 04 Feb 2010)
New Revision: 951
Modified:
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ServerStatusView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/ConsoleIconBundle.java
Log:
change system icon
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ServerStatusView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ServerStatusView.java 2010-02-04 10:55:03 UTC (rev 950)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ServerStatusView.java 2010-02-04 11:04:12 UTC (rev 951)
@@ -38,7 +38,7 @@
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-@LoadTool(name = "System", group = "Settings", icon="infoIcon")
+@LoadTool(name = "System", group = "Settings", icon="docIcon")
public class ServerStatusView
implements ViewInterface, LazyPanel, WSComponent
{
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/ConsoleIconBundle.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/ConsoleIconBundle.java 2010-02-04 10:55:03 UTC (rev 950)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/ConsoleIconBundle.java 2010-02-04 11:04:12 UTC (rev 951)
@@ -91,4 +91,8 @@
@ClientBundle.Source("reportInstance.png")
ImageResource reportInstanceIcon();
+
+ @ClientBundle.Source("docIcon.png")
+ ImageResource docIcon();
+
}
14 years, 3 months
Overlord SVN: r950 - bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2010-02-04 05:55:03 -0500 (Thu, 04 Feb 2010)
New Revision: 950
Modified:
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportLaunchPadView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportParameterForm.java
Log:
Store report parameters as preferences
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportLaunchPadView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportLaunchPadView.java 2010-02-04 10:18:17 UTC (rev 949)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportLaunchPadView.java 2010-02-04 10:55:03 UTC (rev 950)
@@ -29,6 +29,7 @@
import com.mvc4g.client.Event;
import com.mvc4g.client.ViewInterface;
import org.gwt.mosaic.ui.client.CaptionLayoutPanel;
+import org.gwt.mosaic.ui.client.MessageBox;
import org.gwt.mosaic.ui.client.layout.BoxLayout;
import org.gwt.mosaic.ui.client.layout.BoxLayoutData;
import org.gwt.mosaic.ui.client.layout.MosaicPanel;
@@ -121,10 +122,25 @@
{
public void onSumbit(Map<String, String> paramValues)
{
- String url = URLBuilder.getInstance().getReportURL(reportRef.getReportFileName());
- RenderDispatchEvent eventPayload = new RenderDispatchEvent(reportRef.getTitle(), url);
- eventPayload.setParameters(fieldValues2PostParams(paramValues));
- controller.handleEvent( new Event(RenderReportAction.ID, eventPayload));
+ boolean valid = true;
+ for(String key : paramValues.keySet())
+ {
+ String s = paramValues.get(key);
+ if(s == null || s.equals(""))
+ valid = false;
+ }
+
+ if(valid)
+ {
+ String url = URLBuilder.getInstance().getReportURL(reportRef.getReportFileName());
+ RenderDispatchEvent eventPayload = new RenderDispatchEvent(reportRef.getTitle(), url);
+ eventPayload.setParameters(fieldValues2PostParams(paramValues));
+ controller.handleEvent( new Event(RenderReportAction.ID, eventPayload));
+ }
+ else
+ {
+ MessageBox.alert("Report Parameters", "Please provide the required input parameters");
+ }
}
});
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportParameterForm.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportParameterForm.java 2010-02-04 10:18:17 UTC (rev 949)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportParameterForm.java 2010-02-04 10:55:03 UTC (rev 950)
@@ -29,11 +29,9 @@
import org.gwt.mosaic.ui.client.layout.MosaicPanel;
import org.jboss.bpm.report.model.ReportParameter;
import org.jboss.bpm.report.model.ReportReference;
+import org.jboss.errai.workspaces.client.Preferences;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
/**
* Report parameter input.
@@ -57,7 +55,7 @@
return p;
}
- private MosaicPanel createForm(ReportReference reportRef, final ReportParamCallback callback)
+ private MosaicPanel createForm(final ReportReference reportRef, final ReportParamCallback callback)
{
boolean hasParameters = reportRef.getParameterMetaData().size()>0;
int numRows = hasParameters ?
@@ -72,12 +70,20 @@
{
Map<String, String> values = new HashMap<String, String>();
for (InputField field : fields)
+ {
values.put(field.id, field.getValue());
+ }
+ if(!values.isEmpty())
+ {
+ writePrefs(values, reportRef);
+ }
+
callback.onSumbit(values);
}
- });
+ });
+ Map<String,String> preferenceValues = readPrefs(reportRef);
for(final ReportParameter reportParam : reportRef.getParameterMetaData())
{
@@ -85,6 +91,9 @@
String helpText = reportParam.getHelptext() != null ? reportParam.getHelptext() : "";
final TextBox textBox = new TextBox();
+ String prefValue = preferenceValues.get(reportParam.getName());
+ if(prefValue !=null)
+ textBox.setText(prefValue);
// retain reference to values
final InputField field = new InputField()
@@ -111,7 +120,7 @@
if(!hasParameters)
{
form.add(new HTML("This report doesn't require any paramters.")
- , new GridLayoutData(2,1, HasHorizontalAlignment.ALIGN_CENTER, HasVerticalAlignment.ALIGN_TOP));
+ , new GridLayoutData(2,1, HasHorizontalAlignment.ALIGN_CENTER, HasVerticalAlignment.ALIGN_TOP));
}
// submit
@@ -121,6 +130,43 @@
return form;
}
+ private void writePrefs(Map<String, String> values, ReportReference reportRef)
+ {
+ String name = reportRef.getTitle().replaceAll(" ","_");
+ String prefKey = "bpm-form-"+name;
+ StringBuffer sb = new StringBuffer();
+ int i = 1;
+ for(String key : values.keySet())
+ {
+ sb.append(key).append("=").append(values.get(key));
+ if(i<values.keySet().size())
+ sb.append(",");
+ i++;
+
+ }
+
+ Preferences.set(prefKey, sb.toString());
+ }
+
+ private Map<String, String> readPrefs(ReportReference reportRef)
+ {
+ Map<String,String> values = new HashMap<String,String>();
+ String name = reportRef.getTitle().replaceAll(" ","_");
+ String prefKey = "bpm-form-"+name;
+ if(Preferences.has(prefKey))
+ {
+ String prefValue = Preferences.get(prefKey);
+ StringTokenizer tok1 = new StringTokenizer(prefValue, ",");
+ while(tok1.hasMoreTokens())
+ {
+ String[] tuple = tok1.nextToken().split("=");
+ values.put(tuple[0], tuple[1]);
+ }
+ }
+
+ return values;
+ }
+
private class InputField
{
Widget widget;
14 years, 3 months
Overlord SVN: r949 - in bpm-console/trunk/gui/war/src/main/java/org: jboss/bpm/console/client/process and 2 other directories.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2010-02-04 05:18:17 -0500 (Thu, 04 Feb 2010)
New Revision: 949
Added:
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/public/blank.html
Modified:
bpm-console/trunk/gui/war/src/main/java/org/gwt/mosaic/ui/client/layout/MosaicPanel.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/RenderReportAction.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportFrame.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportLaunchPadView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportParameterForm.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/public/console.css
Log:
Cleanup Report tool
Modified: bpm-console/trunk/gui/war/src/main/java/org/gwt/mosaic/ui/client/layout/MosaicPanel.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/gwt/mosaic/ui/client/layout/MosaicPanel.java 2010-02-02 14:57:28 UTC (rev 948)
+++ bpm-console/trunk/gui/war/src/main/java/org/gwt/mosaic/ui/client/layout/MosaicPanel.java 2010-02-04 10:18:17 UTC (rev 949)
@@ -48,4 +48,5 @@
{
super(layout);
}
+
}
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java 2010-02-02 14:57:28 UTC (rev 948)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java 2010-02-04 10:18:17 UTC (rev 949)
@@ -21,6 +21,8 @@
*/
package org.jboss.bpm.console.client.process;
+import com.google.gwt.event.dom.client.ChangeEvent;
+import com.google.gwt.event.dom.client.ChangeHandler;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.gen2.table.event.client.RowSelectionEvent;
@@ -155,8 +157,10 @@
dropBox.addItem("Active");
dropBox.addItem("Suspended");
- dropBox.addChangeListener(new ChangeListener() {
- public void onChange(Widget sender) {
+ dropBox.addChangeHandler(new ChangeHandler() {
+
+ public void onChange(ChangeEvent changeEvent)
+ {
switch (dropBox.getSelectedIndex())
{
case 0:
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/RenderReportAction.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/RenderReportAction.java 2010-02-02 14:57:28 UTC (rev 948)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/RenderReportAction.java 2010-02-04 10:18:17 UTC (rev 949)
@@ -58,8 +58,11 @@
RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, url);
ConsoleLog.debug(RequestBuilder.POST+": " + url);
- final ReportView view = (ReportView)controller.getView(ReportView.ID);
+ final ReportLaunchPadView view = (ReportLaunchPadView)controller.getView(ReportLaunchPadView.ID);
+ view.reset();
+ view.setLoading(true);
+
try
{
controller.handleEvent( LoadingStatusAction.ON );
@@ -100,7 +103,7 @@
finally
{
controller.handleEvent( LoadingStatusAction.OFF );
- //view.setLoading(false);
+ view.setLoading(false);
}
}
}
@@ -131,7 +134,7 @@
// Couldn't connect to server
controller.handleEvent( LoadingStatusAction.OFF );
handleError(controller, url, e);
- //view.setLoading(false);
+ view.setLoading(false);
}
}
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportFrame.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportFrame.java 2010-02-02 14:57:28 UTC (rev 948)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportFrame.java 2010-02-04 10:18:17 UTC (rev 949)
@@ -33,47 +33,25 @@
*
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-public class ReportFrame extends MosaicPanel implements LazyPanel
+public class ReportFrame extends MosaicPanel
{
private Frame frame;
- private String url;
- private boolean isInitialized;
- public ReportFrame(String url)
+ public ReportFrame()
{
super();
setPadding(0);
- this.url = url;
// report frame
frame = new Frame();
- DOM.setStyleAttribute(frame.getElement(), "border", "none");
+ DOM.setStyleAttribute(frame.getElement(), "border", "1px solid #E8E8E8");
DOM.setStyleAttribute(frame.getElement(), "backgroundColor", "#ffffff");
- this.add(frame);
+ this.add(frame);
}
- public String getUrl()
+ public void setFrameUrl(String url)
{
- return url;
- }
-
- public boolean isInitialized()
- {
- return isInitialized;
- }
-
- public void initialize()
- {
- if(!isInitialized)
- {
- setFrameUrl(url);
- isInitialized = true;
- }
- }
-
- private void setFrameUrl(String url)
- {
// https://jira.jboss.org/jira/browse/JBPM-2244
frame.getElement().setId(
String.valueOf( new Date().getTime())
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportLaunchPadView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportLaunchPadView.java 2010-02-02 14:57:28 UTC (rev 948)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportLaunchPadView.java 2010-02-04 10:18:17 UTC (rev 949)
@@ -22,22 +22,20 @@
package org.jboss.bpm.console.client.report;
import com.google.gwt.core.client.GWT;
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.user.client.ui.AbstractImagePrototype;
-import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.event.dom.client.ChangeEvent;
+import com.google.gwt.event.dom.client.ChangeHandler;
import com.google.gwt.user.client.ui.HTML;
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
import com.mvc4g.client.ViewInterface;
+import org.gwt.mosaic.ui.client.CaptionLayoutPanel;
import org.gwt.mosaic.ui.client.layout.BoxLayout;
import org.gwt.mosaic.ui.client.layout.BoxLayoutData;
import org.gwt.mosaic.ui.client.layout.MosaicPanel;
import org.jboss.bpm.console.client.ApplicationContext;
import org.jboss.bpm.console.client.URLBuilder;
-import org.jboss.bpm.console.client.common.IconHeader;
-import org.jboss.bpm.console.client.common.WidgetWindowPanel;
-import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
+import org.jboss.bpm.console.client.common.DataDriven;
+import org.jboss.bpm.console.client.common.LoadingOverlay;
import org.jboss.bpm.report.model.ReportReference;
import org.jboss.errai.workspaces.client.Registry;
@@ -51,109 +49,137 @@
* that need to be retrieved from the server module.
*
* @see org.jboss.bpm.console.client.report.UpdateReportConfigAction
- *
+ *
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-class ReportLaunchPadView extends MosaicPanel implements ViewInterface
+class ReportLaunchPadView extends MosaicPanel implements ViewInterface, DataDriven
{
public final static String ID = ReportLaunchPadView.class.getName();
private Controller controller;
- private WidgetWindowPanel window;
- private MosaicPanel inner;
+ private MosaicPanel inputPanel;
+ private com.google.gwt.user.client.ui.ListBox dropBox;
+
+ List<ReportReference> reportTemplates;
+ private HTML description;
+ private ReportFrame reportFrame;
+
public ReportLaunchPadView()
{
super(new BoxLayout(BoxLayout.Orientation.VERTICAL));
+ this.setPadding(5);
+
+ CaptionLayoutPanel header = new CaptionLayoutPanel("Report configuration");
+ header.setStyleName("bpm-detail-panel");
- this.setPadding(10);
- HTML html = new HTML("The following reports are available.<br/> " +
- "Please note that rendering may take a while.");
+ header.setLayout(new BoxLayout(BoxLayout.Orientation.HORIZONTAL));
- inner = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));
+ MosaicPanel templatePanel = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));
+ description = new HTML();
- this.add(html, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
- this.add(inner, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
+ dropBox = new com.google.gwt.user.client.ui.ListBox(false);
+ dropBox.addChangeHandler(new ChangeHandler() {
- }
+ public void onChange(ChangeEvent changeEvent)
+ {
+ final ReportReference reportRef = getCurrentSelection();
+ description.setText(reportRef.getDescription());
+ createInput(reportRef, inputPanel);
+ ReportLaunchPadView.this.layout();
+ }
+ });
- public void update(List<ReportReference> reports)
- {
- ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
- inner.clear();
+ templatePanel.add(dropBox, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
+ templatePanel.add(description, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
+ // ----
- for(final ReportReference reportRef : reports)
- {
- final boolean hasParameters = reportRef.getParameterMetaData().size()>0;
+ inputPanel = new MosaicPanel();
+
+ // ---
+
+ header.add(templatePanel, new BoxLayoutData("250 px", "100 px"));
+ header.add(inputPanel, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
- // a single report description
- MosaicPanel row = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.HORIZONTAL));
+ // --
- MosaicPanel desc = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));
- desc.setPadding(0);
- IconHeader header = new IconHeader(
- AbstractImagePrototype.create(icons.reportInstanceIcon()),
- reportRef.getTitle()
- );
- desc.add(header);
+ reportFrame = new ReportFrame();
- desc.add(new HTML(reportRef.getTitle()));
-
- String description = reportRef.getDescription()!=null ? reportRef.getDescription() : "";
- desc.add(new HTML(description));
- row.add(desc, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
+ this.add(header, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
+ this.add(reportFrame, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
- // render button
- row.add(new Button("Render",
- new ClickHandler()
- {
- public void onClick(ClickEvent clickEvent)
- {
- if(hasParameters)
- {
- ReportParameterForm form =
- new ReportParameterForm(reportRef,
- new ReportParamCallback()
- {
+ }
- public void onSumbit(Map<String, String> paramValues)
- {
+ private void createInput(final ReportReference reportRef, MosaicPanel inputPanel)
+ {
+ inputPanel.clear();
- String url = URLBuilder.getInstance().getReportURL(reportRef.getReportFileName());
-
- RenderDispatchEvent eventPayload = new RenderDispatchEvent(reportRef.getTitle(), url);
- eventPayload.setParameters(fieldValues2PostParams(paramValues));
- controller.handleEvent( new Event(RenderReportAction.ID, eventPayload));
-
- window.close();
- }
- });
-
- window = new WidgetWindowPanel("Report Parameter", form);
- }
- else
+ final ReportParameterForm form =
+ new ReportParameterForm(reportRef,
+ new ReportParamCallback()
+ {
+ public void onSumbit(Map<String, String> paramValues)
{
String url = URLBuilder.getInstance().getReportURL(reportRef.getReportFileName());
- controller.handleEvent(
- new Event(RenderReportAction.ID,
- new RenderDispatchEvent(reportRef.getTitle(), url)
- )
- );
+ RenderDispatchEvent eventPayload = new RenderDispatchEvent(reportRef.getTitle(), url);
+ eventPayload.setParameters(fieldValues2PostParams(paramValues));
+ controller.handleEvent( new Event(RenderReportAction.ID, eventPayload));
}
- }
- })
- );
+ });
+ inputPanel.add(form);
+ }
- inner.add(row, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
+ private ReportReference getCurrentSelection()
+ {
+ String template = dropBox.getItemText(dropBox.getSelectedIndex());
+ for(ReportReference r : reportTemplates)
+ {
+ if(r.getTitle().equals(template))
+ return r;
+ }
+
+ return null;
+ }
+ public void update(List<ReportReference> reports)
+ {
+ reportTemplates = reports;
+
+ for(ReportReference report : reports)
+ {
+ dropBox.addItem(report.getTitle());
}
- this.invalidate();
+ dropBox.setSelectedIndex(0);
Registry.get(ApplicationContext.class).refreshView();
}
+ public void displayReport(String title, String dispatchUrl)
+ {
+ reportFrame.setFrameUrl(dispatchUrl);
+ }
+
+ public void reset()
+ {
+ String url = GWT.getModuleBaseURL() + "blank.html";
+ System.out.println("** Blank URL: " + url);
+ displayReport("", url);
+ }
+
+ public void update(Object... data)
+ {
+ String title = (String)data[0];
+ String url = (String)data[1];
+ displayReport(title, url);
+ }
+
+ public void setLoading(boolean isLoading)
+ {
+ LoadingOverlay.on(reportFrame, isLoading);
+ }
+
private static String fieldValues2PostParams(Map<String,String> values)
{
StringBuffer sb = new StringBuffer();
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportParameterForm.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportParameterForm.java 2010-02-02 14:57:28 UTC (rev 948)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportParameterForm.java 2010-02-04 10:18:17 UTC (rev 949)
@@ -21,11 +21,12 @@
*/
package org.jboss.bpm.console.client.report;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.*;
-import org.gwt.mosaic.ui.client.layout.BoxLayout;
-import org.gwt.mosaic.ui.client.layout.BoxLayoutData;
+import org.gwt.mosaic.ui.client.layout.GridLayout;
+import org.gwt.mosaic.ui.client.layout.GridLayoutData;
import org.gwt.mosaic.ui.client.layout.MosaicPanel;
-import org.jboss.bpm.console.client.common.HeaderLabel;
import org.jboss.bpm.report.model.ReportParameter;
import org.jboss.bpm.report.model.ReportReference;
@@ -36,47 +37,56 @@
/**
* Report parameter input.
- *
+ *
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public class ReportParameterForm extends MosaicPanel
{
- private ReportReference reportReference;
- private ReportParamCallback callback;
private List<InputField> fields = new ArrayList<InputField>();
-
+
public ReportParameterForm(ReportReference reportReference, ReportParamCallback callback)
{
- this.reportReference = reportReference;
- this.callback = callback;
-
- Widget form = createForm(reportReference);
- this.add(form);
+ this.add(getFormPanel(reportReference, callback));
}
- private Widget createForm(final ReportReference reportRef)
+ private Widget getFormPanel(final ReportReference reportRef, final ReportParamCallback callback)
{
- MosaicPanel p = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));
- HeaderLabel label = new HeaderLabel(reportRef.getTitle(), true);
- p.add(label, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
+ MosaicPanel p = new MosaicPanel();
+ p.setPadding(5);
+ p.add(createForm(reportRef, callback));
+ return p;
+ }
- String description = reportRef.getDescription()!=null ? reportRef.getDescription() : "";
- p.add(new HTML("<blockquote>"+description+"</blockquote>"));
+ private MosaicPanel createForm(ReportReference reportRef, final ReportParamCallback callback)
+ {
+ boolean hasParameters = reportRef.getParameterMetaData().size()>0;
+ int numRows = hasParameters ?
+ reportRef.getParameterMetaData().size() + 1 : 2;
- Grid grid = new Grid(reportRef.getParameterMetaData().size(),2);
- grid.setCellPadding(5);
+ MosaicPanel form = new MosaicPanel(new GridLayout(2, numRows));
- int row = 0;
+ final Button createBtn = new Button("Create Report",
+ new ClickHandler()
+ {
+ public void onClick(ClickEvent clickEvent)
+ {
+ Map<String, String> values = new HashMap<String, String>();
+ for (InputField field : fields)
+ values.put(field.id, field.getValue());
+
+ callback.onSumbit(values);
+ }
+ });
+
+
for(final ReportParameter reportParam : reportRef.getParameterMetaData())
{
String promptText = reportParam.getPromptText() != null ? reportParam.getPromptText() : reportParam.getName();
String helpText = reportParam.getHelptext() != null ? reportParam.getHelptext() : "";
- grid.setWidget(row,0, new HTML("<b>"+promptText+"</b><br/>"+helpText));
-
final TextBox textBox = new TextBox();
- // retain access to values
+ // retain reference to values
final InputField field = new InputField()
{
String getValue()
@@ -85,41 +95,37 @@
}
{
- widget = textBox;
- id = reportParam.getName();
-
- }};
+ widget = textBox;
+ id = reportParam.getName();
+
+ }
+ };
+
fields.add(field);
- grid.setWidget(row,1, textBox);
- grid.getRowFormatter().setVerticalAlign(row, HasVerticalAlignment.ALIGN_BOTTOM);
+ form.add(new HTML("<b>"+promptText+"</b><br/>"+helpText));
+ form.add(textBox);
+ }
- row++;
+ // fallback
+ if(!hasParameters)
+ {
+ form.add(new HTML("This report doesn't require any paramters.")
+ , new GridLayoutData(2,1, HasHorizontalAlignment.ALIGN_CENTER, HasVerticalAlignment.ALIGN_TOP));
}
- p.add(grid);
- p.add(new Button("Submit",
- new ClickListener()
- {
- public void onClick(Widget widget)
- {
- Map<String, String> values = new HashMap<String,String>();
- for(InputField field : fields)
- values.put(field.id, field.getValue());
+ // submit
+ form.add(new HTML(""));
+ form.add(createBtn, new GridLayoutData(HasHorizontalAlignment.ALIGN_RIGHT, HasVerticalAlignment.ALIGN_BOTTOM));
- callback.onSumbit(values);
- }
- })
- );
-
- return p;
+ return form;
}
- class InputField
+ private class InputField
{
Widget widget;
String id;
-
+
String getValue()
{
throw new IllegalArgumentException("Override this method");
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportView.java 2010-02-02 14:57:28 UTC (rev 948)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportView.java 2010-02-04 10:18:17 UTC (rev 949)
@@ -21,20 +21,14 @@
*/
package org.jboss.bpm.console.client.report;
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Timer;
-import com.google.gwt.user.client.ui.*;
+import com.google.gwt.user.client.ui.Widget;
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
import com.mvc4g.client.ViewInterface;
-import org.gwt.mosaic.ui.client.Caption;
-import org.gwt.mosaic.ui.client.DeckLayoutPanel;
-import org.gwt.mosaic.ui.client.ImageButton;
+import org.gwt.mosaic.ui.client.layout.FillLayout;
import org.gwt.mosaic.ui.client.layout.MosaicPanel;
-import org.jboss.bpm.console.client.common.AbstractView;
import org.jboss.bpm.console.client.common.WidgetWindowPanel;
-import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
import org.jboss.bpm.console.client.search.UpdateSearchDefinitionsAction;
import org.jboss.bpm.report.model.ReportReference;
import org.jboss.errai.common.client.framework.WSComponent;
@@ -46,26 +40,24 @@
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-@LoadTool(name = "Available Reports", group = "Reporting", icon="reportIcon")
+@LoadTool(name = "Report Templates", group = "Reporting", icon="reportIcon")
public class ReportView implements ViewInterface, WSComponent
{
public final static String ID = ReportView.class.getName();
private Controller controller;
- private boolean isInitialized;
- private DeckLayoutPanel deck;
+ private boolean isInitialized;
private ReportLaunchPadView coverpanel;
- MosaicPanel panel;
+ private MosaicPanel panel;
- @Override
public Widget getWidget()
{
- panel = new MosaicPanel();
+ panel = new MosaicPanel(new FillLayout());
+ panel.setPadding(0);
controller = Registry.get(Controller.class);
initialize();
- panel.add(deck);
controller.addView(ReportView.ID, this);
controller.addAction(UpdateReportConfigAction.ID, new UpdateReportConfigAction());
@@ -81,7 +73,7 @@
}
};
- t.schedule(50);
+ t.schedule(500);
return panel;
}
@@ -95,18 +87,9 @@
{
if(!isInitialized)
{
- // layout
- deck = new DeckLayoutPanel();
-
- // loading
- MosaicPanel loadingPanel = new MosaicPanel();
- loadingPanel.add(new Label("Loading..."));
- loadingPanel.setVisible(false);
- deck.add(loadingPanel);
-
// cover
coverpanel = new ReportLaunchPadView();
- deck.add(coverpanel);
+ panel.add(coverpanel);
// views and actions
controller.addView(ReportLaunchPadView.ID, coverpanel);
@@ -114,8 +97,6 @@
controller.addAction(UpdateSearchDefinitionsAction.ID, new UpdateSearchDefinitionsAction());
controller.addAction(RenderReportAction.ID, new RenderReportAction());
- deck.showWidget(0);
-
this.isInitialized = true;
}
}
@@ -128,14 +109,13 @@
public void configure(List<ReportReference> reports)
{
// update coverview
- coverpanel.update(reports);
- deck.showWidget(1);
+ coverpanel.update(reports);
}
public void displayReport(String title, String dispatchUrl)
{
- ReportFrame reportFrame = new ReportFrame(dispatchUrl);
- reportFrame.initialize();
+ ReportFrame reportFrame = new ReportFrame();
+ reportFrame.setFrameUrl(dispatchUrl);
new WidgetWindowPanel(title, reportFrame, true);
}
}
Added: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/public/blank.html
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/public/blank.html (rev 0)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/public/blank.html 2010-02-04 10:18:17 UTC (rev 949)
@@ -0,0 +1,5 @@
+<html>
+<body background="#ffffff">
+
+</body>
+</html>
\ No newline at end of file
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/public/console.css
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/public/console.css 2010-02-02 14:57:28 UTC (rev 948)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/public/console.css 2010-02-04 10:18:17 UTC (rev 949)
@@ -380,4 +380,4 @@
height: 25px;
margin:0px;
padding:0px;
-}
\ No newline at end of file
+}
14 years, 3 months
Overlord SVN: r948 - in bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client: engine and 2 other directories.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2010-02-02 09:57:28 -0500 (Tue, 02 Feb 2010)
New Revision: 948
Modified:
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentListView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/JobListView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/UpdateDeploymentsAction.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/UpdateJobsAction.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksView.java
Log:
Add loading overlay to remaining tools
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java 2010-02-02 11:57:15 UTC (rev 947)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java 2010-02-02 14:57:28 UTC (rev 948)
@@ -63,7 +63,7 @@
private Controller controller;
- public final static String[] KNOWN_ROLES = {"admin", "manager", "user"};
+ public final static String[] KNOWN_ROLES = {"administrator", "manager", "user"};
public LoginView()
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentListView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentListView.java 2010-02-02 11:57:15 UTC (rev 947)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentListView.java 2010-02-02 14:57:28 UTC (rev 948)
@@ -40,9 +40,12 @@
import org.gwt.mosaic.ui.client.layout.*;
import org.gwt.mosaic.ui.client.list.DefaultListModel;
import org.jboss.bpm.console.client.common.AbstractView;
+import org.jboss.bpm.console.client.common.DataDriven;
+import org.jboss.bpm.console.client.common.LoadingOverlay;
import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
import org.jboss.bpm.console.client.model.DeploymentRef;
import org.jboss.bpm.console.client.util.SimpleDateFormat;
+import org.jboss.errai.bus.server.annotations.security.RequireRoles;
import org.jboss.errai.common.client.framework.WSComponent;
import org.jboss.errai.workspaces.client.Registry;
import org.jboss.errai.workspaces.client.framework.annotations.LoadTool;
@@ -55,7 +58,8 @@
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
@LoadTool(name = "Deployments", group = "Runtime", icon="deploymentIcon")
-public class DeploymentListView implements ViewInterface, WSComponent
+@RequireRoles({"administrator"})
+public class DeploymentListView implements ViewInterface, WSComponent, DataDriven
{
public final static String ID = DeploymentListView.class.getName();
@@ -88,7 +92,6 @@
}
- @Override
public Widget getWidget()
{
panel = new MosaicPanel(new BorderLayout());
@@ -110,21 +113,6 @@
controller.addView(DeploymentListView.ID, this);
- // ----
-
- Timer t = new Timer()
- {
- @Override
- public void run()
- {
- controller.handleEvent(
- new Event(UpdateDeploymentsAction.ID, null)
- );
- }
- };
-
- t.schedule(50);
-
return panel;
}
@@ -296,6 +284,19 @@
detailView = new DeploymentDetailView();
controller.addView(DeploymentDetailView.ID, detailView);
+ Timer t = new Timer()
+ {
+ @Override
+ public void run()
+ {
+ controller.handleEvent(
+ new Event(UpdateDeploymentsAction.ID, null)
+ );
+ }
+ };
+
+ t.schedule(500);
+
initialized = true;
}
}
@@ -308,22 +309,40 @@
return selection;
}
- public void update(List<DeploymentRef> deployments)
+ public void reset()
{
- this.deployments = deployments;
+ final DefaultListModel<DeploymentRef> model =
+ (DefaultListModel<DeploymentRef>) listBox.getModel();
+ model.clear();
+
+ // clear details
+ controller.handleEvent(
+ new Event(UpdateDeploymentDetailAction.ID, null)
+ );
+ }
+
+ public void update(Object... data)
+ {
+ this.deployments = (List<DeploymentRef>)data[0];
+
renderFiltered();
}
+ public void setLoading(boolean isLoading)
+ {
+ LoadingOverlay.on(deploymentList, isLoading);
+ }
+
private void renderFiltered()
{
if(this.deployments!=null)
{
+ reset();
+
final DefaultListModel<DeploymentRef> model =
(DefaultListModel<DeploymentRef>) listBox.getModel();
- model.clear();
-
for(DeploymentRef dpl : deployments)
{
if(FILTER_NONE==currentFilter)
@@ -341,10 +360,6 @@
if(listBox.getSelectedIndex()!=-1)
listBox.setItemSelected(listBox.getSelectedIndex(), false);
- // clear details
- controller.handleEvent(
- new Event(UpdateDeploymentDetailAction.ID, null)
- );
}
}
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/JobListView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/JobListView.java 2010-02-02 11:57:15 UTC (rev 947)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/JobListView.java 2010-02-02 14:57:28 UTC (rev 948)
@@ -25,6 +25,7 @@
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.gen2.table.event.client.RowSelectionEvent;
import com.google.gwt.gen2.table.event.client.RowSelectionHandler;
+import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ChangeListener;
import com.google.gwt.user.client.ui.Widget;
@@ -38,8 +39,11 @@
import org.gwt.mosaic.ui.client.layout.BoxLayoutData;
import org.gwt.mosaic.ui.client.layout.MosaicPanel;
import org.gwt.mosaic.ui.client.list.DefaultListModel;
+import org.jboss.bpm.console.client.common.DataDriven;
+import org.jboss.bpm.console.client.common.LoadingOverlay;
import org.jboss.bpm.console.client.model.JobRef;
import org.jboss.bpm.console.client.util.SimpleDateFormat;
+import org.jboss.errai.bus.server.annotations.security.RequireRoles;
import org.jboss.errai.common.client.framework.WSComponent;
import org.jboss.errai.workspaces.client.Registry;
import org.jboss.errai.workspaces.client.framework.annotations.LoadTool;
@@ -54,7 +58,8 @@
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
@LoadTool(name = "Jobs", group = "Runtime", icon="jobsIcon")
-public class JobListView implements ViewInterface, WSComponent
+@RequireRoles({"administrator"})
+public class JobListView implements ViewInterface, WSComponent, DataDriven
{
public final static String ID = JobListView.class.getName();
@@ -83,8 +88,7 @@
{
controller = Registry.get(Controller.class);
}
-
- @Override
+
public Widget getWidget()
{
panel = new MosaicPanel();
@@ -259,28 +263,52 @@
layout.add(detailsView, new BorderLayoutData(BorderLayout.Region.SOUTH, 10,200));
*/
+ Timer t = new Timer()
+ {
+ @Override
+ public void run()
+ {
+ controller.handleEvent(new Event(UpdateJobsAction.ID, null));
+ }
+ };
+
+ t.schedule(500);
+
controller.addAction(UpdateJobsAction.ID, new UpdateJobsAction());
this.initialized = true;
}
}
- public void update(List<JobRef> jobs)
+ public void reset()
{
- this.jobs = jobs;
+ final DefaultListModel<JobRef> model =
+ (DefaultListModel<JobRef>) listBox.getModel();
+ model.clear();
+
+ }
+
+ public void update(Object... data)
+ {
+ this.jobs = (List<JobRef>)data[0];
renderFiltered();
}
+ public void setLoading(boolean isLoading)
+ {
+ LoadingOverlay.on(jobList, isLoading);
+ }
+
private void renderFiltered()
{
if(this.jobs!=null)
{
+ reset();
+
final DefaultListModel<JobRef> model =
(DefaultListModel<JobRef>) listBox.getModel();
- model.clear();
-
for(JobRef def : jobs)
{
if(FILTER_NONE==currentFilter)
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/UpdateDeploymentsAction.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/UpdateDeploymentsAction.java 2010-02-02 11:57:15 UTC (rev 947)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/UpdateDeploymentsAction.java 2010-02-02 14:57:28 UTC (rev 948)
@@ -29,6 +29,7 @@
import com.mvc4g.client.Event;
import org.jboss.bpm.console.client.URLBuilder;
import org.jboss.bpm.console.client.common.AbstractRESTAction;
+import org.jboss.bpm.console.client.common.DataDriven;
import org.jboss.bpm.console.client.model.DTOParser;
import org.jboss.bpm.console.client.model.DeploymentRef;
import org.jboss.bpm.console.client.process.UpdateDefinitionsAction;
@@ -60,6 +61,12 @@
return RequestBuilder.GET;
}
+ @Override
+ protected DataDriven getDataDriven(Controller controller)
+ {
+ return (DeploymentListView)controller.getView(DeploymentListView.ID);
+ }
+
public void handleSuccessfulResponse(
final Controller controller, final Object event, Response response)
{
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/UpdateJobsAction.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/UpdateJobsAction.java 2010-02-02 11:57:15 UTC (rev 947)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/UpdateJobsAction.java 2010-02-02 14:57:28 UTC (rev 948)
@@ -28,6 +28,7 @@
import com.mvc4g.client.Controller;
import org.jboss.bpm.console.client.URLBuilder;
import org.jboss.bpm.console.client.common.AbstractRESTAction;
+import org.jboss.bpm.console.client.common.DataDriven;
import org.jboss.bpm.console.client.model.DTOParser;
import org.jboss.bpm.console.client.model.JobRef;
@@ -55,6 +56,12 @@
return RequestBuilder.GET;
}
+ @Override
+ protected DataDriven getDataDriven(Controller controller)
+ {
+ return (JobListView)controller.getView(JobListView.ID);
+ }
+
public void handleSuccessfulResponse(final Controller controller, final Object event, Response response)
{
JSONValue json = JSONParser.parse(response.getText());
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java 2010-02-02 11:57:15 UTC (rev 947)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java 2010-02-02 14:57:28 UTC (rev 948)
@@ -100,7 +100,7 @@
}
};
- t.schedule(50);
+ t.schedule(500);
return panel;
}
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java 2010-02-02 11:57:15 UTC (rev 947)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java 2010-02-02 14:57:28 UTC (rev 948)
@@ -285,7 +285,7 @@
}
};
- t.schedule(50);
+ t.schedule(500);
isInitialized = true;
}
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksView.java 2010-02-02 11:57:15 UTC (rev 947)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksView.java 2010-02-02 14:57:28 UTC (rev 948)
@@ -263,7 +263,7 @@
}
};
- t.schedule(50);
+ t.schedule(500);
isInitialized = true;
}
14 years, 3 months
Overlord SVN: r947 - in bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client: process and 1 other directories.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2010-02-02 06:57:15 -0500 (Tue, 02 Feb 2010)
New Revision: 947
Modified:
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/AbstractRESTAction.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/LoadingOverlay.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AbstractTaskList.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/LoadTasksAction.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/LoadTasksParticipationAction.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksView.java
Log:
Fix taskk toolset initialization. Added LoadingOverlay to task related tools
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/AbstractRESTAction.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/AbstractRESTAction.java 2010-02-02 11:25:31 UTC (rev 946)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/AbstractRESTAction.java 2010-02-02 11:57:15 UTC (rev 947)
@@ -23,6 +23,7 @@
import com.google.gwt.http.client.*;
import com.google.gwt.user.client.Timer;
+import com.google.gwt.user.client.ui.Widget;
import com.mvc4g.client.ActionInterface;
import com.mvc4g.client.Controller;
import org.jboss.bpm.console.client.ApplicationContext;
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/LoadingOverlay.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/LoadingOverlay.java 2010-02-02 11:25:31 UTC (rev 946)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/LoadingOverlay.java 2010-02-02 11:57:15 UTC (rev 947)
@@ -33,7 +33,7 @@
public static void on(Widget parent, boolean loading)
{
- if(loading)
+ if(parent !=null && loading)
{
int left = parent.getAbsoluteLeft();
int top = parent.getAbsoluteTop();
@@ -41,11 +41,14 @@
int width = parent.getOffsetWidth();
int height = parent.getOffsetHeight();
- p = new InfoPanel();
- p.setStylePrimaryName("bpm-loading-overy");
- p.setWidget(new Image("images/loading_lite.gif"));
- p.setPopupPosition(left+(width/2)-15, top+(height/2)-15);
- p.show();
+ if(width>100 & height>100) // workaround hidden panels
+ {
+ p = new InfoPanel();
+ p.setStylePrimaryName("bpm-loading-overy");
+ p.setWidget(new Image("images/loading_lite.gif"));
+ p.setPopupPosition(left+(width/2)-15, top+(height/2)-15);
+ p.show();
+ }
}
else
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java 2010-02-02 11:25:31 UTC (rev 946)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java 2010-02-02 11:57:15 UTC (rev 947)
@@ -285,13 +285,14 @@
model.clear();
+ // clear instance panel
+ controller.handleEvent(new Event(ClearInstancesAction.ID, null));
+
// clear details
controller.handleEvent(
new Event(UpdateProcessDetailAction.ID, null)
);
- // clear instance panel
- controller.handleEvent(new Event(ClearInstancesAction.ID, null));
}
public void update(Object... data)
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AbstractTaskList.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AbstractTaskList.java 2010-02-02 11:25:31 UTC (rev 946)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AbstractTaskList.java 2010-02-02 11:57:15 UTC (rev 947)
@@ -62,8 +62,6 @@
this.controller = controller;
}
- public abstract void update(String identity, List<TaskRef> tasks);
-
public TaskRef getSelection()
{
TaskRef selection = null;
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java 2010-02-02 11:25:31 UTC (rev 946)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java 2010-02-02 11:57:15 UTC (rev 947)
@@ -25,6 +25,7 @@
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.gen2.table.event.client.RowSelectionEvent;
import com.google.gwt.gen2.table.event.client.RowSelectionHandler;
+import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Widget;
import com.mvc4g.client.Controller;
@@ -36,10 +37,7 @@
import org.gwt.mosaic.ui.client.list.DefaultListModel;
import org.jboss.bpm.console.client.ApplicationContext;
import org.jboss.bpm.console.client.ServerPlugins;
-import org.jboss.bpm.console.client.common.IFrameWindowCallback;
-import org.jboss.bpm.console.client.common.IFrameWindowPanel;
-import org.jboss.bpm.console.client.common.PagingCallback;
-import org.jboss.bpm.console.client.common.PagingPanel;
+import org.jboss.bpm.console.client.common.*;
import org.jboss.bpm.console.client.model.TaskRef;
import org.jboss.bpm.console.client.task.events.DetailViewEvent;
import org.jboss.bpm.console.client.task.events.TaskIdentityEvent;
@@ -54,7 +52,7 @@
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
@LoadTool(name = "Personal Tasks", group = "Tasks", priority = 2, icon = "userIcon")
-public class AssignedTasksView extends AbstractTaskList implements WSComponent
+public class AssignedTasksView extends AbstractTaskList implements WSComponent, DataDriven
{
public final static String ID = AssignedTasksView.class.getName();
@@ -71,7 +69,7 @@
private PagingPanel pagingPanel;
- MosaicPanel panel;
+ private MosaicPanel panel;
public AssignedTasksView()
{
@@ -79,7 +77,6 @@
appContext = Registry.get(ApplicationContext.class);
}
- @Override
public Widget getWidget()
{
panel = new MosaicPanel(new BorderLayout());
@@ -98,6 +95,9 @@
{
if(!isInitialized)
{
+ // workaround
+ OpenTasksView.registerCommonActions(controller);
+
taskList = new MosaicPanel( new BoxLayout(BoxLayout.Orientation.VERTICAL));
taskList.setPadding(0);
taskList.setWidgetSpacing(0);
@@ -272,28 +272,62 @@
ServerPlugins.has("org.jboss.bpm.console.server.plugin.FormDispatcherPlugin");
viewBtn.setEnabled(hasDispatcherPlugin);
+
+ Timer t = new Timer()
+ {
+ @Override
+ public void run()
+ {
+ // force loading
+ controller.handleEvent(
+ new Event(LoadTasksAction.ID, appContext.getAuthentication().getUsername())
+ );
+ }
+ };
+
+ t.schedule(50);
+
isInitialized = true;
}
}
- public void update(String identity, List<TaskRef> tasks)
+ public void reset()
{
- this.identity = identity;
- this.cachedTasks = tasks;
- if(isInitialized())pagingPanel.reset();
+ final DefaultListModel<TaskRef> model =
+ (DefaultListModel<TaskRef>) listBox.getModel();
+
+ model.clear();
+
+ // clear details
+ controller.handleEvent(
+ new Event(UpdateDetailsAction.ID, new DetailViewEvent("AssignedDetailView", null))
+ );
+ }
+
+ public void update(Object... data)
+ {
+ this.identity = (String)data[0];
+ this.cachedTasks = (List<TaskRef>)data[1];
+ pagingPanel.reset();
renderUpdate();
}
+ public void setLoading(boolean isLoading)
+ {
+ if(panel.isVisible())
+ LoadingOverlay.on(taskList, isLoading);
+ }
+
private void renderUpdate()
{
// lazy init
initialize();
+ reset();
+
final DefaultListModel<TaskRef> model =
(DefaultListModel<TaskRef>) listBox.getModel();
- model.clear();
-
List<TaskRef> trimmed = pagingPanel.trim(cachedTasks);
for(TaskRef task : trimmed)
{
@@ -301,12 +335,6 @@
model.add(task);
}
- // clear details
- controller.handleEvent(
- new Event(UpdateDetailsAction.ID, new DetailViewEvent("AssignedDetailView", null))
- );
-
-
}
}
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/LoadTasksAction.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/LoadTasksAction.java 2010-02-02 11:25:31 UTC (rev 946)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/LoadTasksAction.java 2010-02-02 11:57:15 UTC (rev 947)
@@ -26,6 +26,7 @@
import com.mvc4g.client.Controller;
import org.jboss.bpm.console.client.URLBuilder;
import org.jboss.bpm.console.client.common.AbstractRESTAction;
+import org.jboss.bpm.console.client.common.DataDriven;
import org.jboss.bpm.console.client.model.DTOParser;
import org.jboss.bpm.console.client.model.TaskRef;
import org.jboss.bpm.console.client.util.ConsoleLog;
@@ -59,6 +60,12 @@
return RequestBuilder.GET;
}
+ @Override
+ protected DataDriven getDataDriven(Controller controller)
+ {
+ return (AssignedTasksView)controller.getView(AssignedTasksView.ID);
+ }
+
public void handleSuccessfulResponse(
final Controller controller, final Object event, Response response)
{
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/LoadTasksParticipationAction.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/LoadTasksParticipationAction.java 2010-02-02 11:25:31 UTC (rev 946)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/LoadTasksParticipationAction.java 2010-02-02 11:57:15 UTC (rev 947)
@@ -26,6 +26,7 @@
import com.mvc4g.client.Controller;
import org.jboss.bpm.console.client.URLBuilder;
import org.jboss.bpm.console.client.common.AbstractRESTAction;
+import org.jboss.bpm.console.client.common.DataDriven;
import org.jboss.bpm.console.client.model.DTOParser;
import org.jboss.bpm.console.client.model.TaskRef;
import org.jboss.bpm.console.client.util.ConsoleLog;
@@ -59,6 +60,12 @@
return RequestBuilder.GET;
}
+ @Override
+ protected DataDriven getDataDriven(Controller controller)
+ {
+ return (OpenTasksView)controller.getView(OpenTasksView.ID);
+ }
+
public void handleSuccessfulResponse(
final Controller controller, final Object event, Response response)
{
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksView.java 2010-02-02 11:25:31 UTC (rev 946)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksView.java 2010-02-02 11:57:15 UTC (rev 947)
@@ -25,6 +25,7 @@
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.gen2.table.event.client.RowSelectionEvent;
import com.google.gwt.gen2.table.event.client.RowSelectionHandler;
+import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Widget;
import com.mvc4g.client.Controller;
@@ -35,6 +36,8 @@
import org.gwt.mosaic.ui.client.layout.*;
import org.gwt.mosaic.ui.client.list.DefaultListModel;
import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.common.DataDriven;
+import org.jboss.bpm.console.client.common.LoadingOverlay;
import org.jboss.bpm.console.client.common.PagingCallback;
import org.jboss.bpm.console.client.common.PagingPanel;
import org.jboss.bpm.console.client.model.TaskRef;
@@ -51,7 +54,7 @@
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
@LoadTool(name = "Group Tasks", group = "Tasks", priority = 1, icon = "taskIcon")
-public class OpenTasksView extends AbstractTaskList implements WSComponent
+public class OpenTasksView extends AbstractTaskList implements WSComponent, DataDriven
{
public final static String ID = OpenTasksView.class.getName();
@@ -68,7 +71,25 @@
private Controller controller;
- @Override
+ private static boolean actionSetup = false;
+
+ public static void registerCommonActions(Controller controller)
+ {
+ if(!actionSetup)
+ {
+ // create and register actions
+ controller.addAction(LoadTasksAction.ID, new LoadTasksAction());
+ controller.addAction(LoadTasksParticipationAction.ID, new LoadTasksParticipationAction());
+ controller.addAction(ClaimTaskAction.ID, new ClaimTaskAction());
+ controller.addAction(ReleaseTaskAction.ID, new ReleaseTaskAction());
+ controller.addAction(UpdateDetailsAction.ID, new UpdateDetailsAction());
+ controller.addAction(AssignTaskAction.ID, new AssignTaskAction());
+ controller.addAction(ReloadAllTaskListsAction.ID, new ReloadAllTaskListsAction());
+
+ actionSetup = true;
+ }
+ }
+
public Widget getWidget()
{
panel = new MosaicPanel(new BorderLayout());
@@ -78,18 +99,10 @@
initialize();
+ registerCommonActions(controller);
+
// ----
- // create and register actions
- controller.addAction(LoadTasksAction.ID, new LoadTasksAction());
- controller.addAction(LoadTasksParticipationAction.ID, new LoadTasksParticipationAction());
- controller.addAction(ClaimTaskAction.ID, new ClaimTaskAction());
- controller.addAction(ReleaseTaskAction.ID, new ReleaseTaskAction());
- controller.addAction(UpdateDetailsAction.ID, new UpdateDetailsAction());
- controller.addAction(AssignTaskAction.ID, new AssignTaskAction());
- controller.addAction(ReloadAllTaskListsAction.ID, new ReloadAllTaskListsAction());
-
-
/*TaskDetailView assignedDetailView = new TaskDetailView(false);
controller.addView("AssignedDetailView", assignedDetailView);
assignedDetailView.initialize();
@@ -238,39 +251,68 @@
controller.addView("OpenDetailView", detailsView);
detailsView.initialize();
+ Timer t = new Timer()
+ {
+ @Override
+ public void run()
+ {
+ // force loading
+ controller.handleEvent(
+ new Event(LoadTasksParticipationAction.ID, getAssignedIdentity())
+ );
+ }
+ };
+
+ t.schedule(50);
+
isInitialized = true;
}
}
- public void update(String identity, List<TaskRef> tasks)
+
+ public void reset()
{
- this.identity = identity;
- this.cachedTasks = tasks;
+ final DefaultListModel<TaskRef> model =
+ (DefaultListModel<TaskRef>) listBox.getModel();
+
+ model.clear();
+
+ // clear details
+ controller.handleEvent(
+ new Event(UpdateDetailsAction.ID, new DetailViewEvent("OpenDetailView", null))
+ );
+ }
+
+ public void update(Object... data)
+ {
+ this.identity = (String)data[0];
+ this.cachedTasks = (List<TaskRef>)data[1];
pagingPanel.reset();
renderUpdate();
}
+ public void setLoading(boolean isLoading)
+ {
+ if(panel.isVisible())
+ LoadingOverlay.on(taskList, isLoading);
+ }
+
private void renderUpdate()
{
// lazy init
initialize();
+ reset();
+
final DefaultListModel<TaskRef> model =
(DefaultListModel<TaskRef>) listBox.getModel();
- model.clear();
-
List<TaskRef> trimmed = pagingPanel.trim(cachedTasks);
for(TaskRef task : trimmed)
{
if(TaskRef.STATE.OPEN ==task.getCurrentState())
model.add(task);
}
-
- // details
- controller.handleEvent(
- new Event(UpdateDetailsAction.ID, new DetailViewEvent("OpenDetailView", null))
- );
}
}
14 years, 3 months
Overlord SVN: r946 - in bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console: client/process and 1 other directories.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2010-02-02 06:25:31 -0500 (Tue, 02 Feb 2010)
New Revision: 946
Added:
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/DataDriven.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/LoadingOverlay.java
Modified:
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/AbstractRESTAction.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceListView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateDefinitionsAction.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstancesAction.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/public/console.css
Log:
Added DataDriven and LoadingOverlay
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/AbstractRESTAction.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/AbstractRESTAction.java 2010-02-01 18:08:40 UTC (rev 945)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/AbstractRESTAction.java 2010-02-02 11:25:31 UTC (rev 946)
@@ -58,7 +58,11 @@
try
{
- controller.handleEvent( LoadingStatusAction.ON );
+ //controller.handleEvent( LoadingStatusAction.ON );
+ if(getDataDriven(controller)!=null)
+ {
+ getDataDriven(controller).setLoading(true);
+ }
final Request request = builder.sendRequest(null,
new RequestCallback()
@@ -91,7 +95,11 @@
}
finally
{
- controller.handleEvent( LoadingStatusAction.OFF );
+ //controller.handleEvent( LoadingStatusAction.OFF );
+ if(getDataDriven(controller)!=null)
+ {
+ getDataDriven(controller).setLoading(false);
+ }
}
}
}
@@ -120,10 +128,20 @@
{
// Couldn't connect to server
handleError(url, e);
- controller.handleEvent( LoadingStatusAction.OFF );
+ //controller.handleEvent( LoadingStatusAction.OFF );
+
+ if(getDataDriven(controller)!=null)
+ {
+ getDataDriven(controller).setLoading(false);
+ }
}
}
+ protected DataDriven getDataDriven(Controller controller)
+ {
+ return null;
+ }
+
protected void handleError(String url, Throwable t)
{
final String out =
Added: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/DataDriven.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/DataDriven.java (rev 0)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/DataDriven.java 2010-02-02 11:25:31 UTC (rev 946)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client.common;
+
+/**
+ * Simple marker for data driven view components
+ */
+public interface DataDriven
+{
+ void reset();
+ void update(Object... data);
+ void setLoading(boolean isLoading);
+}
Added: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/LoadingOverlay.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/LoadingOverlay.java (rev 0)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/LoadingOverlay.java 2010-02-02 11:25:31 UTC (rev 946)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client.common;
+
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.Image;
+import com.google.gwt.user.client.ui.Widget;
+import org.gwt.mosaic.ui.client.infopanel.InfoPanel;
+
+public class LoadingOverlay
+{
+
+ static InfoPanel p = null;
+
+ public static void on(Widget parent, boolean loading)
+ {
+ if(loading)
+ {
+ int left = parent.getAbsoluteLeft();
+ int top = parent.getAbsoluteTop();
+
+ int width = parent.getOffsetWidth();
+ int height = parent.getOffsetHeight();
+
+ p = new InfoPanel();
+ p.setStylePrimaryName("bpm-loading-overy");
+ p.setWidget(new Image("images/loading_lite.gif"));
+ p.setPopupPosition(left+(width/2)-15, top+(height/2)-15);
+ p.show();
+
+ }
+ else
+ {
+ if(p!=null)
+ {
+ p.hide();
+ p = null;
+ }
+ }
+ }
+}
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java 2010-02-01 18:08:40 UTC (rev 945)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java 2010-02-02 11:25:31 UTC (rev 946)
@@ -36,12 +36,13 @@
import org.gwt.mosaic.ui.client.ToolBar;
import org.gwt.mosaic.ui.client.layout.*;
import org.gwt.mosaic.ui.client.list.DefaultListModel;
+import org.jboss.bpm.console.client.common.DataDriven;
+import org.jboss.bpm.console.client.common.LoadingOverlay;
import org.jboss.bpm.console.client.common.PagingCallback;
import org.jboss.bpm.console.client.common.PagingPanel;
import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
import org.jboss.errai.common.client.framework.WSComponent;
import org.jboss.errai.workspaces.client.Registry;
-import org.jboss.errai.workspaces.client.framework.annotations.LoadTool;
import java.util.ArrayList;
import java.util.List;
@@ -50,7 +51,7 @@
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
//@LoadTool(name = "Definitions", group = "Processes")
-public class DefinitionListView implements WSComponent, ViewInterface
+public class DefinitionListView implements WSComponent, ViewInterface, DataDriven
{
public final static String ID = DefinitionListView.class.getName();
@@ -70,9 +71,8 @@
private List<ProcessDefinitionRef> definitions = null;
private PagingPanel pagingPanel;
- MosaicPanel panel;
+ private MosaicPanel panel;
- @Override
public Widget getWidget()
{
@@ -132,10 +132,14 @@
new Button("Refresh", new ClickHandler() {
public void onClick(ClickEvent clickEvent)
{
+ final DefaultListModel<ProcessDefinitionRef> model =
+ (DefaultListModel<ProcessDefinitionRef>) listBox.getModel();
+ model.clear();
+
// force loading
controller.handleEvent(
new Event(UpdateDefinitionsAction.ID, null)
- );
+ );
}
}
)
@@ -274,22 +278,43 @@
this.controller = controller;
}
- public void update(List<ProcessDefinitionRef> definitions)
+ public void reset()
{
- this.definitions = definitions;
+ final DefaultListModel<ProcessDefinitionRef> model =
+ (DefaultListModel<ProcessDefinitionRef>) listBox.getModel();
+
+ model.clear();
+
+ // clear details
+ controller.handleEvent(
+ new Event(UpdateProcessDetailAction.ID, null)
+ );
+
+ // clear instance panel
+ controller.handleEvent(new Event(ClearInstancesAction.ID, null));
+ }
+
+ public void update(Object... data)
+ {
+ this.definitions = (List<ProcessDefinitionRef>)data[0];
pagingPanel.reset();
renderFiltered();
}
+ public void setLoading(boolean isLoading)
+ {
+ LoadingOverlay.on(panel, isLoading);
+ }
+
private void renderFiltered()
{
if(this.definitions!=null)
{
+ reset();
+
final DefaultListModel<ProcessDefinitionRef> model =
- (DefaultListModel<ProcessDefinitionRef>) listBox.getModel();
+ (DefaultListModel<ProcessDefinitionRef>) listBox.getModel();
- model.clear();
-
List<ProcessDefinitionRef> tmp = new ArrayList<ProcessDefinitionRef>();
for(ProcessDefinitionRef def : definitions)
{
@@ -311,13 +336,6 @@
if(listBox.getSelectedIndex()!=-1)
listBox.setItemSelected(listBox.getSelectedIndex(), false);
- // clear details
- controller.handleEvent(
- new Event(UpdateProcessDetailAction.ID, null)
- );
-
- // clear instance panel
- controller.handleEvent(new Event(ClearInstancesAction.ID, null));
}
}
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceListView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceListView.java 2010-02-01 18:08:40 UTC (rev 945)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceListView.java 2010-02-02 11:25:31 UTC (rev 946)
@@ -36,10 +36,7 @@
import org.gwt.mosaic.ui.client.layout.*;
import org.gwt.mosaic.ui.client.list.DefaultListModel;
import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.common.IFrameWindowCallback;
-import org.jboss.bpm.console.client.common.IFrameWindowPanel;
-import org.jboss.bpm.console.client.common.PagingCallback;
-import org.jboss.bpm.console.client.common.PagingPanel;
+import org.jboss.bpm.console.client.common.*;
import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
import org.jboss.bpm.console.client.model.ProcessInstanceRef;
import org.jboss.bpm.console.client.process.events.InstanceEvent;
@@ -54,7 +51,7 @@
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
//@LoadTool(name = "Instances", group = "Processes")
-public class InstanceListView implements WSComponent, ViewInterface
+public class InstanceListView implements WSComponent, ViewInterface, DataDriven
{
public final static String ID = InstanceListView.class.getName();
@@ -406,14 +403,19 @@
deleteBtn.setEnabled(false);
}
- public void update(final ProcessDefinitionRef def, List<ProcessInstanceRef> instances)
+ public void update(Object... data)
{
- this.currentDefinition = def;
- this.cachedInstances = instances;
+ this.currentDefinition = (ProcessDefinitionRef)data[0];
+ this.cachedInstances = (List<ProcessInstanceRef>)data[1];
if(isInitialized()) pagingPanel.reset();
renderUpdate();
}
+
+ public void setLoading(boolean isLoading)
+ {
+ LoadingOverlay.on(instanceList, isLoading);
+ }
private void renderUpdate()
{
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateDefinitionsAction.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateDefinitionsAction.java 2010-02-01 18:08:40 UTC (rev 945)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateDefinitionsAction.java 2010-02-02 11:25:31 UTC (rev 946)
@@ -26,6 +26,7 @@
import com.mvc4g.client.Controller;
import org.jboss.bpm.console.client.URLBuilder;
import org.jboss.bpm.console.client.common.AbstractRESTAction;
+import org.jboss.bpm.console.client.common.DataDriven;
import org.jboss.bpm.console.client.model.JSOParser;
import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
import org.jboss.bpm.console.client.util.ConsoleLog;
@@ -46,9 +47,9 @@
{
return ID;
}
-
+
public String getUrl(Object event)
- {
+ {
return URLBuilder.getInstance().getProcessDefinitionsURL();
}
@@ -57,6 +58,12 @@
return RequestBuilder.GET;
}
+ @Override
+ protected DataDriven getDataDriven(Controller controller)
+ {
+ return (DefinitionListView) controller.getView(DefinitionListView.ID);
+ }
+
public void handleSuccessfulResponse(final Controller controller, final Object event, Response response)
{
long start = System.currentTimeMillis();
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstancesAction.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstancesAction.java 2010-02-01 18:08:40 UTC (rev 945)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstancesAction.java 2010-02-02 11:25:31 UTC (rev 946)
@@ -26,6 +26,7 @@
import com.mvc4g.client.Controller;
import org.jboss.bpm.console.client.URLBuilder;
import org.jboss.bpm.console.client.common.AbstractRESTAction;
+import org.jboss.bpm.console.client.common.DataDriven;
import org.jboss.bpm.console.client.model.JSOParser;
import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
import org.jboss.bpm.console.client.model.ProcessInstanceRef;
@@ -60,6 +61,12 @@
return RequestBuilder.GET;
}
+ @Override
+ protected DataDriven getDataDriven(Controller controller)
+ {
+ return (InstanceListView) controller.getView(InstanceListView.ID);
+ }
+
public void handleSuccessfulResponse(final Controller controller, final Object event, Response response)
{
final long start = System.currentTimeMillis();
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/public/console.css
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/public/console.css 2010-02-01 18:08:40 UTC (rev 945)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/public/console.css 2010-02-02 11:25:31 UTC (rev 946)
@@ -357,6 +357,7 @@
border-bottom: 1px solid #bbbbbb;
}
+
/* mosaic overrides */
.mosaic-Label {
@@ -367,4 +368,16 @@
font-size: 10px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
+}
+
+.bpm-loading-overy {
+ font-size: 10px;
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+ background-color: #ffffff;
+ border: 1px solid #cccccc;
+ width: 25px;
+ height: 25px;
+ margin:0px;
+ padding:0px;
}
\ No newline at end of file
14 years, 3 months
Overlord SVN: r945 - bpm-console/trunk/gui/war/src/main/resources.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2010-02-01 13:08:40 -0500 (Mon, 01 Feb 2010)
New Revision: 945
Modified:
bpm-console/trunk/gui/war/src/main/resources/ErraiService.properties
Log:
Use async dispatcher
Modified: bpm-console/trunk/gui/war/src/main/resources/ErraiService.properties
===================================================================
--- bpm-console/trunk/gui/war/src/main/resources/ErraiService.properties 2010-02-01 16:12:35 UTC (rev 944)
+++ bpm-console/trunk/gui/war/src/main/resources/ErraiService.properties 2010-02-01 18:08:40 UTC (rev 945)
@@ -21,6 +21,24 @@
#errai.authentication_adapter=org.jboss.errai.persistence.server.security.HibernateAuthenticationAdapter
#errai.authentication_adapter=org.jboss.errai.bus.server.security.auth.JAASAdapter
+#
+# Request dispatcher implementation (default is SimpleDispatcher)
+#
+#errai.dispatcher_implementation=org.jboss.errai.bus.server.SimpleDispatcher
+errai.dispatcher_implementation=org.jboss.errai.bus.server.AsyncDispatcher
+
+#
+# Worker pool size. This is the number of threads the asynchronous worker pool should provide for processing
+# incoming messages. This option is only valid when using the AsyncDispatcher implementation.
+#
+errai.async.thread_pool_size=5
+
+#
+# Worker timeout (in seconds). This defines the time that a single asychronous process may run, before the worker pool
+# terminates it and reclaims the thread. This option is only valid when using the AsyncDispatcher implementation.
+#
+errai.async.worker.timeout=5
+
##
## This property indicates whether or not authentication is required for all communication with the bus. Set this
## to 'true' if all access to your application should be secure.
14 years, 3 months
Overlord SVN: r944 - in bpm-console/trunk/gui/war: src/main/java/org/jboss/bpm/console/client and 3 other directories.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2010-02-01 11:12:35 -0500 (Mon, 01 Feb 2010)
New Revision: 944
Added:
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/public/
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/public/console.css
Removed:
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/Application.java
bpm-console/trunk/gui/war/war/console.css
Modified:
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/Application.gwt.xml
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ErraiApplication.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportFrame.java
bpm-console/trunk/gui/war/war/app.html
Log:
Fix console.css inclusion
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/Application.gwt.xml
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/Application.gwt.xml 2010-02-01 11:56:44 UTC (rev 943)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/Application.gwt.xml 2010-02-01 16:12:35 UTC (rev 944)
@@ -64,7 +64,7 @@
<servlet path="/xhp" class="jmaki.xhp.XmlHttpProxyServlet"/>
- <!-- Specify a css to load into your gwt application -->
- <stylesheet src='/console.css' />
+ <!-- Specify a css to load into your gwt application -->
+ <stylesheet src="console.css"/>
</module>
Deleted: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/Application.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/Application.java 2010-02-01 11:56:44 UTC (rev 943)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/Application.java 2010-02-01 16:12:35 UTC (rev 944)
@@ -1,64 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.bpm.console.client;
-
-import com.allen_sauer.gwt.log.client.Log;
-import com.google.gwt.core.client.EntryPoint;
-import com.google.gwt.user.client.Command;
-import com.google.gwt.user.client.DeferredCommand;
-import com.mvc4g.client.Controller;
-import com.mvc4g.client.Event;
-
-/**
- * Setup the main {@link com.mvc4g.client.Controller} and fire
- * a login event.
- *
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-@Deprecated
-public class Application implements EntryPoint
-{
-
- public void onModuleLoad() {
- Log.setUncaughtExceptionHandler();
-
- DeferredCommand.addCommand(new Command() {
- public void execute() {
-
- // hide spash image
- // move the loading div to background
- //DOM.getElementById("splash_loading").getStyle().setProperty("display", "none");
- //DOM.getElementById("splash").getStyle().setProperty("z-index", "-1");
-
- onModuleLoad2();
- }
- });
- }
-
- public void onModuleLoad2()
- {
- Controller mainController = new com.mvc4g.client.Controller();
- mainController.addAction("login", new LoginAction());
- mainController.addView("loginView", new LoginView());
- mainController.handleEvent(new Event("login", null));
- }
-}
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ErraiApplication.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ErraiApplication.java 2010-02-01 11:56:44 UTC (rev 943)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ErraiApplication.java 2010-02-01 16:12:35 UTC (rev 944)
@@ -25,6 +25,7 @@
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Command;
+import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.DeferredCommand;
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
@@ -57,8 +58,8 @@
// hide splash image
// move the loading div to background
- //DOM.getElementById("splash_loading").getStyle().setProperty("display", "none");
- //DOM.getElementById("splash").getStyle().setProperty("z-index", "-1");
+ DOM.getElementById("splash_loading").getStyle().setProperty("display", "none");
+ DOM.getElementById("splash").getStyle().setProperty("zIndex", "-1");
onModuleLoad2();
}
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java 2010-02-01 11:56:44 UTC (rev 943)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java 2010-02-01 16:12:35 UTC (rev 944)
@@ -23,11 +23,10 @@
import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.RunAsyncCallback;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.http.client.*;
-import com.google.gwt.user.client.Command;
-import com.google.gwt.user.client.Cookies;
-import com.google.gwt.user.client.DeferredCommand;
-import com.google.gwt.user.client.WindowCloseListener;
+import com.google.gwt.user.client.*;
import com.google.gwt.user.client.ui.*;
import com.mvc4g.client.Controller;
import com.mvc4g.client.ViewInterface;
@@ -130,8 +129,8 @@
public void execute()
{
// move the loading div to foreground
- //DOM.getElementById("splash").getStyle().setProperty("z-index", "1000");
- //DOM.getElementById("ui_loading").getStyle().setProperty("visibility", "visible");
+ DOM.getElementById("splash").getStyle().setProperty("zIndex", "1000");
+ DOM.getElementById("ui_loading").getStyle().setProperty("visibility", "visible");
// launch workspace
GWT.runAsync(
@@ -163,7 +162,7 @@
// and finally initialize the workspace UI
Registry.get(SecurityService.class).setDeferredNotification(false);
-
+
MessageBuilder.createMessage()
.toSubject("AuthorizationListener")
.signalling()
@@ -171,7 +170,27 @@
.with(SecurityParts.Roles, roleString.toString())
.noErrorHandling()
.sendNowWith(ErraiBus.get()
- );
+ );
+
+ Timer t = new Timer() {
+
+ public void run()
+ {
+ // hide the loading div
+ DeferredCommand.addCommand(
+ new Command()
+ {
+ public void execute()
+ {
+ DOM.getElementById("ui_loading").getStyle().setProperty("visibility", "hidden");
+ DOM.getElementById("splash").getStyle().setProperty("visibility", "hidden");
+ }
+ });
+
+ }
+ };
+ t.schedule(2000);
+
}
}
);
@@ -218,24 +237,22 @@
* The 'layout' window panel.
*/
private void createLayoutWindowPanel() {
- window = new WindowPanel(config.getProfileName());
+ window = new WindowPanel(config.getProfileName(), false);
window.setAnimationEnabled(true);
- //window.setSize("320px", "180px");
MosaicPanel panel = new MosaicPanel();
createLayoutContent(panel);
window.setWidget(panel);
- window.addWindowCloseListener(new WindowCloseListener() {
- public void onWindowClosed() {
- window = null;
- }
-
- public String onWindowClosing() {
- return null;
- }
- });
+ window.addWindowClosingHandler(
+ new Window.ClosingHandler() {
+ public void onWindowClosing(Window.ClosingEvent event)
+ {
+ window = null;
+ }
+ }
+ );
}
/**
@@ -250,11 +267,20 @@
Widget form = createForm();
final Button submit = new Button("Submit");
- submit.addClickListener(new ClickListener()
+ submit.addClickHandler(new ClickHandler()
{
- public void onClick(Widget widget)
+ public void onClick(ClickEvent clickEvent)
{
+ DeferredCommand.addCommand(
+ new Command()
+ {
+ public void execute()
+ {
+ window.hide();
+ }
+ });
+
engageLogin();
}
});
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportFrame.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportFrame.java 2010-02-01 11:56:44 UTC (rev 943)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportFrame.java 2010-02-01 16:12:35 UTC (rev 944)
@@ -49,6 +49,7 @@
// report frame
frame = new Frame();
DOM.setStyleAttribute(frame.getElement(), "border", "none");
+ DOM.setStyleAttribute(frame.getElement(), "backgroundColor", "#ffffff");
this.add(frame);
}
Added: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/public/console.css
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/public/console.css (rev 0)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/public/console.css 2010-02-01 16:12:35 UTC (rev 944)
@@ -0,0 +1,370 @@
+body {
+ height: 100%;
+ overflow: hidden;
+ margin: 0;
+ padding: 0;
+}
+
+.bpm-layout {
+ border: 1px solid green;
+ margin: 10px;
+}
+
+.bpm-header{
+ background-color:#ffffff;
+}
+
+.bpm-lazy-header {
+ height:35px;
+ margin-bottom:5px;
+ border:1px solid black;
+}
+
+.bpm-header-left {
+ background-color:#ffffff;
+ vertical-align:bottom;
+ margin-left:15px;
+}
+
+.bpm-header-right {
+ background-color:#ffffff;
+ vertical-align:bottom;
+ margin-right:15px;
+}
+
+.bpm-label-header {
+ background-color:#F8F8F8;
+ font-weight:BOLD;
+ font-size:14px;
+ color:#989898;
+ padding-bottom:2px;
+ padding-left:5px;
+ margin-bottom:5px;
+}
+
+.bpm-label-header-invert {
+ background-color:#F8F8F8;
+ font-weight:bold;
+ font-size:14px;
+ padding-bottom:2px;
+ padding-left:5px;
+ margin-bottom:10px;
+}
+
+.bpm-headline {
+ font-weight:BOLD;
+ font-size:14px;
+ padding:10px;
+}
+
+.bpm-header-userinfo {
+ font-family: sans-serif;
+ width:150px;
+}
+
+.bpm-header-versioninfo {
+ font-family: sans-serif;
+ color: #C8C8C8;
+}
+
+.bpm-login-info {
+ font-family: sans-serif;
+ color: #000000;
+ font-size:9px;
+ width:95%;
+ margin-top:5px;
+ text-align:right;
+}
+
+.bpm-user-info-popup {
+ font-family: sans-serif;
+ color: #000000;
+ font-size:9px;
+ margin:5px;
+}
+
+.bpm-property-image {
+ padding-top:10px;
+}
+
+.bpm-filter-panel {
+ padding-top:5px;
+ padding-right:2px;
+ background-color:#dfe8f6;
+ border-bottom: 1px solid #bbbbbb;
+}
+
+.bpm-editor-info {
+ font-family: sans-serif;
+ font-size:18px;
+}
+
+.bpm-editor-header {
+ font-family: sans-serif;
+ background-color: #E0E0E0;
+}
+
+.bpm-menu {
+ height: 50px;
+ width: 100%;
+ border: 1px solid;
+}
+
+.bpm-workspace {
+ width: 100%;
+ height:100%;
+}
+
+.bpm-label {
+ font-family: sans-serif;
+ font-size: small;
+}
+
+.bpm-ListHeaderRow {
+ font-weight: bold;
+}
+
+.bpm-EvenRow {
+ background-color: #f0f4f8;
+}
+
+.bpm-FieldValue {
+
+}
+
+.bpm-EditorHeader {
+
+}
+
+.bpm-loading-color {
+ background-color:#FF6600;
+}
+
+.bpm-loading-image {
+ background-color:#ffffff;
+ width:43px;
+ height:11px;
+}
+
+.bpm-ProcessImage {
+ border: 0px;
+}
+
+.bpm-SplitPanel {
+ border: 1px dashed green;
+ vertical-align: top;
+ position:relative; top:5px; left:5px;
+}
+
+.piechart-types {
+ font-size: small;
+ list-style-type:decimal;
+ font-family: sans-serif;
+}
+
+.bpm-help-panel {
+ background-color:#F0F0F0;
+ font-family: sans-serif;
+ font-size: small;
+}
+
+.bpm-help-icon {
+ background-image: url( images/icons/14.png)
+}
+
+.bpm-report-icon {
+ background-image: url( images/icons/31.png)
+}
+
+.bpm-process-icon {
+ background-image: url( images/icons/41.png)
+}
+
+.bpm-task-icon {
+ background-image: url( images/icons/29.png)
+}
+
+.bpm-instance-icon {
+ background-image: url( images/icons/05_1.png)
+}
+
+.bpm-settings-icon {
+
+}
+
+.bpm-operation-ui {
+ font-size: 10px;
+}
+
+.bpm-tools-icon {
+ background-image: url( images/icons/36.png)
+}
+
+.bpm-switch-context-icon {
+ background-image: url( images/icons/13.png)
+}
+
+.bpm-comment-icon {
+ background-image: url( images/icons/27.png)
+}
+
+.bpm-enalrge-icon {
+ background-image: url( images/icons/49.png)
+}
+
+.login-panel-content {
+ text-align: center;
+}
+
+.bpm-examine-icon {
+ background-image: url( images/icons/examine.png)
+}
+
+.bpm-add-icon {
+ background-image: url( images/icons/add.png)
+}
+
+.bpm-lock-icon-small {
+ background-image: url( images/icons/lock_small.png)
+}
+
+.bpm-remove-icon {
+ background-image: url( images/icons/remove.png)
+}
+
+.bpm-play-icon {
+ background-image: url( images/icons/play.png)
+}
+
+.bpm-stop-icon {
+ background-image: url( images/icons/stop.png)
+}
+
+.bpm-pause-icon {
+ background-image: url( images/icons/pause.png)
+}
+
+div.activeNode {
+ position:absolute;
+ border-width:1px;
+ border-style:solid;
+ border-color:#339933;
+}
+
+div.activeNode-header {
+ position:absolute;
+ overflow:hidden;
+}
+
+div.activeNode-header-link {
+ cursor:default;
+ font-family:sans-serif;
+ font-size:10px;
+ white-space:nowrap;
+ color:#ffffff;
+ padding-left:3px;
+ padding-right:3px;
+ border-width:1px;
+ border-style:solid;
+ border-color:#339933;
+ background-color:#339933;
+}
+
+div.activeNode-header-link a {
+ color:#ffffff;
+ text-decoration:none;
+}
+
+div.activeNode-header-link a:hover {
+ text-decoration:underline;
+}
+
+/* start - override gwt-log styles */
+.log-panel {
+ background-color: #ECF2FC;
+ border: 0px solid black;
+ margin: 0px;
+ padding:10px;
+}
+
+.log-panel .log-scroll-panel {
+ width: 100% !important;
+ height: 80px !important;
+}
+
+.log-panel .log-text-area,.log-panel BUTTON {
+ font-size: 8pt;
+ margin: 0em;
+}
+
+.log-resize-se {
+ visibility:hidden;
+}
+
+/* end - override gwt-log styles */
+
+/* start - custom widgets */
+.bpm-detail-panel {
+ border:1px solid #E8E8E8;
+}
+
+.bpm-property-box
+{
+ padding:5px;
+ width:100%;
+ border:1px solid #cccccc;
+ background: #F8F8F8;
+}
+
+.bpm-prop-grid {
+ width:100%;
+ border:1px solid #cccccc;
+}
+
+.bpm-prop-grid-even {
+ background: #F8F8F8;
+}
+
+.bpm-prop-grid-odd {
+ background:#F0F0F0;
+}
+
+.bpm-prop-grid-label {
+
+}
+
+/* end - custom widgets */
+
+.gwt-SuggestBoxPopup { z-index:100000; border: 1px solid #ffffff;}
+.gwt-SuggestBoxPopup .item { padding: 2px;}
+.gwt-SuggestBoxPopup .item-selected { background-color: #C3D9FF; padding: 1px;}
+
+.bpm-graphView-activityImage {
+ background-image: url(images/icons/play_red_big.png);
+ background-repeat:no-repeat;
+ width:16px;
+ height:16px;
+}
+
+.bpm-window-layout {
+ margin: 1px;
+}
+
+.bpm-paging-panel {
+ padding:2px;
+ font-size:8px;
+ background-color:#dfe8f6;
+ border-bottom: 1px solid #bbbbbb;
+}
+
+/* mosaic overrides */
+
+.mosaic-Label {
+ font-weight:bold;
+}
+
+.gwt-Button {
+ font-size: 10px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+}
\ No newline at end of file
Modified: bpm-console/trunk/gui/war/war/app.html
===================================================================
--- bpm-console/trunk/gui/war/war/app.html 2010-02-01 11:56:44 UTC (rev 943)
+++ bpm-console/trunk/gui/war/war/app.html 2010-02-01 16:12:35 UTC (rev 944)
@@ -12,8 +12,6 @@
<!-- -->
<script type="text/javascript" language="javascript" src="app/app.nocache.js"></script>
- <link rel="stylesheet" href="../console.css" type="text/css">
-
<style type="text/css">
html { height: 100%; overflow: hidden; margin: 0; padding: 0; }
#splash {
@@ -47,7 +45,7 @@
<!-- OPTIONAL: include this if you want history support -->
<!--iframe src="javascript:''" id="__gwt_historyFrame" style="width: 0; height: 0; border: 0"></iframe-->
-<!--div id="splash" style="height:100%;width:100%;">
+<div id="splash" style="height:100%;width:100%;">
<table width="100%" height="100%" >
<tr>
<td width="100%" height="100%" align="center" valign="middle">
@@ -56,7 +54,7 @@
</td>
</tr>
</table>
-</div-->
+</div>
</body>
</html>
Deleted: bpm-console/trunk/gui/war/war/console.css
===================================================================
--- bpm-console/trunk/gui/war/war/console.css 2010-02-01 11:56:44 UTC (rev 943)
+++ bpm-console/trunk/gui/war/war/console.css 2010-02-01 16:12:35 UTC (rev 944)
@@ -1,370 +0,0 @@
-body {
- height: 100%;
- overflow: hidden;
- margin: 0;
- padding: 0;
-}
-
-.bpm-layout {
- border: 1px solid green;
- margin: 10px;
-}
-
-.bpm-header{
- background-color:#ffffff;
-}
-
-.bpm-lazy-header {
- height:35px;
- margin-bottom:5px;
- border:1px solid black;
-}
-
-.bpm-header-left {
- background-color:#ffffff;
- vertical-align:bottom;
- margin-left:15px;
-}
-
-.bpm-header-right {
- background-color:#ffffff;
- vertical-align:bottom;
- margin-right:15px;
-}
-
-.bpm-label-header {
- background-color:#F8F8F8;
- font-weight:BOLD;
- font-size:14px;
- color:#989898;
- padding-bottom:2px;
- padding-left:5px;
- margin-bottom:5px;
-}
-
-.bpm-label-header-invert {
- background-color:#F8F8F8;
- font-weight:bold;
- font-size:14px;
- padding-bottom:2px;
- padding-left:5px;
- margin-bottom:10px;
-}
-
-.bpm-headline {
- font-weight:BOLD;
- font-size:14px;
- padding:10px;
-}
-
-.bpm-header-userinfo {
- font-family: sans-serif;
- width:150px;
-}
-
-.bpm-header-versioninfo {
- font-family: sans-serif;
- color: #C8C8C8;
-}
-
-.bpm-login-info {
- font-family: sans-serif;
- color: #000000;
- font-size:9px;
- width:95%;
- margin-top:5px;
- text-align:right;
-}
-
-.bpm-user-info-popup {
- font-family: sans-serif;
- color: #000000;
- font-size:9px;
- margin:5px;
-}
-
-.bpm-property-image {
- padding-top:10px;
-}
-
-.bpm-filter-panel {
- padding-top:5px;
- padding-right:2px;
- background-color:#dfe8f6;
- border-bottom: 1px solid #bbbbbb;
-}
-
-.bpm-editor-info {
- font-family: sans-serif;
- font-size:18px;
-}
-
-.bpm-editor-header {
- font-family: sans-serif;
- background-color: #E0E0E0;
-}
-
-.bpm-menu {
- height: 50px;
- width: 100%;
- border: 1px solid;
-}
-
-.bpm-workspace {
- width: 100%;
- height:100%;
-}
-
-.bpm-label {
- font-family: sans-serif;
- font-size: small;
-}
-
-.bpm-ListHeaderRow {
- font-weight: bold;
-}
-
-.bpm-EvenRow {
- background-color: #f0f4f8;
-}
-
-.bpm-FieldValue {
-
-}
-
-.bpm-EditorHeader {
-
-}
-
-.bpm-loading-color {
- background-color:#FF6600;
-}
-
-.bpm-loading-image {
- background-color:#ffffff;
- width:43px;
- height:11px;
-}
-
-.bpm-ProcessImage {
- border: 0px;
-}
-
-.bpm-SplitPanel {
- border: 1px dashed green;
- vertical-align: top;
- position:relative; top:5px; left:5px;
-}
-
-.piechart-types {
- font-size: small;
- list-style-type:decimal;
- font-family: sans-serif;
-}
-
-.bpm-help-panel {
- background-color:#F0F0F0;
- font-family: sans-serif;
- font-size: small;
-}
-
-.bpm-help-icon {
- background-image: url( images/icons/14.png)
-}
-
-.bpm-report-icon {
- background-image: url( images/icons/31.png)
-}
-
-.bpm-process-icon {
- background-image: url( images/icons/41.png)
-}
-
-.bpm-task-icon {
- background-image: url( images/icons/29.png)
-}
-
-.bpm-instance-icon {
- background-image: url( images/icons/05_1.png)
-}
-
-.bpm-settings-icon {
-
-}
-
-.bpm-operation-ui {
- font-size: 10px;
-}
-
-.bpm-tools-icon {
- background-image: url( images/icons/36.png)
-}
-
-.bpm-switch-context-icon {
- background-image: url( images/icons/13.png)
-}
-
-.bpm-comment-icon {
- background-image: url( images/icons/27.png)
-}
-
-.bpm-enalrge-icon {
- background-image: url( images/icons/49.png)
-}
-
-.login-panel-content {
- text-align: center;
-}
-
-.bpm-examine-icon {
- background-image: url( images/icons/examine.png)
-}
-
-.bpm-add-icon {
- background-image: url( images/icons/add.png)
-}
-
-.bpm-lock-icon-small {
- background-image: url( images/icons/lock_small.png)
-}
-
-.bpm-remove-icon {
- background-image: url( images/icons/remove.png)
-}
-
-.bpm-play-icon {
- background-image: url( images/icons/play.png)
-}
-
-.bpm-stop-icon {
- background-image: url( images/icons/stop.png)
-}
-
-.bpm-pause-icon {
- background-image: url( images/icons/pause.png)
-}
-
-div.activeNode {
- position:absolute;
- border-width:1px;
- border-style:solid;
- border-color:#339933;
-}
-
-div.activeNode-header {
- position:absolute;
- overflow:hidden;
-}
-
-div.activeNode-header-link {
- cursor:default;
- font-family:sans-serif;
- font-size:10px;
- white-space:nowrap;
- color:#ffffff;
- padding-left:3px;
- padding-right:3px;
- border-width:1px;
- border-style:solid;
- border-color:#339933;
- background-color:#339933;
-}
-
-div.activeNode-header-link a {
- color:#ffffff;
- text-decoration:none;
-}
-
-div.activeNode-header-link a:hover {
- text-decoration:underline;
-}
-
-/* start - override gwt-log styles */
-.log-panel {
- background-color: #ECF2FC;
- border: 0px solid black;
- margin: 0px;
- padding:10px;
-}
-
-.log-panel .log-scroll-panel {
- width: 100% !important;
- height: 80px !important;
-}
-
-.log-panel .log-text-area,.log-panel BUTTON {
- font-size: 8pt;
- margin: 0em;
-}
-
-.log-resize-se {
- visibility:hidden;
-}
-
-/* end - override gwt-log styles */
-
-/* start - custom widgets */
-.bpm-detail-panel {
- border:1px solid #E8E8E8;
-}
-
-.bpm-property-box
-{
- padding:5px;
- width:100%;
- border:1px solid #cccccc;
- background: #F8F8F8;
-}
-
-.bpm-prop-grid {
- width:100%;
- border:1px solid #cccccc;
-}
-
-.bpm-prop-grid-even {
- background: #F8F8F8;
-}
-
-.bpm-prop-grid-odd {
- background:#F0F0F0;
-}
-
-.bpm-prop-grid-label {
-
-}
-
-/* end - custom widgets */
-
-.gwt-SuggestBoxPopup { z-index:100000; border: 1px solid #ffffff;}
-.gwt-SuggestBoxPopup .item { padding: 2px;}
-.gwt-SuggestBoxPopup .item-selected { background-color: #C3D9FF; padding: 1px;}
-
-.bpm-graphView-activityImage {
- background-image: url(images/icons/play_red_big.png);
- background-repeat:no-repeat;
- width:16px;
- height:16px;
-}
-
-.bpm-window-layout {
- margin: 1px;
-}
-
-.bpm-paging-panel {
- padding:2px;
- font-size:8px;
- background-color:#dfe8f6;
- border-bottom: 1px solid #bbbbbb;
-}
-
-/* mosaic overrides */
-
-.mosaic-Label {
- font-weight:bold;
-}
-
-.gwt-Button {
- font-size: 10px;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
-}
\ No newline at end of file
14 years, 3 months