Overlord SVN: r942 - bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2010-01-29 05:11:19 -0500 (Fri, 29 Jan 2010)
New Revision: 942
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/LoginView.java
Log:
Update to new workspace API
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-01-28 20:13:30 UTC (rev 941)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ErraiApplication.java 2010-01-29 10:11:19 UTC (rev 942)
@@ -35,6 +35,7 @@
import org.jboss.bpm.console.client.util.ConsoleLog;
import org.jboss.errai.bus.client.ClientMessageBus;
import org.jboss.errai.bus.client.ErraiBus;
+import org.jboss.errai.bus.client.security.SecurityService;
import org.jboss.errai.workspaces.client.Registry;
import org.jboss.errai.workspaces.client.framework.annotations.GroupOrder;
import org.jboss.errai.workspaces.client.modules.auth.AuthenticationModule;
@@ -69,7 +70,7 @@
new Runnable() {
public void run()
{
- Registry.get(AuthenticationModule.class).setDeferredNotification(true);
+ Registry.get(SecurityService.class).setDeferredNotification(true);
}
}
);
@@ -95,7 +96,7 @@
ApplicationContext appContext = new ApplicationContext()
{
- @Override
+
public void displayMessage(String message, boolean isError)
{
if(isError)
@@ -104,19 +105,19 @@
MessageBox.alert("Warn", message);
}
- @Override
+
public Authentication getAuthentication()
{
return Registry.get(Authentication.class); // set in login view
}
- @Override
+
public ConsoleConfig getConfig()
{
return config;
}
- @Override
+
public void refreshView()
{
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-01-28 20:13:30 UTC (rev 941)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java 2010-01-29 10:11:19 UTC (rev 942)
@@ -37,12 +37,17 @@
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;
+
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
@@ -140,21 +145,33 @@
public void onSuccess()
{
- //new MainLayout(controller, auth, config);
- MessageBuilder.createMessage()
- .toSubject(Workspace.SUBJECT)
- .command(LayoutCommands.Initialize)
- .noErrorHandling()
- .sendNowWith(ErraiBus.get()
- );
+ List<String> roles = auth.getRolesAssigned();
+ StringBuilder roleString = new StringBuilder();
+ int index = 1;
+ for(String s : roles)
+ {
+ roleString.append(s);
+ if(index<roles.size())
+ roleString.append(",");
+ index++;
+
+ }
+
+ // populate authentication context
+ // this will trigger the AuthenticaionModule
+ // and finally initialize the workspace UI
+
+ Registry.get(SecurityService.class).setDeferredNotification(false);
+
MessageBuilder.createMessage()
- .toSubject("appContext")
+ .toSubject("AuthorizationListener")
.signalling()
- .with("username", auth.getUsername())
+ .with(SecurityParts.Name, auth.getUsername())
+ .with(SecurityParts.Roles, roleString.toString())
.noErrorHandling()
.sendNowWith(ErraiBus.get()
- );
+ );
}
}
);
16 years, 5 months
Overlord SVN: r941 - bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2010-01-28 15:13:30 -0500 (Thu, 28 Jan 2010)
New Revision: 941
Removed:
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/Preferences.java
Modified:
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/BootstrapAction.java
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
Log:
Move preferences to errai workspace module
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/BootstrapAction.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/BootstrapAction.java 2010-01-28 15:05:45 UTC (rev 940)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/BootstrapAction.java 2010-01-28 20:13:30 UTC (rev 941)
@@ -23,13 +23,10 @@
import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.http.client.Response;
-import com.google.gwt.user.client.Command;
-import com.google.gwt.user.client.DeferredCommand;
import com.mvc4g.client.Controller;
import org.jboss.bpm.console.client.common.AbstractRESTAction;
import org.jboss.bpm.console.client.model.JSOParser;
import org.jboss.bpm.console.client.model.ServerStatus;
-import org.jboss.bpm.console.client.util.ConsoleLog;
import org.jboss.errai.workspaces.client.Registry;
/**
@@ -67,28 +64,6 @@
public void handleSuccessfulResponse(final Controller controller, final Object event, Response response)
{
ServerStatus status = JSOParser.parseStatus(response.getText());
- ServerPlugins.setStatus(status);
-
- Boolean toogleEditor = (Boolean)event;
- if(toogleEditor)
- {
- // show default editor
- DeferredCommand.addCommand(
- new Command()
- {
- public void execute()
- {
- String defaultEditorID = Preferences.has(Preferences.BPM_DEFAULT_TOOL) ?
- Preferences.get(Preferences.BPM_DEFAULT_TOOL) :
- appContext.getConfig().getDefaultEditor();
-
- /*Workspace workspace = appContext.getWorkpace();
- if(workspace.hasEditor(defaultEditorID))
- workspace.showEditor(defaultEditorID);*/
- ConsoleLog.warn("Preferences ignored!");
- }
- }
- );
- }
+ ServerPlugins.setStatus(status);
}
}
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-01-28 15:05:45 UTC (rev 940)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ErraiApplication.java 2010-01-28 20:13:30 UTC (rev 941)
@@ -36,9 +36,13 @@
import org.jboss.errai.bus.client.ClientMessageBus;
import org.jboss.errai.bus.client.ErraiBus;
import org.jboss.errai.workspaces.client.Registry;
+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
+ */
+@GroupOrder("Tasks, Processes, Reporting, Runtime, Settings")
public class ErraiApplication implements EntryPoint
{
public void onModuleLoad() {
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-01-28 15:05:45 UTC (rev 940)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java 2010-01-28 20:13:30 UTC (rev 941)
@@ -37,8 +37,11 @@
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.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;
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
@@ -139,8 +142,8 @@
{
//new MainLayout(controller, auth, config);
MessageBuilder.createMessage()
- .toSubject("Workspace")
- .command("Initialize")
+ .toSubject(Workspace.SUBJECT)
+ .command(LayoutCommands.Initialize)
.noErrorHandling()
.sendNowWith(ErraiBus.get()
);
@@ -304,7 +307,7 @@
private Widget createForm()
{
MosaicPanel p = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));
-
+
usernameInput = new TextBox();
passwordInput = new PasswordTextBox();
Deleted: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/Preferences.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/Preferences.java 2010-01-28 15:05:45 UTC (rev 940)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/Preferences.java 2010-01-28 20:13:30 UTC (rev 941)
@@ -1,56 +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.google.gwt.user.client.Cookies;
-
-import java.util.Date;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class Preferences
-{
- // Editor that should be launched at startup
- public static final String BPM_DEFAULT_TOOL = "bpm.default.tool";
-
- public static boolean has(String key)
- {
- return Preferences.get(key)!=null;
- }
-
- public static String get(String key)
- {
- return Cookies.getCookie(key);
- }
-
- public static void set(String key, String value)
- {
- Date twoWeeks = new Date(System.currentTimeMillis()+(2*604800*1000));
- Cookies.setCookie(key, value, twoWeeks);
- }
-
- public static void clear(String key)
- {
- Cookies.removeCookie(key);
- }
-}
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-01-28 15:05:45 UTC (rev 940)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/PreferencesView.java 2010-01-28 20:13:30 UTC (rev 941)
@@ -34,6 +34,7 @@
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.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;
@@ -59,8 +60,7 @@
{
this.controller = controller;
}
-
- @Override
+
public Widget getWidget()
{
panel = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));
@@ -81,7 +81,7 @@
layout.add(multiBox);
// init
- String prefEditor = Preferences.get(Preferences.BPM_DEFAULT_TOOL);
+ String prefEditor = Preferences.get(Preferences.DEFAULT_TOOL);
for(ToolSet ts : toolsets)
{
multiBox.addItem(ts.getToolSetName());
@@ -99,7 +99,7 @@
{
if(ts.getToolSetName().equals(title))
{
- Preferences.set(Preferences.BPM_DEFAULT_TOOL, ts.getToolSetName());
+ Preferences.set(Preferences.DEFAULT_TOOL, ts.getToolSetName());
}
}
}
16 years, 5 months
Overlord SVN: r940 - in bpm-console/trunk/gui/war: war and 1 other directory.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2010-01-28 10:05:45 -0500 (Thu, 28 Jan 2010)
New Revision: 940
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/InstanceListView.java
bpm-console/trunk/gui/war/war/console.css
Log:
Disable inactive funtions
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-01-28 14:44:47 UTC (rev 939)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java 2010-01-28 15:05:45 UTC (rev 940)
@@ -214,7 +214,7 @@
final ListBox<ProcessDefinitionRef> listBox =
new ListBox<ProcessDefinitionRef>(
new String[] {
- "Process Name"//, "Version", "Suspended"
+ "<b>Process Name</b>"//, "Version", "Suspended"
}
);
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-01-28 14:44:47 UTC (rev 939)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceListView.java 2010-01-28 15:05:45 UTC (rev 940)
@@ -118,7 +118,7 @@
listBox =
new ListBox<ProcessInstanceRef>(
new String[] {
- "Instance ID", "State", "Start Date"}
+ "<b>Instance ID</b>", "State", "Start Date"}
);
listBox.setCellRenderer(new ListBox.CellRenderer<ProcessInstanceRef>() {
Modified: bpm-console/trunk/gui/war/war/console.css
===================================================================
--- bpm-console/trunk/gui/war/war/console.css 2010-01-28 14:44:47 UTC (rev 939)
+++ bpm-console/trunk/gui/war/war/console.css 2010-01-28 15:05:45 UTC (rev 940)
@@ -2,7 +2,7 @@
height: 100%;
overflow: hidden;
margin: 0;
- padding: 0;
+ padding: 0;
}
.bpm-layout {
16 years, 5 months
Overlord SVN: r939 - in bpm-console/trunk/gui/war: src/main/java/org/jboss/bpm/console/client and 2 other directories.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2010-01-28 09:44:47 -0500 (Thu, 28 Jan 2010)
New Revision: 939
Added:
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ClearInstancesAction.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/MergedProcessView.java
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/process/DefinitionListView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceDetailView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceListView.java
bpm-console/trunk/gui/war/war/app.html
bpm-console/trunk/gui/war/war/console.css
Log:
Fix BPMC-39: Improve navigation process->instances
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-01-26 16:16:30 UTC (rev 938)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/Application.gwt.xml 2010-01-28 14:44:47 UTC (rev 939)
@@ -24,19 +24,19 @@
<inherits name='org.jboss.bpm.report.BPMReport' />
- <!-- Includes the public resources used by the GWT Mosaic -->
+ <!-- Includes the public resources used by the GWT Mosaic -->
<!-- themes. Those files do not inject a style sheet into the -->
<!-- application. -->
- <!--inherits name="org.gwt.mosaic.theme.standard.StandardResources" />
- <inherits name="org.gwt.mosaic.theme.chrome.ChromeResources" />
- <inherits name="org.gwt.mosaic.theme.dark.DarkResources" /-->
+ <!--inherits name='org.gwt.mosaic.theme.standard.StandardResources' /-->
+ <!--inherits name="org.gwt.mosaic.theme.chrome.ChromeResources" /-->
+ <!--inherits name="org.gwt.mosaic.theme.dark.DarkResources" /-->
<inherits name="org.gwt.mosaic.theme.aegean.AegeanResources" />
-
+
<!-- Inherit the default GWT Mosaic style sheet. You can change -->
<!-- the theme of your GWT Mosaic application by uncommenting -->
<!-- any one of the following lines. -->
- <!-- <inherits name='org.gwt.mosaic.theme.standard.Standard' /> -->
- <!-- <inherits name="org.gwt.mosaic.chrome.Chrome"/> -->
+ <!-- <inherits name='org.gwt.mosaic.theme.standard.Standard' /> -->
+ <!--inherits name="org.gwt.mosaic.theme.chrome.Chrome" /-->
<!-- <inherits name="org.gwt.mosaic.dark.Dark"/> -->
<inherits name='org.gwt.mosaic.theme.aegean.Aegean' />
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-01-26 16:16:30 UTC (rev 938)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ErraiApplication.java 2010-01-28 14:44:47 UTC (rev 939)
@@ -28,11 +28,15 @@
import com.google.gwt.user.client.DeferredCommand;
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.process.UpdateDefinitionsAction;
import org.jboss.bpm.console.client.util.ConsoleLog;
+import org.jboss.errai.bus.client.ClientMessageBus;
+import org.jboss.errai.bus.client.ErraiBus;
import org.jboss.errai.workspaces.client.Registry;
+import org.jboss.errai.workspaces.client.modules.auth.AuthenticationModule;
public class ErraiApplication implements EntryPoint
@@ -55,11 +59,22 @@
public void onModuleLoad2()
{
+ final ClientMessageBus bus = (ClientMessageBus) ErraiBus.get();
+
+ bus.addPostInitTask(
+ new Runnable() {
+ public void run()
+ {
+ Registry.get(AuthenticationModule.class).setDeferredNotification(true);
+ }
+ }
+ );
+
Controller mainController = new com.mvc4g.client.Controller();
Registry.set(Controller.class, mainController);
// ------
-
+
// setup base urls
String proxyUrl = null;
if (!GWT.isScript())
@@ -75,11 +90,14 @@
// ------
ApplicationContext appContext = new ApplicationContext()
- {
+ {
@Override
public void displayMessage(String message, boolean isError)
{
- throw new RuntimeException("Not implemented!");
+ if(isError)
+ MessageBox.error("Error", message);
+ else
+ MessageBox.alert("Warn", message);
}
@Override
@@ -97,14 +115,14 @@
@Override
public void refreshView()
{
-
+
}
};
Registry.set(ApplicationContext.class, appContext);
// ------
-
+
registerGlobalViewsAndActions(mainController);
mainController.addAction("login", new LoginAction());
@@ -115,13 +133,13 @@
mainController.handleEvent(
new com.mvc4g.client.Event(BootstrapAction.ID, Boolean.TRUE)
);
-
- mainController.handleEvent(new Event("login", null));
+
+ mainController.handleEvent(new Event("login", null));
}
- /**
- * Views and actions accessible from any component
- */
+ /**
+ * Views and actions accessible from any component
+ */
private void registerGlobalViewsAndActions(Controller controller)
{
// register global views and actions, available across editors
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-01-26 16:16:30 UTC (rev 938)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java 2010-01-28 14:44:47 UTC (rev 939)
@@ -38,6 +38,7 @@
import org.jboss.errai.bus.client.ErraiBus;
import org.jboss.errai.bus.client.MessageBuilder;
import org.jboss.errai.workspaces.client.Registry;
+import org.jboss.errai.workspaces.client.Workspace;
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
@@ -139,7 +140,7 @@
//new MainLayout(controller, auth, config);
MessageBuilder.createMessage()
.toSubject("Workspace")
- .command("launch")
+ .command("Initialize")
.noErrorHandling()
.sendNowWith(ErraiBus.get()
);
Added: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ClearInstancesAction.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ClearInstancesAction.java (rev 0)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ClearInstancesAction.java 2010-01-28 14:44:47 UTC (rev 939)
@@ -0,0 +1,39 @@
+/*
+ * 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.mvc4g.client.ActionInterface;
+import com.mvc4g.client.Controller;
+
+/**
+ * reset the instance list and associated views
+ */
+public class ClearInstancesAction implements ActionInterface
+{
+ public static String ID = ClearInstancesAction.class.getName();
+
+ public void execute(Controller controller, Object o)
+ {
+ InstanceListView view = (InstanceListView) controller.getView(InstanceListView.ID);
+ view.reset();
+ }
+}
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-01-26 16:16:30 UTC (rev 938)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java 2010-01-28 14:44:47 UTC (rev 939)
@@ -49,7 +49,7 @@
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-@LoadTool(name = "Definitions", group = "Processes")
+//@LoadTool(name = "Definitions", group = "Processes")
public class DefinitionListView implements WSComponent, ViewInterface
{
public final static String ID = DefinitionListView.class.getName();
@@ -201,7 +201,7 @@
ProcessDetailView detailsView = new ProcessDetailView();
controller.addView(ProcessDetailView.ID, detailsView);
controller.addAction(UpdateProcessDetailAction.ID, new UpdateProcessDetailAction());
- layout.add(detailsView, new BorderLayoutData(BorderLayout.Region.SOUTH, 10,200));
+ //layout.add(detailsView, new BorderLayoutData(BorderLayout.Region.SOUTH, 10,200));
panel.add(layout);
@@ -214,7 +214,7 @@
final ListBox<ProcessDefinitionRef> listBox =
new ListBox<ProcessDefinitionRef>(
new String[] {
- "Name", "Version", "Suspended"
+ "Process Name"//, "Version", "Suspended"
}
);
@@ -315,6 +315,9 @@
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/InstanceDetailView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceDetailView.java 2010-01-26 16:16:30 UTC (rev 938)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceDetailView.java 2010-01-28 14:44:47 UTC (rev 939)
@@ -40,6 +40,7 @@
import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
import org.jboss.bpm.console.client.model.ProcessInstanceRef;
import org.jboss.bpm.console.client.util.SimpleDateFormat;
+import org.jboss.errai.workspaces.client.Registry;
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
@@ -75,10 +76,10 @@
private boolean isRiftsawInstance;
- public InstanceDetailView(final ApplicationContext appContext)
+ public InstanceDetailView()
{
super("Instance details");
- this.appContext = appContext;
+ this.appContext = Registry.get(ApplicationContext.class);
isRiftsawInstance = appContext.getConfig().getProfileName().equals("BPEL Console");
super.setStyleName("bpm-detail-panel");
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-01-26 16:16:30 UTC (rev 938)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceListView.java 2010-01-28 14:44:47 UTC (rev 939)
@@ -46,14 +46,14 @@
import org.jboss.bpm.console.client.util.SimpleDateFormat;
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;
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-@LoadTool(name = "Instances", group = "Processes")
+//@LoadTool(name = "Instances", group = "Processes")
public class InstanceListView implements WSComponent, ViewInterface
{
public final static String ID = InstanceListView.class.getName();
@@ -82,6 +82,8 @@
MosaicPanel panel;
+ private Button startBtn, terminateBtn, deleteBtn;
+
public Widget getWidget()
{
@@ -159,14 +161,14 @@
}
}
);
-
+
// toolbar
final MosaicPanel toolBox = new MosaicPanel();
toolBox.setPadding(0);
toolBox.setWidgetSpacing(5);
final ToolBar toolBar = new ToolBar();
- toolBar.add(
+ /*toolBar.add(
new Button("Refresh", new ClickHandler() {
public void onClick(ClickEvent clickEvent)
@@ -180,150 +182,159 @@
}
}
)
- );
+ );*/
+ startBtn = new Button("Start", new ClickHandler()
+ {
+ public void onClick(ClickEvent clickEvent)
+ {
+ MessageBox.confirm("Start new execution",
+ "Do you want to start a new execution of this process?",
+ new MessageBox.ConfirmationCallback()
+ {
+ public void onResult(boolean doIt)
+ {
+ if (doIt)
+ {
+ String url = getCurrentDefinition().getFormUrl();
+ boolean hasForm = (url != null && !url.equals(""));
+ if (hasForm)
+ {
+ ProcessDefinitionRef definition = getCurrentDefinition();
+ iframeWindow = new IFrameWindowPanel(
+ definition.getFormUrl(), "New Process Instance: " + definition.getId()
+ );
+ iframeWindow.setCallback(
+ new IFrameWindowCallback()
+ {
+ public void onWindowClosed()
+ {
+ controller.handleEvent(
+ new Event(UpdateInstancesAction.ID, getCurrentDefinition())
+ );
+ }
+ }
+ );
- toolBar.add(
- new Button("Start", new ClickHandler()
- {
- public void onClick(ClickEvent clickEvent)
- {
- MessageBox.confirm("Start new execution",
- "Do you want to start a new execution of this process?",
- new MessageBox.ConfirmationCallback() {
- public void onResult(boolean doIt)
+ iframeWindow.show();
+ }
+ else
{
- if(doIt)
- {
- String url = getCurrentDefinition().getFormUrl();
- boolean hasForm = (url !=null && !url.equals(""));
- if(hasForm)
- {
- ProcessDefinitionRef definition = getCurrentDefinition();
- iframeWindow = new IFrameWindowPanel(
- definition.getFormUrl(), "New Process Instance: "+ definition.getId()
- );
+ controller.handleEvent(
+ new Event(
+ StartNewInstanceAction.ID,
+ getCurrentDefinition()
+ )
+ );
+ }
+ }
- iframeWindow.setCallback(
- new IFrameWindowCallback()
- {
- public void onWindowClosed()
- {
- controller.handleEvent(
- new Event(UpdateInstancesAction.ID, getCurrentDefinition())
- );
- }
- }
- );
+ }
+ });
- iframeWindow.show();
- }
- else
- {
- controller.handleEvent(
- new Event(
- StartNewInstanceAction.ID,
- getCurrentDefinition()
- )
- );
- }
- }
-
- }
- });
-
- }
- }
- )
- {{
- setVisible(!isRiftsawInstance);
- }}
+ }
+ }
+ )
+ {{
+ setVisible(!isRiftsawInstance);
+ }};
+
+ toolBar.add(
+ startBtn
);
-
- toolBar.add(
- new Button("Terminate", new ClickHandler()
+ terminateBtn = new Button("Terminate", new ClickHandler()
+ {
+ public void onClick(ClickEvent clickEvent)
+ {
+ if (getSelection() != null)
{
- public void onClick(ClickEvent clickEvent)
- {
- if(getSelection()!=null)
- {
- MessageBox.confirm("Terminate instance",
- "Terminating this instance will stop further execution.",
- new MessageBox.ConfirmationCallback() {
- public void onResult(boolean doIt)
- {
- if(doIt)
- {
- ProcessInstanceRef selection = getSelection();
- selection.setState(ProcessInstanceRef.STATE.ENDED);
- selection.setEndResult(ProcessInstanceRef.RESULT.OBSOLETE);
- controller.handleEvent(
- new Event(
- StateChangeAction.ID,
- selection
- )
- );
- }
- }
- });
- }
- else
- {
- MessageBox.alert("Missing selection", "Please select an instance");
- }
- }
+ MessageBox.confirm("Terminate instance",
+ "Terminating this instance will stop further execution.",
+ new MessageBox.ConfirmationCallback()
+ {
+ public void onResult(boolean doIt)
+ {
+ if (doIt)
+ {
+ ProcessInstanceRef selection = getSelection();
+ selection.setState(ProcessInstanceRef.STATE.ENDED);
+ selection.setEndResult(ProcessInstanceRef.RESULT.OBSOLETE);
+ controller.handleEvent(
+ new Event(
+ StateChangeAction.ID,
+ selection
+ )
+ );
+ }
+ }
+ });
}
- )
+ else
+ {
+ MessageBox.alert("Missing selection", "Please select an instance");
+ }
+ }
+ }
);
+ toolBar.add(
+ terminateBtn
+ );
-
- toolBar.add(
- new Button("Delete", new ClickHandler()
+ deleteBtn = new Button("Delete", new ClickHandler()
+ {
+ public void onClick(ClickEvent clickEvent)
+ {
+ if (getSelection() != null)
{
- public void onClick(ClickEvent clickEvent)
- {
- if(getSelection()!=null)
- {
- MessageBox.confirm("Delete instance",
- "Deleting this instance will remove any history information and associated tasks as well.",
- new MessageBox.ConfirmationCallback() {
- public void onResult(boolean doIt)
- {
+ MessageBox.confirm("Delete instance",
+ "Deleting this instance will remove any history information and associated tasks as well.",
+ new MessageBox.ConfirmationCallback()
+ {
+ public void onResult(boolean doIt)
+ {
- if(doIt)
- {
- ProcessInstanceRef selection = getSelection();
- selection.setState(ProcessInstanceRef.STATE.ENDED);
+ if (doIt)
+ {
+ ProcessInstanceRef selection = getSelection();
+ selection.setState(ProcessInstanceRef.STATE.ENDED);
- controller.handleEvent(
- new Event(
- DeleteInstanceAction.ID,
- selection
- )
- );
- }
- }
- });
+ controller.handleEvent(
+ new Event(
+ DeleteInstanceAction.ID,
+ selection
+ )
+ );
+ }
+ }
+ });
- }
- else
- {
- MessageBox.alert("Missing selection", "Please select an instance");
- }
- }
}
- )
- {{
- setVisible(!isRiftsawInstance);
- }}
+ else
+ {
+ MessageBox.alert("Missing selection", "Please select an instance");
+ }
+ }
+ }
+ )
+ {{
+ setVisible(!isRiftsawInstance);
+ }};
+
+ toolBar.add(
+ deleteBtn
);
+ startBtn.setEnabled(false);
+ terminateBtn.setEnabled(false);
+ deleteBtn.setEnabled(false);
+
toolBox.add(toolBar, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
+
instanceList.add(toolBox, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
instanceList.add(listBox, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
@@ -342,7 +353,7 @@
}
}
);
- instanceList.add(pagingPanel, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
+ //instanceList.add(pagingPanel, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
// cached data?
if(this.cachedInstances!=null)
@@ -353,9 +364,10 @@
layout.add(instanceList, new BorderLayoutData(BorderLayout.Region.CENTER));
// details
- InstanceDetailView detailsView = new InstanceDetailView(appContext);
+ InstanceDetailView detailsView = new InstanceDetailView();
controller.addView(InstanceDetailView.ID, detailsView);
controller.addAction(UpdateInstanceDetailAction.ID, new UpdateInstanceDetailAction());
+ controller.addAction(ClearInstancesAction.ID, new ClearInstancesAction());
layout.add(detailsView, new BorderLayoutData(BorderLayout.Region.SOUTH,10,200));
panel.add(layout);
@@ -383,7 +395,17 @@
this.controller = controller;
}
+ public void reset()
+ {
+ this.currentDefinition = null;
+ this.cachedInstances = new ArrayList<ProcessInstanceRef>();
+ renderUpdate();
+ startBtn.setEnabled(false);
+ terminateBtn.setEnabled(false);
+ deleteBtn.setEnabled(false);
+ }
+
public void update(final ProcessDefinitionRef def, List<ProcessInstanceRef> instances)
{
this.currentDefinition = def;
@@ -405,7 +427,10 @@
new InstanceEvent(this.currentDefinition, null)
)
);
-
+
+ startBtn.setEnabled(true);
+ terminateBtn.setEnabled(true);
+ deleteBtn.setEnabled(true);
}
}
Added: 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 (rev 0)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/MergedProcessView.java 2010-01-28 14:44:47 UTC (rev 939)
@@ -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.process;
+
+import com.google.gwt.user.client.ui.Widget;
+import com.mvc4g.client.Controller;
+import org.gwt.mosaic.ui.client.layout.*;
+import org.jboss.errai.common.client.framework.WSComponent;
+import org.jboss.errai.workspaces.client.Registry;
+import org.jboss.errai.workspaces.client.framework.annotations.LoadTool;
+
+/**
+ * Combined view of process and instance data in a single screen
+ */
+@LoadTool(name = "Process Overview", group = "Processes")
+public class MergedProcessView implements WSComponent
+{
+ MosaicPanel panel;
+
+ DefinitionListView definitionView;
+ InstanceListView instanceView;
+
+ public Widget getWidget()
+ {
+ 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());
+ splitPanel.setPadding(0);
+ splitPanel.add(definitionView.getWidget(), new ColumnLayoutData("250 px"));
+ splitPanel.add(instanceView.getWidget());
+
+ panel.add(splitPanel, new BorderLayoutData(BorderLayout.Region.CENTER, false));
+
+ return panel;
+ }
+}
Modified: bpm-console/trunk/gui/war/war/app.html
===================================================================
--- bpm-console/trunk/gui/war/war/app.html 2010-01-26 16:16:30 UTC (rev 938)
+++ bpm-console/trunk/gui/war/war/app.html 2010-01-28 14:44:47 UTC (rev 939)
@@ -15,7 +15,7 @@
<link rel="stylesheet" href="../console.css" type="text/css">
<style type="text/css">
- html, body { height: 100%; overflow: hidden; margin: 0; padding: 0; }
+ html { height: 100%; overflow: hidden; margin: 0; padding: 0; }
#splash {
background:#ffffff;
cursor: wait;
Modified: bpm-console/trunk/gui/war/war/console.css
===================================================================
--- bpm-console/trunk/gui/war/war/console.css 2010-01-26 16:16:30 UTC (rev 938)
+++ bpm-console/trunk/gui/war/war/console.css 2010-01-28 14:44:47 UTC (rev 939)
@@ -1,3 +1,9 @@
+body {
+ height: 100%;
+ overflow: hidden;
+ margin: 0;
+ padding: 0;
+}
.bpm-layout {
border: 1px solid green;
@@ -355,4 +361,10 @@
.mosaic-Label {
font-weight:bold;
+}
+
+.gwt-Button {
+ font-size: 10px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
}
\ No newline at end of file
16 years, 5 months
Overlord SVN: r938 - in bpm-console/trunk: gui/war and 1 other directory.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2010-01-26 11:16:30 -0500 (Tue, 26 Jan 2010)
New Revision: 938
Modified:
bpm-console/trunk/gui/war/pom.xml
bpm-console/trunk/pom.xml
Log:
Cleanup runtime libs
Modified: bpm-console/trunk/gui/war/pom.xml
===================================================================
--- bpm-console/trunk/gui/war/pom.xml 2010-01-26 14:54:44 UTC (rev 937)
+++ bpm-console/trunk/gui/war/pom.xml 2010-01-26 16:16:30 UTC (rev 938)
@@ -17,6 +17,8 @@
<properties>
<gwt-maven.version>2.0-RC1</gwt-maven.version>
<errai.version>1.0-SNAPSHOT</errai.version>
+ <mvel.version>2.0.16-SNAPSHOT</mvel.version>
+ <guice.version>2.0</guice.version>
</properties>
<!-- Dependencies -->
@@ -85,6 +87,24 @@
<version>${gwt.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.mvel</groupId>
+ <artifactId>mvel2</artifactId>
+ <version>${mvel.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>com.google.code.guice</groupId>
+ <artifactId>guice</artifactId>
+ <version>${guice.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.code.guice</groupId>
+ <artifactId>guice</artifactId>
+ <version>${guice.version}</version>
+ <classifier>aopalliance</classifier>
+ </dependency>
+
<!-- GWT extensions -->
<!-- Mosaic -->
@@ -266,8 +286,8 @@
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
- <source>1.6</source>
- <target>1.6</target>
+ <source>1.5</source>
+ <target>1.5</target>
</configuration>
</plugin>
@@ -320,6 +340,21 @@
<version>${version}</version>
<scope>provided</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <scope>provided</scope>
+ <version>1.5.10</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <scope>provided</scope>
+ <version>1.5.10</version>
+ </dependency>
+
</dependencies>
<properties>
<console.app.webcontext>jbpm-console</console.app.webcontext>
Modified: bpm-console/trunk/pom.xml
===================================================================
--- bpm-console/trunk/pom.xml 2010-01-26 14:54:44 UTC (rev 937)
+++ bpm-console/trunk/pom.xml 2010-01-26 16:16:30 UTC (rev 938)
@@ -57,8 +57,7 @@
<errai.version>1.0-SNAPSHOT</errai.version>
</properties>
- <modules>
- <module>workspace</module>
+ <modules>
<module>server</module>
<module>gui</module>
<module>shared</module>
16 years, 6 months
Overlord SVN: r937 - in bpm-console/trunk/gui/war: scripts and 2 other directories.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2010-01-26 09:54:44 -0500 (Tue, 26 Jan 2010)
New Revision: 937
Added:
bpm-console/trunk/gui/war/scripts/
bpm-console/trunk/gui/war/scripts/antrun-version.xml
Removed:
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/MainLayout.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/WorkspaceLauncher.java
Modified:
bpm-console/trunk/gui/war/pom.xml
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/Application.java
Log:
Remove dependency on bpm workspace module and API
Modified: bpm-console/trunk/gui/war/pom.xml
===================================================================
--- bpm-console/trunk/gui/war/pom.xml 2010-01-26 14:31:13 UTC (rev 936)
+++ bpm-console/trunk/gui/war/pom.xml 2010-01-26 14:54:44 UTC (rev 937)
@@ -43,20 +43,6 @@
<dependency>
<groupId>org.jboss.bpm</groupId>
- <artifactId>gwt-console-workspace-api</artifactId>
- <version>${version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.bpm</groupId>
- <artifactId>gwt-console-workspace-api</artifactId>
- <classifier>sources</classifier>
- <version>${version}</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-rpc</artifactId>
<classifier>sources</classifier>
<version>${version}</version>
@@ -255,6 +241,25 @@
<goal>run</goal>
</goals>
</execution>
+
+ <execution>
+ <id>generate-version-class</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <ant antfile="scripts/antrun-version.xml" inheritAll="false" inheritRefs="false">
+ <property name="version" value="${version}" />
+ <property name="src.dir" value="${project.build.directory}/generated-sources" />
+ </ant>
+ </tasks>
+ <sourceRoot>
+ ${project.build.directory}/generated-sources
+ </sourceRoot>
+ </configuration>
+ </execution>
</executions>
</plugin>
Added: bpm-console/trunk/gui/war/scripts/antrun-version.xml
===================================================================
--- bpm-console/trunk/gui/war/scripts/antrun-version.xml (rev 0)
+++ bpm-console/trunk/gui/war/scripts/antrun-version.xml 2010-01-26 14:54:44 UTC (rev 937)
@@ -0,0 +1,12 @@
+<project basedir=".." default="generate-version">
+ <target name="generate-version">
+ <mkdir dir="${src.dir}/org/jboss/bpm/console/client"/>
+ <echo file="${src.dir}/org/jboss/bpm/console/client/Version.java">
+ package org.jboss.bpm.console.client;
+ /** Automatically generated by ant. */
+ public class Version {
+ public static final String VERSION = "${version}";
+ }
+ </echo>
+ </target>
+</project>
\ No newline at end of file
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-01-26 14:31:13 UTC (rev 936)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/Application.gwt.xml 2010-01-26 14:54:44 UTC (rev 937)
@@ -9,10 +9,7 @@
<inherits name="com.google.gwt.i18n.I18N"/>
<inherits name="com.google.gwt.user.ImageBundle"/>
<inherits name="com.google.gwt.xml.XML" />
-
- <!-- remove when migration to errai is done -->
- <inherits name="org.jboss.BPMWorkspace" />
-
+
<inherits name="org.jboss.errai.common.ErraiCommon"/>
<inherits name="org.jboss.errai.bus.ErraiBus" />
<inherits name="org.jboss.errai.workspaces.ErraiWorkspaces" />
Modified: 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-01-26 14:31:13 UTC (rev 936)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/Application.java 2010-01-26 14:54:44 UTC (rev 937)
@@ -34,6 +34,7 @@
*
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
+@Deprecated
public class Application implements EntryPoint
{
Deleted: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/MainLayout.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/MainLayout.java 2010-01-26 14:31:13 UTC (rev 936)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/MainLayout.java 2010-01-26 14:54:44 UTC (rev 937)
@@ -1,270 +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.DivLogger;
-import com.allen_sauer.gwt.log.client.Log;
-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.Command;
-import com.google.gwt.user.client.DeferredCommand;
-import com.google.gwt.user.client.Timer;
-import com.google.gwt.user.client.Window;
-import com.google.gwt.user.client.ui.*;
-import com.mvc4g.client.Controller;
-import org.gwt.mosaic.ui.client.*;
-import org.gwt.mosaic.ui.client.layout.BorderLayout;
-import org.gwt.mosaic.ui.client.layout.BorderLayoutData;
-import org.gwt.mosaic.ui.client.layout.MosaicPanel;
-import org.gwt.mosaic.ui.client.util.ButtonHelper;
-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.WindowUtil;
-import org.jboss.errai.bus.client.ErraiBus;
-import org.jboss.errai.bus.client.MessageBus;
-import org.jboss.errai.workspaces.client.Registry;
-
-import static org.gwt.mosaic.ui.client.layout.BorderLayout.Region;
-
-/**
- * The main composite that assembles the gwt console application.
- *
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class MainLayout extends Composite implements ApplicationContext
-{
- private Header header;
- private Menu menu;
-
- private Workspace workspace;
-
- private Authentication auth;
- private ConsoleConfig config;
-
- private Controller controller;
- private Viewport viewport;
-
- private DivLogger divLogger;
-
- public MainLayout(Controller controller, Authentication auth, ConsoleConfig config)
- {
- this.controller = controller;
- this.auth = auth;
- this.config = config;
-
- final MessageBus bus = ErraiBus.get();
- if(null==bus)
- throw new IllegalStateException("Failed to initialize errai-bus");
-
- Registry.set(ApplicationContext.class, this);
- Registry.set(Controller.class, controller);
-
- display();
- }
-
- public void display()
- {
- viewport = new Viewport();
-
- // manually, otherwise it will appear on the login screen
- divLogger = new DivLogger();
- Log.addLogger(divLogger);
-
- MosaicPanel layout = createLayout();
- viewport.getLayoutPanel().add(layout);
-
- // bootstrap
- controller.handleEvent(
- new com.mvc4g.client.Event(BootstrapAction.ID, Boolean.TRUE)
- );
-
- 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);
-
- RootPanel.get().add(viewport);
-
- }
-
- private MosaicPanel createLayout()
- {
- final MosaicPanel panel = new MosaicPanel(new BorderLayout());
-
- // header
- header = new Header(this, auth.getUsername(), auth.getRolesAssigned());
- panel.add(header, new BorderLayoutData(Region.NORTH, 50));
-
- // menu
- menu = new Menu();
- panel.add(menu, new BorderLayoutData(Region.WEST, 180));
-
- // workspace
- workspace = createWorkspace();
- panel.add(workspace, new BorderLayoutData(Region.CENTER, false));
- registerGlobalViewsAndActions();
-
- // message Panel
- final CaptionLayoutPanel messagePanel = createMessagePanel(panel);
- messagePanel.add(divLogger.getWidget());
- messagePanel.setCollapsed(true);
- panel.add(messagePanel, new BorderLayoutData(Region.SOUTH, true));
-
- // Turn on DivLogger
- divLogger.getWidget().setVisible(true);
-
- return panel;
-
- }
-
- /**
- * Views and actions accessible from any component
- */
- private void registerGlobalViewsAndActions()
- {
- // 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());
-
- }
-
- private CaptionLayoutPanel createMessagePanel(final MosaicPanel panel)
- {
- final CaptionLayoutPanel messagePanel = new CaptionLayoutPanel("Messages", true);
-
- ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
- Button collapse = new Button(
- ButtonHelper.createButtonLabel(
- AbstractImagePrototype.create(icons.collapseDownIcon()),
- "",
- ButtonHelper.ButtonLabelType.TEXT_ON_TOP)
- );
- collapse.addClickHandler(
- new ClickHandler()
- {
- public void onClick(ClickEvent clickEvent)
- {
- messagePanel.setCollapsed(!messagePanel.isCollapsed());
- panel.layout();
- }
- }
- );
-
- messagePanel.getHeader().add(
- collapse,
- Caption.CaptionRegion.RIGHT
- );
- return messagePanel;
- }
-
- private Workspace createWorkspace()
- {
- Workspace workspace = new Workspace(menu);
- WorkspaceLauncher launcher = GWT.create(WorkspaceLauncher.class);
- launcher.launch(workspace); // calls Workspace.addEditor()
- return workspace;
- }
-
-// ---- ApplicationContext interface ----
-
-
- public Viewport getViewport()
- {
- return viewport;
- }
-
- public void displayMessage(final String message, final boolean isError)
- {
- if(isError)
- {
- ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
-
- WindowPanel err = new WindowPanel("Error");
- err.getHeader().add( new Image(icons.errorIcon()) );
- err.setAnimationEnabled(true);
- err.setSize("320px", "240px");
- ScrollLayoutPanel ScrollLayoutPanel = new ScrollLayoutPanel();
- ScrollLayoutPanel.add(new HTML(message));
- err.setWidget(ScrollLayoutPanel);
-
- WindowUtil.addMaximizeButton(err, Caption.CaptionRegion.RIGHT);
- WindowUtil.addMinimizeButton(err, Caption.CaptionRegion.RIGHT);
-
- err.center();
- }
- else
- {
- MessageBox.info("", message);
- }
- }
-
- public Authentication getAuthentication()
- {
- return auth;
- }
-
- public ConsoleConfig getConfig()
- {
- return config;
- }
-
- public Workspace getWorkpace()
- {
- return workspace;
- }
-
- /**
- * hack in order to correctly display widgets that have
- * been rendered hidden
- */
- public void refreshView()
- {
- final int width = Window.getClientWidth();
- final int height = Window.getClientHeight();
- //getViewport().onWindowResized(width, height);
- //getViewport().getLayoutPanel().getResizableWidget().onResize(width, height);
- viewport.getLayoutPanel().layout();
- }
-}
-
Deleted: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/WorkspaceLauncher.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/WorkspaceLauncher.java 2010-01-26 14:31:13 UTC (rev 936)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/WorkspaceLauncher.java 2010-01-26 14:54:44 UTC (rev 937)
@@ -1,30 +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;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public interface WorkspaceLauncher
-{
- void launch(Workspace workspace);
-}
16 years, 6 months
Overlord SVN: r936 - in bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console: client and 4 other directories.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2010-01-26 09:31:13 -0500 (Tue, 26 Jan 2010)
New Revision: 936
Removed:
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/SettingsEditor.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/SettingsEditorNavigation.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/EngineEditor.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/EngineEditorModule.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/EngineEditorNavigation.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditorModule.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditorNavigation.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditorModule.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditorNavigation.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditor.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditorModule.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditorNavigation.java
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/ApplicationContext.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/BootstrapAction.java
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/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/engine/ViewDeploymentAction.java
Log:
Remove legacy code
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-01-26 13:42:23 UTC (rev 935)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/Application.gwt.xml 2010-01-26 14:31:13 UTC (rev 936)
@@ -52,8 +52,8 @@
<set-property name="log_ConsoleLogger" value="ENABLED" />
<set-property name="log_DivLogger" value="DISABLED" />
- <set-property name="log_GWTLogger" value="DISABLED" />
- <set-property name="log_SystemLogger" value="DISABLED" />
+ <set-property name="log_GWTLogger" value="ENABLED" />
+ <set-property name="log_SystemLogger" value="ENABLED" />
<!-- Loggers Disabled by default -->
<set-property name="log_FirebugLogger" value="DISABLED" />
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java 2010-01-26 13:42:23 UTC (rev 935)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java 2010-01-26 14:31:13 UTC (rev 936)
@@ -21,8 +21,6 @@
*/
package org.jboss.bpm.console.client;
-import org.gwt.mosaic.ui.client.Viewport;
-
/**
* Provides context information to console components and plugins.
*
@@ -30,7 +28,6 @@
*/
public interface ApplicationContext
{
- Workspace getWorkpace();
void displayMessage(String message, boolean isError);
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/BootstrapAction.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/BootstrapAction.java 2010-01-26 13:42:23 UTC (rev 935)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/BootstrapAction.java 2010-01-26 14:31:13 UTC (rev 936)
@@ -29,6 +29,7 @@
import org.jboss.bpm.console.client.common.AbstractRESTAction;
import org.jboss.bpm.console.client.model.JSOParser;
import org.jboss.bpm.console.client.model.ServerStatus;
+import org.jboss.bpm.console.client.util.ConsoleLog;
import org.jboss.errai.workspaces.client.Registry;
/**
@@ -81,9 +82,10 @@
Preferences.get(Preferences.BPM_DEFAULT_TOOL) :
appContext.getConfig().getDefaultEditor();
- Workspace workspace = appContext.getWorkpace();
+ /*Workspace workspace = appContext.getWorkpace();
if(workspace.hasEditor(defaultEditorID))
- workspace.showEditor(defaultEditorID);
+ workspace.showEditor(defaultEditorID);*/
+ ConsoleLog.warn("Preferences ignored!");
}
}
);
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-01-26 13:42:23 UTC (rev 935)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ErraiApplication.java 2010-01-26 14:31:13 UTC (rev 936)
@@ -28,7 +28,6 @@
import com.google.gwt.user.client.DeferredCommand;
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.process.UpdateDefinitionsAction;
@@ -76,14 +75,8 @@
// ------
ApplicationContext appContext = new ApplicationContext()
- {
+ {
@Override
- public Workspace getWorkpace()
- {
- throw new RuntimeException("Not implemented!");
- }
-
- @Override
public void displayMessage(String message, boolean isError)
{
throw new RuntimeException("Not implemented!");
@@ -115,7 +108,14 @@
registerGlobalViewsAndActions(mainController);
mainController.addAction("login", new LoginAction());
+ mainController.addAction(BootstrapAction.ID, new BootstrapAction());
mainController.addView("loginView", new LoginView());
+
+ // bootstrap and login
+ mainController.handleEvent(
+ new com.mvc4g.client.Event(BootstrapAction.ID, Boolean.TRUE)
+ );
+
mainController.handleEvent(new Event("login", null));
}
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-01-26 13:42:23 UTC (rev 935)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/PreferencesView.java 2010-01-26 14:31:13 UTC (rev 936)
@@ -25,6 +25,7 @@
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;
@@ -32,71 +33,82 @@
import org.gwt.mosaic.ui.client.layout.GridLayout;
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.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>
*/
-public class PreferencesView extends MosaicPanel implements ViewInterface
+@LoadTool(name = "Preferences", group = "Settings")
+public class PreferencesView implements ViewInterface, WSComponent
{
public final static String ID = PreferencesView.class.getName();
private Controller controller;
- private ApplicationContext appContext;
+ private ApplicationContext appContext;
+ MosaicPanel panel;
+
public void setController(Controller controller)
{
this.controller = controller;
}
- public PreferencesView()
+ @Override
+ public Widget getWidget()
{
- super(new BoxLayout(BoxLayout.Orientation.VERTICAL));
+ panel = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));
this.appContext = Registry.get(ApplicationContext.class);
- this.add(new HeaderLabel("User Preferences"), new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
+ panel.add(new HeaderLabel("User Preferences"), new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
MosaicPanel layout = new MosaicPanel(new GridLayout(2,1));
layout.add(
new HTML("<b>Default Tool</b><br>" +
- "Select the tool that should be loaded upon login.")
+ "Select the tool that should be loaded upon login.")
);
- final List<Workspace.EditorRef> editors = appContext.getWorkpace().getEditors();
+ final List<ToolSet> toolsets =
+ org.jboss.errai.workspaces.client.Workspace.getInstance().getToolsets();
final ListBox multiBox = new ListBox();
multiBox.setVisibleItemCount(5);
layout.add(multiBox);
// init
- String prefEditor = Preferences.get(Preferences.BPM_DEFAULT_TOOL);
- for(Workspace.EditorRef ref : editors)
+ String prefEditor = Preferences.get(Preferences.BPM_DEFAULT_TOOL);
+ for(ToolSet ts : toolsets)
{
- multiBox.addItem(ref.title);
- if(ref.id.equals(prefEditor))
+ multiBox.addItem(ts.getToolSetName());
+ if(ts.getToolSetName().equals(prefEditor))
multiBox.setItemSelected(multiBox.getItemCount()-1, true);
}
multiBox.addClickHandler(
new ClickHandler()
{
- public void onClick(ClickEvent clickEvent)
+ public void onClick(ClickEvent clickEvent)
{
String title = multiBox.getItemText(multiBox.getSelectedIndex());
- for(Workspace.EditorRef ref : editors)
+ for(ToolSet ts: toolsets)
{
- if(ref.title.equals(title))
- {
- Preferences.set(Preferences.BPM_DEFAULT_TOOL, ref.id);
+ if(ts.getToolSetName().equals(title))
+ {
+ Preferences.set(Preferences.BPM_DEFAULT_TOOL, ts.getToolSetName());
}
}
}
}
);
- this.add(layout, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
+ panel.add(layout, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
+
+ return 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-01-26 13:42:23 UTC (rev 935)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ServerStatusView.java 2010-01-26 14:31:13 UTC (rev 936)
@@ -21,19 +21,26 @@
*/
package org.jboss.bpm.console.client;
-import com.google.gwt.user.client.ui.Grid;
-import com.google.gwt.user.client.ui.Image;
+import com.google.gwt.user.client.ui.*;
import com.mvc4g.client.Controller;
import com.mvc4g.client.ViewInterface;
+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.MosaicPanel;
+import org.jboss.bpm.console.client.common.HeaderLabel;
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.workspaces.client.Registry;
+import org.jboss.errai.workspaces.client.framework.annotations.LoadTool;
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-public class ServerStatusView extends MosaicPanel
- implements ViewInterface, LazyPanel
+@LoadTool(name = "System", group = "Settings")
+public class ServerStatusView
+ implements ViewInterface, LazyPanel, WSComponent
{
public final static String ID = ServerStatusView.class.getName();
@@ -44,13 +51,53 @@
private boolean initialized;
- public ServerStatusView(ApplicationContext appContext)
+ MosaicPanel layoutPanel;
+ MosaicPanel pluginPanel;
+
+ public ServerStatusView()
{
- super();
- setPadding(0);
- this.appContext = appContext;
+ appContext = Registry.get(ApplicationContext.class);
+ controller = Registry.get(Controller.class);
}
+ @Override
+ public Widget getWidget()
+ {
+ layoutPanel = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));
+
+ // console info
+ HeaderLabel console = new HeaderLabel("Console Info");
+ layoutPanel.add(console, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
+
+ MosaicPanel layout1 = new MosaicPanel(new GridLayout(2,1));
+ layout1.add(new HTML("Version:"));
+ layout1.add(new HTML(Version.VERSION));
+
+ layoutPanel.add(layout1, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
+
+ // server info
+ HeaderLabel server = new HeaderLabel("Server Info");
+ layoutPanel.add(server, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
+
+ MosaicPanel layout2 = new MosaicPanel(new GridLayout(2,2));
+ layout2.add(new HTML("Host:"));
+ layout2.add(new HTML(Registry.get(ApplicationContext.class).getConfig().getConsoleServerUrl()));
+
+ pluginPanel = new MosaicPanel();
+ layout2.add(new Label("Plugins:"));
+ layout2.add(pluginPanel);
+
+ layoutPanel.add(layout2, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
+
+ // ---
+
+ controller.addView(ServerStatusView.ID, this);
+
+ update(ServerPlugins.getStatus());
+
+ return layoutPanel;
+ }
+
public void setController(Controller controller)
{
this.controller = controller;
@@ -66,18 +113,18 @@
{
if(!initialized)
{
- update(ServerPlugins.getStatus());
+ update(ServerPlugins.getStatus());
initialized = true;
}
}
private void update(ServerStatus status)
{
- this.clear();
+ pluginPanel.clear();
Grid g = new Grid(status.getPlugins().size(), 2);
- g.setWidth("100%");
-
+ g.setWidth("100%");
+
for (int row = 0; row < status.getPlugins().size(); ++row)
{
PluginInfo p = status.getPlugins().get(row);
@@ -86,18 +133,18 @@
);
g.setText(row, 0, type);
-
+
final Image img = p.isAvailable() ?
new Image("images/icons/confirm_small.png"):
new Image("images/icons/deny_small.png");
-
+
g.setWidget(row, 1, img );
}
- this.add(g);
-
- invalidate();
-
+ pluginPanel.add(g);
+
+ pluginPanel.layout();
+
}
}
Deleted: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/SettingsEditor.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/SettingsEditor.java 2010-01-26 13:42:23 UTC (rev 935)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/SettingsEditor.java 2010-01-26 14:31:13 UTC (rev 936)
@@ -1,153 +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.google.gwt.core.client.GWT;
-import com.google.gwt.user.client.ui.AbstractImagePrototype;
-import com.google.gwt.user.client.ui.HTML;
-import com.google.gwt.user.client.ui.Label;
-import org.gwt.mosaic.ui.client.DeckLayoutPanel;
-import org.gwt.mosaic.ui.client.DecoratedTabLayoutPanel;
-import org.gwt.mosaic.ui.client.TabLayoutPanel;
-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.MosaicPanel;
-import org.jboss.bpm.console.client.common.HeaderLabel;
-import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
-import org.jboss.errai.workspaces.client.Registry;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class SettingsEditor extends Editor
-{
-
- public final static String ID = SettingsEditor.class.getName();
-
- private TabLayoutPanel tabPanel;
-
- private DeckLayoutPanel deck;
-
- public void initialize()
- {
- if(!isInitialized())
- {
-
- tabPanel = new DecoratedTabLayoutPanel();
- tabPanel.setPadding(5);
-
- deck = new DeckLayoutPanel();
-
- deck.add( createSystemPanel());
- deck.add( createPrefPanel());
-
- tabPanel.add(deck, "Settings");
-
- this.add(tabPanel);
-
- Registry.get(ApplicationContext.class).refreshView();
-
- isInitialized = true;
- }
-
- }
-
- public void showView(String viewId)
- {
- if(viewId==null || viewId.equals("system"))
- deck.showWidget(0);
- else if(viewId.equals("preferences"))
- deck.showWidget(1);
- else
- throw new IllegalArgumentException("Unknown viewId: "+viewId);
-
- layout();
- }
-
- private MosaicPanel createPrefPanel()
- {
- PreferencesView prefView = new PreferencesView();
- controller.addView(PreferencesView.ID, prefView);
-
- return prefView;
- }
-
- private MosaicPanel createSystemPanel()
- {
-
- MosaicPanel layoutPanel = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));
-
- // console info
- HeaderLabel console = new HeaderLabel("Console Info");
- layoutPanel.add(console, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
-
- MosaicPanel layout1 = new MosaicPanel(new GridLayout(2,1));
- layout1.add(new HTML("Version:"));
- layout1.add(new HTML(Version.VERSION));
-
- layoutPanel.add(layout1, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
-
- // server info
- HeaderLabel server = new HeaderLabel("Server Info");
- layoutPanel.add(server, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
-
- ServerStatusView serverStatus = new ServerStatusView(Registry.get(ApplicationContext.class));
- serverStatus.initialize();
-
- MosaicPanel layout2 = new MosaicPanel(new GridLayout(2,2));
- layout2.add(new HTML("Host:"));
- layout2.add(new HTML(Registry.get(ApplicationContext.class).getConfig().getConsoleServerUrl()));
-
- layout2.add(new Label("Plugins:"));
- layout2.add(serverStatus);
-
- layoutPanel.add(layout2, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
-
- // view and actions
- super.controller.addView(ServerStatusView.ID, serverStatus);
-
- return layoutPanel;
- }
-
- public String getEditorId()
- {
- return ID;
- }
-
- public String getTitle()
- {
- return "Settings";
- }
-
- public MenuSection provideMenuSection()
- {
- ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
-
- return new MenuSection(
- getTitle(),
- AbstractImagePrototype.create(icons.settingsIcon()),
- new SettingsEditorNavigation(Registry.get(ApplicationContext.class))
- );
-
- }
-}
Deleted: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/SettingsEditorNavigation.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/SettingsEditorNavigation.java 2010-01-26 13:42:23 UTC (rev 935)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/SettingsEditorNavigation.java 2010-01-26 14:31:13 UTC (rev 936)
@@ -1,66 +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.google.gwt.user.client.ui.Tree;
-import com.google.gwt.user.client.ui.TreeItem;
-import com.google.gwt.user.client.ui.TreeListener;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-class SettingsEditorNavigation extends Tree
-{
-
- public SettingsEditorNavigation(final ApplicationContext appContext)
- {
- super.setTitle("Settings");
-
- TreeItem prefs = addItem("Preferences");
-
- TreeItem root = addItem("System");
-
- addTreeListener(
- new TreeListener()
- {
- public void onTreeItemSelected(TreeItem treeItem)
- {
- if("System".equals(treeItem.getText()))
- {
- Workspace workspace = appContext.getWorkpace();
- workspace.showEditor(SettingsEditor.ID, "system");
- }
- else if("Preferences".equals(treeItem.getText()))
- {
- Workspace workspace = appContext.getWorkpace();
- workspace.showEditor(SettingsEditor.ID, "preferences");
- }
- }
-
- public void onTreeItemStateChanged(TreeItem treeItem)
- {
-
- }
- }
- );
- }
-}
Deleted: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/EngineEditor.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/EngineEditor.java 2010-01-26 13:42:23 UTC (rev 935)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/EngineEditor.java 2010-01-26 14:31:13 UTC (rev 936)
@@ -1,96 +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.engine;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.user.client.ui.AbstractImagePrototype;
-import org.gwt.mosaic.ui.client.MessageBox;
-import org.gwt.mosaic.ui.client.TabLayoutPanel;
-import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.Editor;
-import org.jboss.bpm.console.client.MenuSection;
-import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
-import org.jboss.errai.workspaces.client.EditorWidget;
-import org.jboss.errai.workspaces.client.EditorWidgetClient;
-import org.jboss.errai.workspaces.client.Registry;
-
-/**
- * Manage runtime aspects of a process engine
- * (currently jbpm only).
- *
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-@Deprecated
-public class EngineEditor extends Editor
-{
- public final static String ID = EngineEditor.class.getName();
-
- private TabLayoutPanel tabPanel;
-
- //private Map<String,Integer> view2index = new HashMap<String,Integer>();
-
- public void initialize()
- {
- if(!isInitialized)
- {
- EngineEditorModule.createAsync(
- new EditorWidgetClient()
- {
- public void onSuccess(EditorWidget editorWidget)
- {
- tabPanel = (TabLayoutPanel)editorWidget.build();
- EngineEditor.this.add(tabPanel);
- editorWidget.loadData();
- Registry.get(ApplicationContext.class).refreshView();
- isInitialized = true;
- }
-
- public void onUnavailable()
- {
- MessageBox.error("Error", "Failed to load module "+ID);
- }
- }
- );
- }
- }
-
- public String getEditorId()
- {
- return ID;
- }
-
- public String getTitle()
- {
- return "Runtime";
- }
-
- public MenuSection provideMenuSection()
- {
- ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
-
- return new MenuSection(
- getTitle(),
- AbstractImagePrototype.create(icons.runtimeIcon()),
- new EngineEditorNavigation(Registry.get(ApplicationContext.class))
- );
- }
-}
Deleted: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/EngineEditorModule.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/EngineEditorModule.java 2010-01-26 13:42:23 UTC (rev 935)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/EngineEditorModule.java 2010-01-26 14:31:13 UTC (rev 936)
@@ -1,161 +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.engine;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.core.client.RunAsyncCallback;
-import com.google.gwt.user.client.Timer;
-import com.google.gwt.user.client.ui.SourcesTabEvents;
-import com.google.gwt.user.client.ui.TabListener;
-import com.google.gwt.user.client.ui.Widget;
-import com.mvc4g.client.Controller;
-import com.mvc4g.client.Event;
-import org.gwt.mosaic.ui.client.DecoratedTabLayoutPanel;
-import org.gwt.mosaic.ui.client.TabLayoutPanel;
-import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.LazyPanel;
-import org.jboss.bpm.console.client.common.AbstractView;
-import org.jboss.errai.workspaces.client.EditorWidget;
-import org.jboss.errai.workspaces.client.EditorWidgetClient;
-import org.jboss.errai.workspaces.client.Registry;
-
-@Deprecated
-public class EngineEditorModule
-{
-
- private static TabLayoutPanel tabPanel;
-
- //private Map<String,Integer> view2index = new HashMap<String,Integer>();
-
- public static void createAsync(
- final EditorWidgetClient client)
- {
- GWT.runAsync(new RunAsyncCallback() {
- public void onFailure(Throwable err) {
- client.onUnavailable();
- }
-
- public void onSuccess() {
-
- final Controller controller = Registry.get(Controller.class);
-
- if (tabPanel == null)
- tabPanel = createTabPanel(controller);
-
- client.onSuccess(
- new EditorWidget()
- {
- public Widget build()
- {
- return tabPanel;
- }
-
- public void loadData()
- {
- Timer t = new Timer()
- {
- @Override
- public void run()
- {
- controller.handleEvent(
- new Event(UpdateDeploymentsAction.ID, null)
- );
- }
- };
-
- t.schedule(50);
- }
- }
- );
- }
- });
- }
-
- private static TabLayoutPanel createTabPanel(final Controller controller)
- {
-
- final ApplicationContext appContext = Registry.get(ApplicationContext.class);
-
- // create inner tab layout
- final TabLayoutPanel tabPanel = new DecoratedTabLayoutPanel();
- tabPanel.setPadding(5);
-
- tabPanel.addTabListener(
- new TabListener()
- {
- public boolean onBeforeTabSelected(SourcesTabEvents sourcesTabEvents, int i)
- {
- boolean showTab = true;
- return showTab;
- }
-
- public void onTabSelected(SourcesTabEvents sourcesTabEvents, int i)
- {
- LazyPanel lazyPanel = (LazyPanel) tabPanel.getWidget(i);
- if(!lazyPanel.isInitialized())
- {
- lazyPanel.initialize();
- appContext.refreshView(); // TODO: hack around rendering problems
- }
-
- // load jobs
- if(1==i)
- {
- controller.handleEvent(
- new Event(UpdateJobsAction.ID, null)
- );
- }
- }
- }
- );
-
- // create and register views
- //registerView(controller, tabPanel, DeploymentListView.ID, new DeploymentListView());
- //registerView(controller, tabPanel, JobListView.ID, new JobListView(appContext));
-
- // create and register actions
- controller.addAction(UpdateDeploymentsAction.ID, new UpdateDeploymentsAction());
- controller.addAction(UpdateDeploymentDetailAction.ID, new UpdateDeploymentDetailAction());
- controller.addAction(DeleteDeploymentAction.ID, new DeleteDeploymentAction());
- controller.addAction(SuspendDeploymentAction.ID, new SuspendDeploymentAction());
- controller.addAction(ResumeDeploymentAction.ID, new ResumeDeploymentAction());
- controller.addAction(ExecuteJobAction.ID, new ExecuteJobAction());
-
- // display tab, needs to visible for correct rendering
- //tabPanel.selectTab( view2index.get(DeploymentListView.ID ));
-
- tabPanel.selectTab(0);
-
- return tabPanel;
- }
-
- private static void registerView(Controller controller, TabLayoutPanel tabPanel, String id, AbstractView view)
- {
- //view2index.put(id, tabPanel.getWidgetCount());
-
- // register view with controller
- controller.addView(id, view);
-
- // add to tab layout
- tabPanel.add(view, view.getIconTitle(), true);
- }
-}
Deleted: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/EngineEditorNavigation.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/EngineEditorNavigation.java 2010-01-26 13:42:23 UTC (rev 935)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/EngineEditorNavigation.java 2010-01-26 14:31:13 UTC (rev 936)
@@ -1,68 +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.engine;
-
-import com.google.gwt.user.client.ui.Tree;
-import com.google.gwt.user.client.ui.TreeItem;
-import com.google.gwt.user.client.ui.TreeListener;
-import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.Workspace;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-@Deprecated
-public class EngineEditorNavigation extends Tree
-{
-
- public EngineEditorNavigation(final ApplicationContext appContext)
- {
- super.setTitle("Deployments");
-
- TreeItem jbpmDeployments = addItem("Deployments");
- TreeItem jobs = addItem("Jobs");
-
- addTreeListener(
- new TreeListener()
- {
- public void onTreeItemSelected(TreeItem treeItem)
- {
- Workspace workspace = appContext.getWorkpace();
-
- if("Deployments".equals(treeItem.getText()))
- {
- workspace.showEditor(EngineEditor.ID, null);
- }
- else if("Jobs".equals(treeItem.getText()))
- {
- workspace.showEditor(EngineEditor.ID, null);
- }
- }
-
- public void onTreeItemStateChanged(TreeItem treeItem)
- {
-
- }
- }
- );
- }
-}
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/ViewDeploymentAction.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/ViewDeploymentAction.java 2010-01-26 13:42:23 UTC (rev 935)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/ViewDeploymentAction.java 2010-01-26 14:31:13 UTC (rev 936)
@@ -23,9 +23,7 @@
import com.mvc4g.client.ActionInterface;
import com.mvc4g.client.Controller;
-import com.mvc4g.client.Event;
import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.Workspace;
import org.jboss.errai.workspaces.client.Registry;
/**
@@ -49,12 +47,13 @@
{
String dplId = (String)object;
- Workspace workspace = appContext.getWorkpace();
+ throw new RuntimeException("Not implemented");
+ /*Workspace workspace = appContext.getWorkpace();
if(workspace.hasEditor(EngineEditor.ID))
workspace.showEditor(EngineEditor.ID);
controller.handleEvent(
new Event(UpdateDeploymentsAction.ID, dplId)
- );
+ );*/
}
}
Deleted: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java 2010-01-26 13:42:23 UTC (rev 935)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java 2010-01-26 14:31:13 UTC (rev 936)
@@ -1,65 +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.process;
-
-import com.google.gwt.user.client.ui.Widget;
-import org.gwt.mosaic.ui.client.MessageBox;
-import org.gwt.mosaic.ui.client.TabLayoutPanel;
-import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.errai.common.client.framework.WSComponent;
-import org.jboss.errai.workspaces.client.EditorWidget;
-import org.jboss.errai.workspaces.client.EditorWidgetClient;
-import org.jboss.errai.workspaces.client.Registry;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-@Deprecated
-public class ProcessEditor implements WSComponent
-{
- public final static String ID = ProcessEditor.class.getName();
-
- private static TabLayoutPanel tabPanel;
-
- public Widget getWidget()
- {
- ProcessEditorModule.createAsync(
- new EditorWidgetClient()
- {
- public void onSuccess(EditorWidget editorWidget)
- {
- tabPanel = (TabLayoutPanel)editorWidget.build();
- editorWidget.loadData();
- Registry.get(ApplicationContext.class).refreshView();
- }
-
- public void onUnavailable()
- {
- MessageBox.error("Error", "Failed to load module "+ID);
- }
- }
- );
-
- return tabPanel;
- }
-}
-
Deleted: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditorModule.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditorModule.java 2010-01-26 13:42:23 UTC (rev 935)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditorModule.java 2010-01-26 14:31:13 UTC (rev 936)
@@ -1,174 +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.process;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.core.client.RunAsyncCallback;
-import com.google.gwt.user.client.Timer;
-import com.google.gwt.user.client.ui.SourcesTabEvents;
-import com.google.gwt.user.client.ui.TabListener;
-import com.google.gwt.user.client.ui.Widget;
-import com.mvc4g.client.ActionInterface;
-import com.mvc4g.client.Controller;
-import com.mvc4g.client.Event;
-import org.gwt.mosaic.ui.client.DecoratedTabLayoutPanel;
-import org.gwt.mosaic.ui.client.MessageBox;
-import org.gwt.mosaic.ui.client.TabLayoutPanel;
-import org.jboss.bpm.console.client.LazyPanel;
-import org.jboss.bpm.console.client.common.AbstractView;
-import org.jboss.errai.workspaces.client.EditorWidget;
-import org.jboss.errai.workspaces.client.EditorWidgetClient;
-import org.jboss.errai.workspaces.client.Registry;
-
-@Deprecated
-public class ProcessEditorModule
-{
- // the module instance; instantiate it behind a runAsync
- private static TabLayoutPanel tabPanel;
-
- /**
- * Access the module's instance. The callback
- * runs asynchronously, once the necessary
- * code has downloaded.
- */
- public static void createAsync(
- final EditorWidgetClient client)
- {
- GWT.runAsync(new RunAsyncCallback() {
- public void onFailure(Throwable err) {
- client.onUnavailable();
- }
-
- public void onSuccess() {
-
- final Controller controller = Registry.get(Controller.class);
-
- if (tabPanel == null) {
- tabPanel = createTabPanel(controller);
- }
- client.onSuccess(
- new EditorWidget()
- {
- public Widget build()
- {
- return tabPanel;
- }
-
- public void loadData()
- {
- Timer t = new Timer()
- {
- @Override
- public void run()
- {
- controller.handleEvent(
- new Event(UpdateDefinitionsAction.ID, null)
- );
- }
- };
-
- t.schedule(50);
- }
- }
- );
- }
- });
- }
-
- public static Widget createSync()
- {
- final Controller controller = Registry.get(Controller.class);
- return createTabPanel(controller);
- }
-
- private static TabLayoutPanel createTabPanel(final Controller controller)
- {
- // create inner tab layout
- final TabLayoutPanel tabPanel = new DecoratedTabLayoutPanel();
- tabPanel.setPadding(5);
- tabPanel.addTabListener(
- new TabListener()
- {
- public boolean onBeforeTabSelected(SourcesTabEvents sourcesTabEvents, int i)
- {
- boolean showTab = true;
-
- if(i!=0)
- {
- DefinitionListView view = ((DefinitionListView) controller.getView(DefinitionListView.ID));
- boolean hasSelection = view.getSelection() != null;
- if(!hasSelection)
- {
- MessageBox.alert("Missing selection", "Please select a process");
- showTab=false;
- }
- }
-
- if(showTab)
- {
- LazyPanel lazyPanel = (LazyPanel) tabPanel.getWidget(i);
- lazyPanel.initialize();
- }
-
- return showTab;
- }
-
- public void onTabSelected(SourcesTabEvents sourcesTabEvents, int i)
- {
-
- }
- }
- );
-
- // create and register views
- //registerView(controller, tabPanel, DefinitionListView.ID, new DefinitionListView());
- //registerView(controller, tabPanel, InstanceListView.ID, new InstanceListView());
-
- // create and register actions
-
- registerAction(controller, UpdateInstancesAction.ID, new UpdateInstancesAction());
- registerAction(controller, StartNewInstanceAction.ID, new StartNewInstanceAction());
- registerAction(controller, StateChangeAction.ID, new StateChangeAction());
- registerAction(controller, DeleteDefinitionAction.ID, new DeleteDefinitionAction());
- registerAction(controller, DeleteInstanceAction.ID, new DeleteInstanceAction());
-
- // display tab, needs to visible for correct rendering
- tabPanel.selectTab(0);
-
- return tabPanel;
-
- }
-
- private static void registerView(Controller controller, TabLayoutPanel tabPanel, String id, AbstractView view)
- {
- // register view with controller
- controller.addView(id, view);
-
- // add to tab layout
- tabPanel.add(view, view.getIconTitle(), true);
- }
-
- private static void registerAction(Controller controller, String name, ActionInterface action)
- {
- controller.addAction(name, action);
- }
-}
Deleted: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditorNavigation.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditorNavigation.java 2010-01-26 13:42:23 UTC (rev 935)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditorNavigation.java 2010-01-26 14:31:13 UTC (rev 936)
@@ -1,63 +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.process;
-
-import com.google.gwt.user.client.ui.Tree;
-import com.google.gwt.user.client.ui.TreeItem;
-import com.google.gwt.user.client.ui.TreeListener;
-import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.Workspace;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-@Deprecated
-class ProcessEditorNavigation extends Tree
-{
-
- public ProcessEditorNavigation(final ApplicationContext appContext)
- {
- super.setTitle("Processes");
-
- TreeItem root = addItem("Process Definitions");
-
-
- addTreeListener(
- new TreeListener()
- {
- public void onTreeItemSelected(TreeItem treeItem)
- {
- if("Process Definitions".equals(treeItem.getText()))
- {
- Workspace workspace = appContext.getWorkpace();
- workspace.showEditor(ProcessEditor.ID);
- }
- }
-
- public void onTreeItemStateChanged(TreeItem treeItem)
- {
-
- }
- }
- );
- }
-}
Deleted: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java 2010-01-26 13:42:23 UTC (rev 935)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java 2010-01-26 14:31:13 UTC (rev 936)
@@ -1,138 +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.report;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.user.client.DOM;
-import com.google.gwt.user.client.ui.*;
-import org.gwt.mosaic.ui.client.Caption;
-import org.gwt.mosaic.ui.client.ImageButton;
-import org.gwt.mosaic.ui.client.MessageBox;
-import org.gwt.mosaic.ui.client.TabLayoutPanel;
-import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.Editor;
-import org.jboss.bpm.console.client.MenuSection;
-import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
-import org.jboss.errai.workspaces.client.EditorWidget;
-import org.jboss.errai.workspaces.client.EditorWidgetClient;
-import org.jboss.errai.workspaces.client.Registry;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-@Deprecated
-public class ReportEditor extends Editor
-{
- public final static String ID = ReportEditor.class.getName();
-
- private TabLayoutPanel tabPanel;
-
- public void initialize()
- {
- if(!isInitialized())
- {
- ReportEditorModule.createAsync(
- new EditorWidgetClient()
- {
- public void onSuccess(EditorWidget editorWidget)
- {
- tabPanel = (TabLayoutPanel)editorWidget.build();
- ReportEditor.this.add(tabPanel);
- editorWidget.loadData();
- Registry.get(ApplicationContext.class).refreshView();
- isInitialized = true;
- }
-
- public void onUnavailable()
- {
- MessageBox.error("Error", "Failed to load module "+ID);
- }
- }
- );
- }
- }
-
- public String getEditorId()
- {
- return ID;
- }
-
- public String getTitle()
- {
- return "Reporting";
- }
-
- public MenuSection provideMenuSection()
- {
- ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
-
- return new MenuSection(
- getTitle(),
- AbstractImagePrototype.create(icons.reportIcon()),
- new ReportEditorNavigation(Registry.get(ApplicationContext.class))
- );
- }
-
- public void displayReport(String title, String dispatchUrl)
- {
- boolean match = false;
- for(int i=1; i<tabPanel.getWidgetCount(); i++)
- {
- ReportFrame openTab = (ReportFrame)tabPanel.getWidget(i);
- if(openTab.getUrl().equals(dispatchUrl))
- {
- tabPanel.selectTab(i);
- match=true;
- break;
- }
- }
-
- if(!match)
- {
- ReportFrame reportFrame = new ReportFrame(dispatchUrl);
- tabPanel.add(reportFrame, newLabel(reportFrame, title, tabPanel.getWidgetCount()));
- tabPanel.selectTab(tabPanel.getWidgetCount()-1);
-
- }
- }
-
- private Widget newLabel(final Widget widget, final String string,
- final int index) {
- final HorizontalPanel hPanel = new HorizontalPanel();
- final HTML label = new HTML(string);
- DOM.setStyleAttribute(label.getElement(), "whiteSpace", "nowrap");
- ImageButton closeBtn = new ImageButton(Caption.IMAGES.windowClose());
- closeBtn.addClickListener(new ClickListener() {
- public void onClick(Widget sender) {
- int widgetIndex = tabPanel.getWidgetIndex(widget);
- if (widgetIndex == tabPanel.getSelectedTab()) {
- tabPanel.selectTab(widgetIndex - 1);
- }
- tabPanel.remove(widgetIndex);
- }
- });
- hPanel.add(label);
- hPanel.add(new HTML("   "));
- hPanel.add(closeBtn);
- return hPanel;
- }
-}
Deleted: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditorModule.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditorModule.java 2010-01-26 13:42:23 UTC (rev 935)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditorModule.java 2010-01-26 14:31:13 UTC (rev 936)
@@ -1,153 +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.report;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.core.client.RunAsyncCallback;
-import com.google.gwt.user.client.Timer;
-import com.google.gwt.user.client.ui.SourcesTabEvents;
-import com.google.gwt.user.client.ui.TabListener;
-import com.google.gwt.user.client.ui.Widget;
-import com.mvc4g.client.Controller;
-import com.mvc4g.client.Event;
-import org.gwt.mosaic.ui.client.DecoratedTabLayoutPanel;
-import org.gwt.mosaic.ui.client.TabLayoutPanel;
-import org.jboss.bpm.console.client.LazyPanel;
-import org.jboss.bpm.console.client.common.AbstractView;
-import org.jboss.errai.workspaces.client.EditorWidget;
-import org.jboss.errai.workspaces.client.EditorWidgetClient;
-import org.jboss.errai.workspaces.client.Registry;
-
-@Deprecated
-public class ReportEditorModule
-{
- public final static String ID = ReportEditor.class.getName();
-
- private static TabLayoutPanel tabPanel;
-
- public static void createAsync(
- final EditorWidgetClient client)
- {
- GWT.runAsync(new RunAsyncCallback() {
- public void onFailure(Throwable err) {
- client.onUnavailable();
- }
-
- public void onSuccess() {
-
- final Controller controller = Registry.get(Controller.class);
-
- if (tabPanel == null)
- tabPanel = createTabPanel(controller);
-
- client.onSuccess(
- new EditorWidget()
- {
- public Widget build()
- {
- return tabPanel;
- }
-
- public void loadData()
- {
- Timer t = new Timer()
- {
- @Override
- public void run()
- {
- controller.handleEvent(new Event(UpdateReportConfigAction.ID, null));
- }
- };
-
- t.schedule(50);
- }
- }
- );
- }
- });
- }
-
- private static TabLayoutPanel createTabPanel(final Controller controller)
- {
- final TabLayoutPanel tabPanel = new DecoratedTabLayoutPanel();
- tabPanel.setPadding(5);
- tabPanel.addTabListener(
- new TabListener()
- {
- public boolean onBeforeTabSelected(SourcesTabEvents sourcesTabEvents, int i)
- {
- boolean showTab = true;
-
- if(i!=0)
- {
- /*DefinitionListView view = ((DefinitionListView) controller.getView(DefinitionListView.ID));
- boolean hasSelection = view.getSelection() != null;
- if(!hasSelection)
- {
- MessageBox.alert("Missing selection", "Please select a process");
- showTab=false;
- } */
- }
-
- return showTab;
- }
-
- public void onTabSelected(SourcesTabEvents sourcesTabEvents, int i)
- {
- LazyPanel lazyPanel = (LazyPanel) tabPanel.getWidget(i);
- if(!lazyPanel.isInitialized())
- {
- lazyPanel.initialize();
- }
- }
- }
- );
-
- // create and register views
- ReportView view = new ReportView();
- //registerView(controller, tabPanel, ReportView.ID, view);
- view.initialize();
-
- //controller.addView(ID, this);
-
- // create and register actions
- controller.addAction(UpdateReportConfigAction.ID, new UpdateReportConfigAction());
-
- // display tab, needs to visible for correct rendering
- tabPanel.selectTab(0);
-
- // load report config
- controller.handleEvent(new Event(UpdateReportConfigAction.ID, null));
-
-
- return tabPanel;
- }
-
- private static void registerView(Controller controller, TabLayoutPanel tabPanel, String id, AbstractView view)
- {
- // register view with controller
- controller.addView(id, view);
-
- // add to tab layout
- tabPanel.add(view, view.getIconTitle(), true);
- }
-}
Deleted: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditorNavigation.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditorNavigation.java 2010-01-26 13:42:23 UTC (rev 935)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditorNavigation.java 2010-01-26 14:31:13 UTC (rev 936)
@@ -1,61 +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.report;
-
-import com.google.gwt.user.client.ui.Tree;
-import com.google.gwt.user.client.ui.TreeItem;
-import com.google.gwt.user.client.ui.TreeListener;
-import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.Workspace;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-@Deprecated
-class ReportEditorNavigation extends Tree
-{
- public ReportEditorNavigation(final ApplicationContext appContext)
- {
- super.setTitle("Reporting");
-
- TreeItem definitions = addItem("Process History");
-
- addTreeListener(
- new TreeListener()
- {
- public void onTreeItemSelected(TreeItem treeItem)
- {
- if("Process History".equals(treeItem.getText()))
- {
- Workspace workspace = appContext.getWorkpace();
- workspace.showEditor(ReportEditor.ID);
- }
- }
-
- public void onTreeItemStateChanged(TreeItem treeItem)
- {
-
- }
- }
- );
- }
-}
Deleted: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditor.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditor.java 2010-01-26 13:42:23 UTC (rev 935)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditor.java 2010-01-26 14:31:13 UTC (rev 936)
@@ -1,103 +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.task;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.user.client.ui.AbstractImagePrototype;
-import org.gwt.mosaic.ui.client.MessageBox;
-import org.gwt.mosaic.ui.client.TabLayoutPanel;
-import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.Editor;
-import org.jboss.bpm.console.client.MenuSection;
-import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
-import org.jboss.errai.workspaces.client.EditorWidget;
-import org.jboss.errai.workspaces.client.EditorWidgetClient;
-import org.jboss.errai.workspaces.client.Registry;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-@Deprecated
-public class TaskEditor extends Editor
-{
- public final static String ID = TaskEditor.class.getName();
-
- private TabLayoutPanel tabPanel;
-
- public void initialize()
- {
- if(!isInitialized)
- {
- TaskEditorModule.createAsync(
- new EditorWidgetClient()
- {
- public void onSuccess(EditorWidget editorWidget)
- {
- tabPanel = (TabLayoutPanel)editorWidget.build();
- TaskEditor.this.add(tabPanel);
- editorWidget.loadData();
- Registry.get(ApplicationContext.class).refreshView();
- isInitialized = true;
- }
-
- public void onUnavailable()
- {
- MessageBox.error("Error", "Failed to load module "+ID);
- }
- }
- );
- }
- }
-
- public String getEditorId()
- {
- return ID;
- }
-
- public String getTitle()
- {
- return "Tasks";
- }
-
- public MenuSection provideMenuSection()
- {
- ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
-
- return new MenuSection(
- getTitle(),
- AbstractImagePrototype.create(icons.taskIcon()),
- new TaskEditorNavigation(Registry.get(ApplicationContext.class))
- );
- }
-
- /*public void showView(String viewId)
- {
- if(viewId==null || viewId.equals("group"))
- tabPanel.selectTab(0);
- else if(viewId.equals("personal"))
- tabPanel.selectTab(1);
- else
- throw new IllegalArgumentException("Unknown viewId: "+viewId);
-
- layout();
- } */
-}
Deleted: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditorModule.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditorModule.java 2010-01-26 13:42:23 UTC (rev 935)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditorModule.java 2010-01-26 14:31:13 UTC (rev 936)
@@ -1,154 +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.task;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.core.client.RunAsyncCallback;
-import com.google.gwt.user.client.Timer;
-import com.google.gwt.user.client.ui.SourcesTabEvents;
-import com.google.gwt.user.client.ui.TabListener;
-import com.google.gwt.user.client.ui.Widget;
-import com.mvc4g.client.Controller;
-import com.mvc4g.client.Event;
-import org.gwt.mosaic.ui.client.DecoratedTabLayoutPanel;
-import org.gwt.mosaic.ui.client.TabLayoutPanel;
-import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.LazyPanel;
-import org.jboss.bpm.console.client.common.AbstractView;
-import org.jboss.errai.workspaces.client.EditorWidget;
-import org.jboss.errai.workspaces.client.EditorWidgetClient;
-import org.jboss.errai.workspaces.client.Registry;
-
-@Deprecated
-public class TaskEditorModule
-{
-
- private static TabLayoutPanel tabPanel;
-
- public static void createAsync(
- final EditorWidgetClient client)
- {
- GWT.runAsync(new RunAsyncCallback() {
- public void onFailure(Throwable err) {
- client.onUnavailable();
- }
-
- public void onSuccess() {
-
- final Controller controller = Registry.get(Controller.class);
-
- if (tabPanel == null)
- tabPanel = createTabPanel(controller);
-
- client.onSuccess(
- new EditorWidget()
- {
- public Widget build()
- {
- return tabPanel;
- }
-
- public void loadData()
- {
- Timer t = new Timer()
- {
- @Override
- public void run()
- {
- controller.handleEvent(
- new Event(ReloadAllTaskListsAction.ID, null)
- );
- }
- };
-
- t.schedule(50);
- }
- }
- );
- }
- });
- }
-
- private static TabLayoutPanel createTabPanel(Controller controller)
- {
- // create inner tab layout
- final ApplicationContext appContext= Registry.get(ApplicationContext.class);
-
- final TabLayoutPanel tabPanel = new DecoratedTabLayoutPanel();
- tabPanel.setPadding(5);
- tabPanel.addTabListener(
- new TabListener()
- {
- public boolean onBeforeTabSelected(SourcesTabEvents sourcesTabEvents, int i)
- {
- return true;
- }
-
- public void onTabSelected(SourcesTabEvents sourcesTabEvents, int i)
- {
- LazyPanel lazyPanel = (LazyPanel) tabPanel.getWidget(i);
- if(!lazyPanel.isInitialized())
- {
- lazyPanel.initialize();
- appContext.refreshView(); // TODO: hack around rendering problems
- }
- }
- }
- );
-
- TaskDetailView openDetailView = new TaskDetailView(true);
- TaskDetailView assignedDetailView = new TaskDetailView(false);
-
- // create and register views
- controller.addView("OpenDetailView", openDetailView);
- controller.addView("AssignedDetailView", assignedDetailView);
-
- openDetailView.initialize();
- assignedDetailView.initialize();
-
- //registerView(controller, tabPanel, OpenTasksView.ID, new OpenTasksView(appContext, openDetailView));
- //registerView(controller, tabPanel, AssignedTasksView.ID, new AssignedTasksView(appContext, assignedDetailView));
-
- // 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());
-
- // display tab, needs to visible for correct rendering
- tabPanel.selectTab(0);
-
- return tabPanel;
- }
-
- private static void registerView(Controller controller, TabLayoutPanel tabPanel, String id, AbstractView view)
- {
- // register view with controller
- controller.addView(id, view);
-
- // add to tab layout
- tabPanel.add(view, view.getIconTitle(), true);
- }
-}
Deleted: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditorNavigation.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditorNavigation.java 2010-01-26 13:42:23 UTC (rev 935)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditorNavigation.java 2010-01-26 14:31:13 UTC (rev 936)
@@ -1,76 +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.task;
-
-import com.google.gwt.user.client.ui.Tree;
-import com.google.gwt.user.client.ui.TreeItem;
-import com.google.gwt.user.client.ui.TreeListener;
-import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.Workspace;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-@Deprecated
-class TaskEditorNavigation extends Tree
-{
- public TaskEditorNavigation(final ApplicationContext appContext)
- {
- super.setTitle("Tasks");
-
- addItem("Group Tasks");
- addItem("Personal Tasks");
-
- addTreeListener(
- new TreeListener()
- {
- public void onTreeItemSelected(TreeItem treeItem)
- {
- Workspace workspace = appContext.getWorkpace();
-
- if("Group Tasks".equals(treeItem.getText()))
- {
- workspace.showEditor(TaskEditor.ID, null);
- }
- else if("Personal Tasks".equals(treeItem.getText()))
- {
- workspace.showEditor(TaskEditor.ID, null);
- }
- }
-
- public void onTreeItemStateChanged(TreeItem treeItem)
- {
-
- }
- }
- );
- }
-
- /*public void add(String string)
- {
- ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
- MosaicPanel p = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.HORIZONTAL));
- p.add(icons.arrowIcon().createImage());
- p.add(new Label(string));
- super.add(p);
- } */
-}
16 years, 6 months
Overlord SVN: r935 - bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2010-01-26 08:42:23 -0500 (Tue, 26 Jan 2010)
New Revision: 935
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/EngineEditor.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/EngineEditorModule.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/EngineEditorNavigation.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/JobListView.java
Log:
Migrate EngineEditor components to new workspace API
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-01-26 13:11:02 UTC (rev 934)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentListView.java 2010-01-26 13:42:23 UTC (rev 935)
@@ -26,12 +26,14 @@
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;
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
+import com.mvc4g.client.ViewInterface;
import org.gwt.mosaic.ui.client.ListBox;
import org.gwt.mosaic.ui.client.MessageBox;
import org.gwt.mosaic.ui.client.ToolBar;
@@ -41,6 +43,9 @@
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.common.client.framework.WSComponent;
+import org.jboss.errai.workspaces.client.Registry;
+import org.jboss.errai.workspaces.client.framework.annotations.LoadTool;
import java.util.Date;
import java.util.List;
@@ -49,7 +54,8 @@
* List of deployments
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-public class DeploymentListView extends AbstractView
+@LoadTool(name = "Deployments", group = "Runtime")
+public class DeploymentListView implements ViewInterface, WSComponent
{
public final static String ID = DeploymentListView.class.getName();
@@ -74,15 +80,52 @@
private DeploymentDetailView detailView;
+ MosaicPanel panel;
+
public DeploymentListView()
{
- super();
- ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
- setTitle("Deployments");
- setIcon(AbstractImagePrototype.create(icons.deploymentIcon()));
+ controller = Registry.get(Controller.class);
+ }
+
+ @Override
+ public Widget getWidget()
+ {
+ panel = new MosaicPanel(new BorderLayout());
listBox = createListBox();
+ initialize();
+
+ panel.add(deploymentList, new BorderLayoutData(BorderLayout.Region.CENTER));
+ panel.add(detailView, new BorderLayoutData(BorderLayout.Region.SOUTH,10,200));
+
+ // create and register actions
+ controller.addAction(UpdateDeploymentsAction.ID, new UpdateDeploymentsAction());
+ controller.addAction(UpdateDeploymentDetailAction.ID, new UpdateDeploymentDetailAction());
+ controller.addAction(DeleteDeploymentAction.ID, new DeleteDeploymentAction());
+ controller.addAction(SuspendDeploymentAction.ID, new SuspendDeploymentAction());
+ controller.addAction(ResumeDeploymentAction.ID, new ResumeDeploymentAction());
+ controller.addAction(ExecuteJobAction.ID, new ExecuteJobAction());
+
+ 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;
}
private ListBox createListBox()
@@ -180,7 +223,7 @@
toolBar.add(
new Button("Delete", new ClickHandler() {
public void onClick(ClickEvent clickEvent)
- {
+ {
DeploymentRef deploymentRef = getSelection();
if(deploymentRef!=null)
{
@@ -248,18 +291,11 @@
this.deploymentList.add(toolBox, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
this.deploymentList.add(listBox, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
- // layout
- MosaicPanel layout = new MosaicPanel(new BorderLayout());
- layout.add(deploymentList, new BorderLayoutData(BorderLayout.Region.CENTER));
-
// details
// detail panel
detailView = new DeploymentDetailView();
controller.addView(DeploymentDetailView.ID, detailView);
- layout.add(detailView, new BorderLayoutData(BorderLayout.Region.SOUTH,10,200));
- this.add(layout);
-
initialized = true;
}
}
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/EngineEditor.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/EngineEditor.java 2010-01-26 13:11:02 UTC (rev 934)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/EngineEditor.java 2010-01-26 13:42:23 UTC (rev 935)
@@ -39,6 +39,7 @@
*
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
+@Deprecated
public class EngineEditor extends Editor
{
public final static String ID = EngineEditor.class.getName();
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/EngineEditorModule.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/EngineEditorModule.java 2010-01-26 13:11:02 UTC (rev 934)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/EngineEditorModule.java 2010-01-26 13:42:23 UTC (rev 935)
@@ -38,6 +38,7 @@
import org.jboss.errai.workspaces.client.EditorWidgetClient;
import org.jboss.errai.workspaces.client.Registry;
+@Deprecated
public class EngineEditorModule
{
@@ -128,8 +129,8 @@
);
// create and register views
- registerView(controller, tabPanel, DeploymentListView.ID, new DeploymentListView());
- registerView(controller, tabPanel, JobListView.ID, new JobListView(appContext));
+ //registerView(controller, tabPanel, DeploymentListView.ID, new DeploymentListView());
+ //registerView(controller, tabPanel, JobListView.ID, new JobListView(appContext));
// create and register actions
controller.addAction(UpdateDeploymentsAction.ID, new UpdateDeploymentsAction());
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/EngineEditorNavigation.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/EngineEditorNavigation.java 2010-01-26 13:11:02 UTC (rev 934)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/EngineEditorNavigation.java 2010-01-26 13:42:23 UTC (rev 935)
@@ -30,6 +30,7 @@
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
+@Deprecated
public class EngineEditorNavigation extends Tree
{
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-01-26 13:11:02 UTC (rev 934)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/JobListView.java 2010-01-26 13:42:23 UTC (rev 935)
@@ -21,27 +21,28 @@
*/
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.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;
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
+import com.mvc4g.client.ViewInterface;
import org.gwt.mosaic.ui.client.ListBox;
import org.gwt.mosaic.ui.client.MessageBox;
import org.gwt.mosaic.ui.client.ToolBar;
-import org.gwt.mosaic.ui.client.layout.*;
+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.gwt.mosaic.ui.client.list.DefaultListModel;
-import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.common.AbstractView;
-import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
import org.jboss.bpm.console.client.model.JobRef;
import org.jboss.bpm.console.client.util.SimpleDateFormat;
+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.Date;
import java.util.List;
@@ -52,7 +53,8 @@
*
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-public class JobListView extends AbstractView
+@LoadTool(name = "Jobs", group = "Runtime")
+public class JobListView implements ViewInterface, WSComponent
{
public final static String ID = JobListView.class.getName();
@@ -73,17 +75,29 @@
private List<JobRef> jobs = null;
- private ApplicationContext appContext;
+ MosaicPanel panel;
- public JobListView(ApplicationContext appContext)
+ private boolean initialized;
+
+ public JobListView()
{
- setTitle("Jobs");
- this.appContext = appContext;
+ controller = Registry.get(Controller.class);
+ }
- ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
- setIcon(AbstractImagePrototype.create(icons.jobsIcon()));
+ @Override
+ public Widget getWidget()
+ {
+ panel = new MosaicPanel();
- this.listBox = createListBox();
+ listBox = createListBox();
+
+ initialize();
+
+ panel.add(jobList);
+
+ controller.addView(JobListView.ID, this);
+
+ return panel;
}
private ListBox createListBox()
@@ -238,10 +252,6 @@
this.jobList.add(toolBox, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
this.jobList.add(listBox, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
- // layout
- MosaicPanel layout = new MosaicPanel(new BorderLayout());
- layout.add(jobList, new BorderLayoutData(BorderLayout.Region.CENTER));
-
// details
/*JobDetailView detailsView = new JobDetailView();
controller.addView(JobDetailView.ID, detailsView);
@@ -251,8 +261,6 @@
controller.addAction(UpdateJobsAction.ID, new UpdateJobsAction());
- this.add(layout);
-
this.initialized = true;
}
}
16 years, 6 months
Overlord SVN: r934 - in bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client: common and 3 other directories.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2010-01-26 08:11:02 -0500 (Tue, 26 Jan 2010)
New Revision: 934
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/LoginView.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/process/DefinitionListView.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceDetailView.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/ProcessEditor.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditorModule.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditorNavigation.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/ReportEditor.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditorModule.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditorNavigation.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
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditor.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditorModule.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditorNavigation.java
Log:
Moved report tool to errai workspace scheme
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-01-26 09:32:49 UTC (rev 933)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ErraiApplication.java 2010-01-26 13:11:02 UTC (rev 934)
@@ -92,14 +92,7 @@
@Override
public Authentication getAuthentication()
{
- return new Authentication(config, "", "")
- {
- @Override
- public void handleSessionTimeout()
- {
- MessageBox.alert("Session?!", "HTTP Session not valid!");
- }
- };
+ return Registry.get(Authentication.class); // set in login view
}
@Override
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-01-26 09:32:49 UTC (rev 933)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java 2010-01-26 13:11:02 UTC (rev 934)
@@ -143,6 +143,14 @@
.noErrorHandling()
.sendNowWith(ErraiBus.get()
);
+
+ MessageBuilder.createMessage()
+ .toSubject("appContext")
+ .signalling()
+ .with("username", auth.getUsername())
+ .noErrorHandling()
+ .sendNowWith(ErraiBus.get()
+ );
}
}
);
@@ -162,6 +170,7 @@
}
);
+ Registry.set(Authentication.class, auth);
createLayoutWindowPanel();
window.pack();
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-01-26 09:32:49 UTC (rev 933)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/WidgetWindowPanel.java 2010-01-26 13:11:02 UTC (rev 934)
@@ -32,7 +32,7 @@
/**
* General purpose window panel
- *
+ *
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public class WidgetWindowPanel
@@ -41,48 +41,38 @@
public WidgetWindowPanel(String title, final Widget widget)
{
+ this(title, widget, false);
+ }
+
+ public WidgetWindowPanel(String title, final Widget widget, boolean overlay)
+ {
window = new WindowPanel(title);
window.setAnimationEnabled(true);
- //instanceDataWindowPanel.setSize("320px", "240px");
-
- window.addWindowCloseListener(new WindowCloseListener() {
- public void onWindowClosed() {
-
- }
-
- public String onWindowClosing() {
- return null;
- }
- });
-
- window.addWindowResizeListener(
- new WindowResizeListener() {
-
- public void onWindowResized(int i, int i1)
- {
-
- }
- }
- );
-
window.setWidget(widget);
WindowUtil.addMaximizeButton(window, Caption.CaptionRegion.RIGHT);
WindowUtil.addMinimizeButton(window, Caption.CaptionRegion.RIGHT);
+ window.pack();
- final int width = Window.getClientWidth()-200;
- final int height = Window.getClientHeight()-100;
+ if(overlay)
+ {
+ final int width = Window.getClientWidth()-120;
+ final int height = Window.getClientHeight()-80;
- window.setContentSize(
- new Dimension(width,height)
- );
+ window.setSize(width+ " px", height + " px");
+ window.setPopupPosition(60,40);
- window.center();
+ window.show();
+ }
+ else
+ {
+ window.center();
+ }
}
public void close()
{
- window.hide();
+ window.hide();
}
}
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-01-26 09:32:49 UTC (rev 933)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java 2010-01-26 13:11:02 UTC (rev 934)
@@ -49,7 +49,7 @@
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-@LoadTool(name = "Definitions", group = "Process")
+@LoadTool(name = "Definitions", group = "Processes")
public class DefinitionListView implements WSComponent, ViewInterface
{
public final static String ID = DefinitionListView.class.getName();
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceDetailView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceDetailView.java 2010-01-26 09:32:49 UTC (rev 933)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceDetailView.java 2010-01-26 13:11:02 UTC (rev 934)
@@ -23,28 +23,23 @@
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.event.logical.shared.ResizeEvent;
-import com.google.gwt.event.logical.shared.ResizeHandler;
-import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Label;
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.CaptionLayoutPanel;
import org.gwt.mosaic.ui.client.MessageBox;
-import org.gwt.mosaic.ui.client.WindowPanel;
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.ServerPlugins;
import org.jboss.bpm.console.client.common.PropertyGrid;
+import org.jboss.bpm.console.client.common.WidgetWindowPanel;
import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
import org.jboss.bpm.console.client.model.ProcessInstanceRef;
import org.jboss.bpm.console.client.util.SimpleDateFormat;
-import org.jboss.bpm.console.client.util.WindowUtil;
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
@@ -63,9 +58,9 @@
private Button instanceDataBtn;
- private WindowPanel diagramWindowPanel;
+ private WidgetWindowPanel diagramWindowPanel;
- private WindowPanel instanceDataWindowPanel;
+ private WidgetWindowPanel instanceDataWindowPanel;
private ApplicationContext appContext;
@@ -152,9 +147,6 @@
private void createDiagramWindow(ProcessInstanceRef inst)
{
- diagramWindowPanel = new WindowPanel("Process Instance Activity");
- diagramWindowPanel.setAnimationEnabled(true);
- diagramWindowPanel.setSize("320px", "240px");
MosaicPanel layout = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));
layout.setStyleName("bpm-window-layout");
@@ -164,65 +156,20 @@
header.setStyleName("bpm-label-header");
layout.add(header, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
- diagramWindowPanel.addWindowClosingHandler(new Window.ClosingHandler() {
-
- public void onWindowClosing(Window.ClosingEvent closingEvent)
- {
- diagramWindowPanel = null;
- }
- });
-
-
layout.add(diagramView, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
- diagramWindowPanel.setWidget(layout);
- WindowUtil.addMaximizeButton(diagramWindowPanel, Caption.CaptionRegion.RIGHT);
- WindowUtil.addMinimizeButton(diagramWindowPanel, Caption.CaptionRegion.RIGHT);
-
- // display
- diagramWindowPanel.pack();
- diagramWindowPanel.center();
-
+ diagramWindowPanel = new WidgetWindowPanel(
+ "Process Instance Activity",
+ layout, true
+ );
}
private void createDataWindow(ProcessInstanceRef inst)
{
- instanceDataWindowPanel = new WindowPanel("Process Instance Data: "+inst.getId());
- instanceDataWindowPanel.setAnimationEnabled(true);
-
- instanceDataWindowPanel.addWindowClosingHandler(new Window.ClosingHandler() {
-
- public void onWindowClosing(Window.ClosingEvent closingEvent)
- {
- instanceDataWindowPanel = null;
- }
- });
-
- instanceDataWindowPanel.addResizeHandler(
- new ResizeHandler() {
-
- public void onResize(ResizeEvent resizeEvent)
- {
- instanceDataView.invalidate();
- }
- }
- );
-
- instanceDataWindowPanel.setWidget(instanceDataView);
-
- WindowUtil.addMaximizeButton(instanceDataWindowPanel, Caption.CaptionRegion.RIGHT);
- WindowUtil.addMinimizeButton(instanceDataWindowPanel, Caption.CaptionRegion.RIGHT);
-
-
- /*final int width = Window.getClientWidth()-200;
- final int height = Window.getClientHeight()-100;
-
- instanceDataWindowPanel.setContentSize(
- new Dimension(width,height)
- );*/
-
- instanceDataWindowPanel.pack();
- instanceDataWindowPanel.center();
+ instanceDataWindowPanel = new WidgetWindowPanel(
+ "Process Instance Data: "+inst.getId(),
+ instanceDataView, true
+ );
}
public void setController(Controller controller)
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-01-26 09:32:49 UTC (rev 933)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceListView.java 2010-01-26 13:11:02 UTC (rev 934)
@@ -53,7 +53,7 @@
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-@LoadTool(name = "Instances", group = "Process")
+@LoadTool(name = "Instances", group = "Processes")
public class InstanceListView implements WSComponent, ViewInterface
{
public final static String ID = InstanceListView.class.getName();
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java 2010-01-26 09:32:49 UTC (rev 933)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java 2010-01-26 13:11:02 UTC (rev 934)
@@ -33,6 +33,7 @@
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
+@Deprecated
public class ProcessEditor implements WSComponent
{
public final static String ID = ProcessEditor.class.getName();
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditorModule.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditorModule.java 2010-01-26 09:32:49 UTC (rev 933)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditorModule.java 2010-01-26 13:11:02 UTC (rev 934)
@@ -39,6 +39,7 @@
import org.jboss.errai.workspaces.client.EditorWidgetClient;
import org.jboss.errai.workspaces.client.Registry;
+@Deprecated
public class ProcessEditorModule
{
// the module instance; instantiate it behind a runAsync
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditorNavigation.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditorNavigation.java 2010-01-26 09:32:49 UTC (rev 933)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditorNavigation.java 2010-01-26 13:11:02 UTC (rev 934)
@@ -30,6 +30,7 @@
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
+@Deprecated
class ProcessEditorNavigation extends Tree
{
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-01-26 09:32:49 UTC (rev 933)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/RenderReportAction.java 2010-01-26 13:11:02 UTC (rev 934)
@@ -58,7 +58,7 @@
RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, url);
ConsoleLog.debug(RequestBuilder.POST+": " + url);
- final ReportEditor view = (ReportEditor)controller.getView(ReportEditor.ID);
+ final ReportView view = (ReportView)controller.getView(ReportView.ID);
try
{
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java 2010-01-26 09:32:49 UTC (rev 933)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java 2010-01-26 13:11:02 UTC (rev 934)
@@ -39,6 +39,7 @@
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
+@Deprecated
public class ReportEditor extends Editor
{
public final static String ID = ReportEditor.class.getName();
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditorModule.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditorModule.java 2010-01-26 09:32:49 UTC (rev 933)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditorModule.java 2010-01-26 13:11:02 UTC (rev 934)
@@ -37,6 +37,7 @@
import org.jboss.errai.workspaces.client.EditorWidgetClient;
import org.jboss.errai.workspaces.client.Registry;
+@Deprecated
public class ReportEditorModule
{
public final static String ID = ReportEditor.class.getName();
@@ -123,7 +124,7 @@
// create and register views
ReportView view = new ReportView();
- registerView(controller, tabPanel, ReportView.ID, view);
+ //registerView(controller, tabPanel, ReportView.ID, view);
view.initialize();
//controller.addView(ID, this);
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditorNavigation.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditorNavigation.java 2010-01-26 09:32:49 UTC (rev 933)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditorNavigation.java 2010-01-26 13:11:02 UTC (rev 934)
@@ -30,6 +30,7 @@
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
+@Deprecated
class ReportEditorNavigation extends Tree
{
public ReportEditorNavigation(final ApplicationContext appContext)
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-01-26 09:32:49 UTC (rev 933)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportView.java 2010-01-26 13:11:02 UTC (rev 934)
@@ -22,22 +22,32 @@
package org.jboss.bpm.console.client.report;
import com.google.gwt.core.client.GWT;
-import com.google.gwt.user.client.ui.AbstractImagePrototype;
-import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.Timer;
+import com.google.gwt.user.client.ui.*;
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.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;
+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>
*/
-public class ReportView extends AbstractView
+@LoadTool(name = "Available Reports", group = "Reporting")
+public class ReportView implements ViewInterface, WSComponent
{
public final static String ID = ReportView.class.getName();
@@ -45,13 +55,35 @@
private boolean isInitialized;
private DeckLayoutPanel deck;
private ReportLaunchPadView coverpanel;
-
- public ReportView()
+
+ MosaicPanel panel;
+
+ @Override
+ public Widget getWidget()
{
- super();
- ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
- setTitle("Available Reports");
- setIcon(AbstractImagePrototype.create(icons.reportIcon()));
+ panel = new MosaicPanel();
+ controller = Registry.get(Controller.class);
+
+ initialize();
+ panel.add(deck);
+
+ controller.addView(ReportView.ID, this);
+ controller.addAction(UpdateReportConfigAction.ID, new UpdateReportConfigAction());
+
+ // ----
+
+ Timer t = new Timer()
+ {
+ @Override
+ public void run()
+ {
+ controller.handleEvent(new Event(UpdateReportConfigAction.ID, null));
+ }
+ };
+
+ t.schedule(50);
+
+ return panel;
}
public boolean isInitialized()
@@ -75,8 +107,6 @@
// cover
coverpanel = new ReportLaunchPadView();
deck.add(coverpanel);
-
- this.add(deck);
// views and actions
controller.addView(ReportLaunchPadView.ID, coverpanel);
@@ -94,11 +124,18 @@
{
this.controller = controller;
}
-
+
public void configure(List<ReportReference> reports)
{
// update coverview
- coverpanel.update(reports);
+ coverpanel.update(reports);
deck.showWidget(1);
}
+
+ public void displayReport(String title, String dispatchUrl)
+ {
+ ReportFrame reportFrame = new ReportFrame(dispatchUrl);
+ reportFrame.initialize();
+ new WidgetWindowPanel(title, reportFrame, true);
+ }
}
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-01-26 09:32:49 UTC (rev 933)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AbstractTaskList.java 2010-01-26 13:11:02 UTC (rev 934)
@@ -22,10 +22,14 @@
package org.jboss.bpm.console.client.task;
import com.mvc4g.client.Controller;
+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;
import java.util.List;
@@ -34,7 +38,7 @@
*
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-public abstract class AbstractTaskList extends AbstractView
+public abstract class AbstractTaskList implements ViewInterface
{
protected Controller controller;
protected MosaicPanel taskList = null;
@@ -72,6 +76,6 @@
public String getAssignedIdentity()
{
- return identity;
+ return Registry.get(Authentication.class).getUsername();
}
}
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-01-26 09:32:49 UTC (rev 933)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java 2010-01-26 13:11:02 UTC (rev 934)
@@ -21,13 +21,13 @@
*/
package org.jboss.bpm.console.client.task;
-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.ui.AbstractImagePrototype;
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;
import org.gwt.mosaic.ui.client.MessageBox;
@@ -40,18 +40,21 @@
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.icons.ConsoleIconBundle;
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.common.client.framework.WSComponent;
+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>
*/
-public class AssignedTasksView extends AbstractTaskList
+@LoadTool(name = "Personal Tasks", group = "Tasks", priority = 2)
+public class AssignedTasksView extends AbstractTaskList implements WSComponent
{
public final static String ID = AssignedTasksView.class.getName();
@@ -68,15 +71,27 @@
private PagingPanel pagingPanel;
- public AssignedTasksView(ApplicationContext appContext, TaskDetailView detailsView)
+ MosaicPanel panel;
+
+ public AssignedTasksView()
{
- super();
- this.appContext = appContext;
- ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
- setTitle("Personal Tasks");
- setIcon(AbstractImagePrototype.create(icons.userIcon()));
+ controller = Registry.get(Controller.class);
+ appContext = Registry.get(ApplicationContext.class);
+ }
- this.detailsView = detailsView;
+ @Override
+ public Widget getWidget()
+ {
+ panel = new MosaicPanel(new BorderLayout());
+
+ initialize();
+
+ panel.add(taskList, new BorderLayoutData(BorderLayout.Region.CENTER));
+ panel.add(detailsView, new BorderLayoutData(BorderLayout.Region.SOUTH, 10 , 200));
+
+ controller.addView(AssignedTasksView.ID, this);
+
+ return panel;
}
public void initialize()
@@ -246,13 +261,12 @@
);
this.taskList.add(pagingPanel, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
+
+ detailsView = new TaskDetailView(false);
+ controller.addView("AssignedDetailView", detailsView);
+ detailsView.initialize();
- MosaicPanel layout = new MosaicPanel(new BorderLayout());
- layout.add(taskList, new BorderLayoutData(BorderLayout.Region.CENTER));
- layout.add(detailsView, new BorderLayoutData(BorderLayout.Region.SOUTH, 10 , 200));
- this.add(layout);
-
// plugin availability
this.hasDispatcherPlugin =
ServerPlugins.has("org.jboss.bpm.console.server.plugin.FormDispatcherPlugin");
@@ -292,7 +306,6 @@
new Event(UpdateDetailsAction.ID, new DetailViewEvent("AssignedDetailView", null))
);
- this.invalidate();
}
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-01-26 09:32:49 UTC (rev 933)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksView.java 2010-01-26 13:11:02 UTC (rev 934)
@@ -21,13 +21,13 @@
*/
package org.jboss.bpm.console.client.task;
-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.ui.AbstractImagePrototype;
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;
import org.gwt.mosaic.ui.client.MessageBox;
@@ -37,18 +37,21 @@
import org.jboss.bpm.console.client.ApplicationContext;
import org.jboss.bpm.console.client.common.PagingCallback;
import org.jboss.bpm.console.client.common.PagingPanel;
-import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
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.common.client.framework.WSComponent;
+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>
*/
-class OpenTasksView extends AbstractTaskList
+@LoadTool(name = "Group Tasks", group = "Tasks", priority = 1)
+public class OpenTasksView extends AbstractTaskList implements WSComponent
{
public final static String ID = OpenTasksView.class.getName();
@@ -61,16 +64,45 @@
private PagingPanel pagingPanel;
- public OpenTasksView(ApplicationContext appContext, TaskDetailView detailView)
+ private MosaicPanel panel;
+
+ private Controller controller;
+
+ @Override
+ public Widget getWidget()
{
- super();
- this.appContext = appContext;
+ panel = new MosaicPanel(new BorderLayout());
- ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
- setTitle("Group Tasks");
- setIcon(AbstractImagePrototype.create(icons.taskIcon()));
+ controller = Registry.get(Controller.class);
+ appContext = Registry.get(ApplicationContext.class);
- this.detailsView = detailView;
+ initialize();
+
+ // ----
+
+ // 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();
+registerView(controller, tabPanel, AssignedTasksView.ID, new AssignedTasksView(appContext, assignedDetailView));*/
+
+ controller.addView(OpenTasksView.ID, this);
+
+ // ----
+
+ panel.add(taskList, new BorderLayoutData(BorderLayout.Region.CENTER));
+ panel.add(detailsView, new BorderLayoutData(BorderLayout.Region.SOUTH, 10,200));
+
+ return panel;
}
public void initialize()
@@ -141,10 +173,10 @@
new Button("Refresh", new ClickHandler() {
public void onClick(ClickEvent clickEvent)
{
- // force loading
- controller.handleEvent(
- new Event(LoadTasksParticipationAction.ID, getAssignedIdentity())
- );
+ // force loading
+ controller.handleEvent(
+ new Event(LoadTasksParticipationAction.ID, getAssignedIdentity())
+ );
}
}
@@ -197,12 +229,15 @@
this.taskList.add(pagingPanel, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
- // main layout
- MosaicPanel layout = new MosaicPanel(new BorderLayout());
- layout.add(taskList, new BorderLayoutData(BorderLayout.Region.CENTER));
- layout.add(detailsView, new BorderLayoutData(BorderLayout.Region.SOUTH, 10,200));
- this.add(layout);
+ // ----
+
+
+ // create and register views
+ detailsView = new TaskDetailView(true);
+ controller.addView("OpenDetailView", detailsView);
+ detailsView.initialize();
+
isInitialized = true;
}
}
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditor.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditor.java 2010-01-26 09:32:49 UTC (rev 933)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditor.java 2010-01-26 13:11:02 UTC (rev 934)
@@ -36,6 +36,7 @@
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
+@Deprecated
public class TaskEditor extends Editor
{
public final static String ID = TaskEditor.class.getName();
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditorModule.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditorModule.java 2010-01-26 09:32:49 UTC (rev 933)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditorModule.java 2010-01-26 13:11:02 UTC (rev 934)
@@ -38,6 +38,7 @@
import org.jboss.errai.workspaces.client.EditorWidgetClient;
import org.jboss.errai.workspaces.client.Registry;
+@Deprecated
public class TaskEditorModule
{
@@ -124,8 +125,8 @@
openDetailView.initialize();
assignedDetailView.initialize();
- registerView(controller, tabPanel, OpenTasksView.ID, new OpenTasksView(appContext, openDetailView));
- registerView(controller, tabPanel, AssignedTasksView.ID, new AssignedTasksView(appContext, assignedDetailView));
+ //registerView(controller, tabPanel, OpenTasksView.ID, new OpenTasksView(appContext, openDetailView));
+ //registerView(controller, tabPanel, AssignedTasksView.ID, new AssignedTasksView(appContext, assignedDetailView));
// create and register actions
controller.addAction(LoadTasksAction.ID, new LoadTasksAction());
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditorNavigation.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditorNavigation.java 2010-01-26 09:32:49 UTC (rev 933)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditorNavigation.java 2010-01-26 13:11:02 UTC (rev 934)
@@ -30,6 +30,7 @@
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
+@Deprecated
class TaskEditorNavigation extends Tree
{
public TaskEditorNavigation(final ApplicationContext appContext)
16 years, 6 months
Overlord SVN: r933 - in bpm-console/trunk/gui/war: src/main/java and 4 other directories.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2010-01-26 04:32:49 -0500 (Tue, 26 Jan 2010)
New Revision: 933
Added:
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ErraiApplication.java
bpm-console/trunk/gui/war/src/main/resources/ErraiApp.properties
bpm-console/trunk/gui/war/src/main/resources/ErraiService.properties
Removed:
bpm-console/trunk/gui/war/src/main/java/ErraiService.properties
Modified:
bpm-console/trunk/gui/war/pom.xml
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/ApplicationContext.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoadingStatusAction.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/MainLayout.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/ProcessEditor.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditorModule.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstancesAction.java
Log:
First cut of the migration of errai workspaces
Modified: bpm-console/trunk/gui/war/pom.xml
===================================================================
--- bpm-console/trunk/gui/war/pom.xml 2010-01-25 13:27:19 UTC (rev 932)
+++ bpm-console/trunk/gui/war/pom.xml 2010-01-26 09:32:49 UTC (rev 933)
@@ -16,18 +16,32 @@
<properties>
<gwt-maven.version>2.0-RC1</gwt-maven.version>
+ <errai.version>1.0-SNAPSHOT</errai.version>
</properties>
<!-- Dependencies -->
<dependencies>
- <dependency>
+ <dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-bus</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>${errai.version}</version>
</dependency>
<dependency>
+ <groupId>org.jboss.errai</groupId>
+ <artifactId>errai-widgets</artifactId>
+ <version>${errai.version}</version>
+ <classifier>sources</classifier>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.errai</groupId>
+ <artifactId>errai-workspaces</artifactId>
+ <version>${errai.version}</version>
+ </dependency>
+
+ <dependency>
<groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-workspace-api</artifactId>
<version>${version}</version>
@@ -243,6 +257,15 @@
</execution>
</executions>
</plugin>
+
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+
</plugins>
</build>
@@ -532,5 +555,5 @@
</profile>
</profiles>
-
+
</project>
Deleted: bpm-console/trunk/gui/war/src/main/java/ErraiService.properties
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/ErraiService.properties 2010-01-25 13:27:19 UTC (rev 932)
+++ bpm-console/trunk/gui/war/src/main/java/ErraiService.properties 2010-01-26 09:32:49 UTC (rev 933)
@@ -1,38 +0,0 @@
-
-#
-# Copyright 2009 JBoss, a divison Red Hat, Inc
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-#
-# Specify the Authentication/Authorization Adapter sendNowWith use
-#
-#errai.authentication_adapter=org.jboss.errai.persistence.server.security.HibernateAuthenticationAdapter
-#errai.authentication_adapter=org.jboss.errai.bus.server.security.auth.JAASAdapter
-
-##
-## 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.
-##
-errai.require_authentication_for_all=false
-
-#
-# (Required) Specify the application path on the appserver
-#
-errai.application_context=/jbpm-console/
-
-#
-# (Optional) A Login MOTD sendNowWith be sent sendNowWith the client upon successful login.
-#
-errai.login_motd=UNAUTHORIZED ACCESS IS PROHIBITED!
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-01-25 13:27:19 UTC (rev 932)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/Application.gwt.xml 2010-01-26 09:32:49 UTC (rev 933)
@@ -15,6 +15,7 @@
<inherits name="org.jboss.errai.common.ErraiCommon"/>
<inherits name="org.jboss.errai.bus.ErraiBus" />
+ <inherits name="org.jboss.errai.workspaces.ErraiWorkspaces" />
<!-- Add gwt-log support, default level `DEBUG` -->
<inherits name="com.allen_sauer.gwt.log.gwt-log-DEBUG" />
@@ -61,7 +62,8 @@
<!-- Specify the app entry point class. -->
- <entry-point class="org.jboss.bpm.console.client.Application" />
+ <!--entry-point class="org.jboss.bpm.console.client.Application" /-->
+ <entry-point class="org.jboss.bpm.console.client.ErraiApplication" />
<servlet path="/xhp" class="jmaki.xhp.XmlHttpProxyServlet"/>
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java 2010-01-25 13:27:19 UTC (rev 932)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java 2010-01-26 09:32:49 UTC (rev 933)
@@ -38,8 +38,6 @@
ConsoleConfig getConfig();
- Viewport getViewport();
-
void refreshView();
}
Added: 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 (rev 0)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ErraiApplication.java 2010-01-26 09:32:49 UTC (rev 933)
@@ -0,0 +1,143 @@
+/*
+ * 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.core.client.GWT;
+import com.google.gwt.user.client.Command;
+import com.google.gwt.user.client.DeferredCommand;
+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.process.UpdateDefinitionsAction;
+import org.jboss.bpm.console.client.util.ConsoleLog;
+import org.jboss.errai.workspaces.client.Registry;
+
+
+public class ErraiApplication implements EntryPoint
+{
+ public void onModuleLoad() {
+ Log.setUncaughtExceptionHandler();
+
+ DeferredCommand.addCommand(new Command() {
+ public void execute() {
+
+ // 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");
+
+ onModuleLoad2();
+ }
+ });
+ }
+
+ public void onModuleLoad2()
+ {
+ Controller mainController = new com.mvc4g.client.Controller();
+ Registry.set(Controller.class, mainController);
+
+ // ------
+
+ // setup base urls
+ String proxyUrl = null;
+ if (!GWT.isScript())
+ {
+ proxyUrl = GWT.getModuleBaseURL() + "xhp";
+ }
+
+ final ConsoleConfig config = new ConsoleConfig(proxyUrl);
+ ConsoleLog.debug("Console server: " + config.getConsoleServerUrl());
+
+ URLBuilder.configureInstance(config);
+
+ // ------
+
+ ApplicationContext appContext = new ApplicationContext()
+ {
+ @Override
+ public Workspace getWorkpace()
+ {
+ throw new RuntimeException("Not implemented!");
+ }
+
+ @Override
+ public void displayMessage(String message, boolean isError)
+ {
+ throw new RuntimeException("Not implemented!");
+ }
+
+ @Override
+ public Authentication getAuthentication()
+ {
+ return new Authentication(config, "", "")
+ {
+ @Override
+ public void handleSessionTimeout()
+ {
+ MessageBox.alert("Session?!", "HTTP Session not valid!");
+ }
+ };
+ }
+
+ @Override
+ public ConsoleConfig getConfig()
+ {
+ return config;
+ }
+
+ @Override
+ public void refreshView()
+ {
+
+ }
+ };
+
+ Registry.set(ApplicationContext.class, appContext);
+
+ // ------
+
+ registerGlobalViewsAndActions(mainController);
+
+ mainController.addAction("login", new LoginAction());
+ mainController.addView("loginView", new LoginView());
+ mainController.handleEvent(new Event("login", null));
+ }
+
+ /**
+ * Views and actions accessible from any component
+ */
+ private void registerGlobalViewsAndActions(Controller controller)
+ {
+ // 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());
+ }
+}
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoadingStatusAction.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoadingStatusAction.java 2010-01-25 13:27:19 UTC (rev 932)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoadingStatusAction.java 2010-01-26 09:32:49 UTC (rev 933)
@@ -43,7 +43,7 @@
public void execute(Controller controller, Object object)
{
Boolean b = (Boolean)object;
- Header header = (Header)controller.getView(Header.ID);
- header.setLoading(b);
+ //Header header = (Header)controller.getView(Header.ID);
+ //header.setLoading(b);
}
}
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-01-25 13:27:19 UTC (rev 932)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java 2010-01-26 09:32:49 UTC (rev 933)
@@ -35,6 +35,9 @@
import org.gwt.mosaic.ui.client.WindowPanel;
import org.gwt.mosaic.ui.client.layout.*;
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.workspaces.client.Registry;
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
@@ -54,20 +57,10 @@
public final static String[] KNOWN_ROLES = {"admin", "manager", "user"};
+
public LoginView()
{
-
- // setup base urls
- String proxyUrl = null;
- if (!GWT.isScript())
- {
- proxyUrl = GWT.getModuleBaseURL() + "xhp";
- }
-
- config = new ConsoleConfig(proxyUrl);
- ConsoleLog.debug("Console server: " + config.getConsoleServerUrl());
-
- URLBuilder.configureInstance(config);
+ this.config = Registry.get(ApplicationContext.class).getConfig();
}
public void setController(Controller controller)
@@ -143,7 +136,13 @@
public void onSuccess()
{
- new MainLayout(controller, auth, config);
+ //new MainLayout(controller, auth, config);
+ MessageBuilder.createMessage()
+ .toSubject("Workspace")
+ .command("launch")
+ .noErrorHandling()
+ .sendNowWith(ErraiBus.get()
+ );
}
}
);
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/MainLayout.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/MainLayout.java 2010-01-25 13:27:19 UTC (rev 932)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/MainLayout.java 2010-01-26 09:32:49 UTC (rev 933)
@@ -264,7 +264,7 @@
final int height = Window.getClientHeight();
//getViewport().onWindowResized(width, height);
//getViewport().getLayoutPanel().getResizableWidget().onResize(width, height);
- getViewport().getLayoutPanel().layout();
+ viewport.getLayoutPanel().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-01-25 13:27:19 UTC (rev 932)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java 2010-01-26 09:32:49 UTC (rev 933)
@@ -21,26 +21,27 @@
*/
package org.jboss.bpm.console.client.process;
-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.ui.AbstractImagePrototype;
+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;
import org.gwt.mosaic.ui.client.ListBox;
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.PagingCallback;
import org.jboss.bpm.console.client.common.PagingPanel;
-import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
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;
@@ -48,7 +49,8 @@
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-class DefinitionListView extends AbstractView
+@LoadTool(name = "Definitions", group = "Process")
+public class DefinitionListView implements WSComponent, ViewInterface
{
public final static String ID = DefinitionListView.class.getName();
@@ -68,15 +70,39 @@
private List<ProcessDefinitionRef> definitions = null;
private PagingPanel pagingPanel;
- public DefinitionListView()
+ MosaicPanel panel;
+
+ @Override
+ public Widget getWidget()
{
- super();
- ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
- setTitle("Process Definitions");
- setIcon(AbstractImagePrototype.create(icons.processIcon()));
+ panel = new MosaicPanel();
listBox = createListBox();
+ final Controller controller = Registry.get(Controller.class);
+ controller.addView(ID, this);
+ controller.addAction(UpdateInstancesAction.ID, new UpdateInstancesAction());
+ controller.addAction(StartNewInstanceAction.ID, new StartNewInstanceAction());
+ controller.addAction(StateChangeAction.ID, new StateChangeAction());
+ controller.addAction(DeleteDefinitionAction.ID, new DeleteDefinitionAction());
+ controller.addAction(DeleteInstanceAction.ID, new DeleteInstanceAction());
+
+ initialize();
+
+ Timer t = new Timer()
+ {
+ @Override
+ public void run()
+ {
+ controller.handleEvent(
+ new Event(UpdateDefinitionsAction.ID, null)
+ );
+ }
+ };
+
+ t.schedule(50);
+
+ return panel;
}
public boolean isInitialized()
@@ -177,7 +203,7 @@
controller.addAction(UpdateProcessDetailAction.ID, new UpdateProcessDetailAction());
layout.add(detailsView, new BorderLayoutData(BorderLayout.Region.SOUTH, 10,200));
- this.add(layout);
+ panel.add(layout);
isInitialized = true;
}
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-01-25 13:27:19 UTC (rev 932)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceListView.java 2010-01-26 09:32:49 UTC (rev 933)
@@ -21,35 +21,40 @@
*/
package org.jboss.bpm.console.client.process;
-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.ui.AbstractImagePrototype;
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;
import org.gwt.mosaic.ui.client.ListBox;
import org.gwt.mosaic.ui.client.MessageBox;
import org.gwt.mosaic.ui.client.ToolBar;
import org.gwt.mosaic.ui.client.layout.*;
import org.gwt.mosaic.ui.client.list.DefaultListModel;
import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.common.*;
-import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
+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.model.ProcessDefinitionRef;
import org.jboss.bpm.console.client.model.ProcessInstanceRef;
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.workspaces.client.Registry;
+import org.jboss.errai.workspaces.client.framework.annotations.LoadTool;
import java.util.List;
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-class InstanceListView extends AbstractView
+@LoadTool(name = "Instances", group = "Process")
+public class InstanceListView implements WSComponent, ViewInterface
{
public final static String ID = InstanceListView.class.getName();
@@ -75,17 +80,24 @@
private PagingPanel pagingPanel;
- public InstanceListView()
+ MosaicPanel panel;
+
+ public Widget getWidget()
{
- super();
+
this.appContext = Registry.get(ApplicationContext.class);
- ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
- setTitle("Process Instances");
- setIcon(AbstractImagePrototype.create(icons.instanceIcon()));
+ panel = new MosaicPanel();
+ Registry.get(Controller.class).addView(ID, this);
+ initialize();
+ //ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
+ //setTitle("Process Instances");
+ //setIcon(AbstractImagePrototype.create(icons.instanceIcon()));
// riftsaw?
isRiftsawInstance = appContext.getConfig().getProfileName().equals("BPEL Console");
+
+ return panel;
}
public boolean isInitialized()
@@ -346,7 +358,7 @@
controller.addAction(UpdateInstanceDetailAction.ID, new UpdateInstanceDetailAction());
layout.add(detailsView, new BorderLayoutData(BorderLayout.Region.SOUTH,10,200));
- this.add(layout);
+ panel.add(layout);
isInitialized = true;
@@ -410,7 +422,7 @@
}
// layout again
- this.invalidate();
+ panel.invalidate();
}
}
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java 2010-01-25 13:27:19 UTC (rev 932)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java 2010-01-26 09:32:49 UTC (rev 933)
@@ -21,14 +21,11 @@
*/
package org.jboss.bpm.console.client.process;
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.user.client.ui.AbstractImagePrototype;
+import com.google.gwt.user.client.ui.Widget;
import org.gwt.mosaic.ui.client.MessageBox;
import org.gwt.mosaic.ui.client.TabLayoutPanel;
import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.Editor;
-import org.jboss.bpm.console.client.MenuSection;
-import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
+import org.jboss.errai.common.client.framework.WSComponent;
import org.jboss.errai.workspaces.client.EditorWidget;
import org.jboss.errai.workspaces.client.EditorWidgetClient;
import org.jboss.errai.workspaces.client.Registry;
@@ -36,56 +33,32 @@
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-public class ProcessEditor extends Editor
+public class ProcessEditor implements WSComponent
{
public final static String ID = ProcessEditor.class.getName();
private static TabLayoutPanel tabPanel;
- public void initialize()
- {
- if(!isInitialized)
- {
- ProcessEditorModule.createAsync(
+ public Widget getWidget()
+ {
+ ProcessEditorModule.createAsync(
new EditorWidgetClient()
{
public void onSuccess(EditorWidget editorWidget)
{
tabPanel = (TabLayoutPanel)editorWidget.build();
- ProcessEditor.this.add(tabPanel);
editorWidget.loadData();
Registry.get(ApplicationContext.class).refreshView();
- isInitialized = true;
}
public void onUnavailable()
{
MessageBox.error("Error", "Failed to load module "+ID);
}
- }
+ }
);
- }
- }
-
- public String getEditorId()
- {
- return ID;
- }
- public String getTitle()
- {
- return "Processes";
+ return tabPanel;
}
-
- public MenuSection provideMenuSection()
- {
- ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
-
- return new MenuSection(
- getTitle(),
- AbstractImagePrototype.create(icons.processIcon()),
- new ProcessEditorNavigation(Registry.get(ApplicationContext.class))
- );
- }
}
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditorModule.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditorModule.java 2010-01-25 13:27:19 UTC (rev 932)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditorModule.java 2010-01-26 09:32:49 UTC (rev 933)
@@ -92,7 +92,13 @@
}
});
}
-
+
+ public static Widget createSync()
+ {
+ final Controller controller = Registry.get(Controller.class);
+ return createTabPanel(controller);
+ }
+
private static TabLayoutPanel createTabPanel(final Controller controller)
{
// create inner tab layout
@@ -133,8 +139,8 @@
);
// create and register views
- registerView(controller, tabPanel, DefinitionListView.ID, new DefinitionListView());
- registerView(controller, tabPanel, InstanceListView.ID, new InstanceListView());
+ //registerView(controller, tabPanel, DefinitionListView.ID, new DefinitionListView());
+ //registerView(controller, tabPanel, InstanceListView.ID, new InstanceListView());
// create and register actions
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-01-25 13:27:19 UTC (rev 932)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstancesAction.java 2010-01-26 09:32:49 UTC (rev 933)
@@ -67,7 +67,7 @@
final ProcessDefinitionRef def = (ProcessDefinitionRef)event;
List<ProcessInstanceRef> instances = JSOParser.parseProcessInstances(response.getText());
InstanceListView view = (InstanceListView) controller.getView(InstanceListView.ID);
- view.update(def, instances);
+ if(view!=null) view.update(def, instances);
ConsoleLog.info("Loaded " + instances.size() + " process instance(s) in "+(System.currentTimeMillis()-start)+" ms");
Added: bpm-console/trunk/gui/war/src/main/resources/ErraiApp.properties
===================================================================
--- bpm-console/trunk/gui/war/src/main/resources/ErraiApp.properties (rev 0)
+++ bpm-console/trunk/gui/war/src/main/resources/ErraiApp.properties 2010-01-26 09:32:49 UTC (rev 933)
@@ -0,0 +1,4 @@
+##
+## This file is required for the ErraiBus Module Auto-Discovery
+## DO NOT REMOVE
+##
Copied: bpm-console/trunk/gui/war/src/main/resources/ErraiService.properties (from rev 932, bpm-console/trunk/gui/war/src/main/java/ErraiService.properties)
===================================================================
--- bpm-console/trunk/gui/war/src/main/resources/ErraiService.properties (rev 0)
+++ bpm-console/trunk/gui/war/src/main/resources/ErraiService.properties 2010-01-26 09:32:49 UTC (rev 933)
@@ -0,0 +1,38 @@
+
+#
+# Copyright 2009 JBoss, a divison Red Hat, Inc
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+#
+# Specify the Authentication/Authorization Adapter sendNowWith use
+#
+#errai.authentication_adapter=org.jboss.errai.persistence.server.security.HibernateAuthenticationAdapter
+#errai.authentication_adapter=org.jboss.errai.bus.server.security.auth.JAASAdapter
+
+##
+## 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.
+##
+errai.require_authentication_for_all=false
+
+#
+# (Required) Specify the application path on the appserver
+#
+errai.application_context=/jbpm-console/
+
+#
+# (Optional) A Login MOTD sendNowWith be sent sendNowWith the client upon successful login.
+#
+errai.login_motd=UNAUTHORIZED ACCESS IS PROHIBITED!
16 years, 6 months