[overlord-commits] Overlord SVN: r933 - in bpm-console/trunk/gui/war: src/main/java and 4 other directories.
overlord-commits at lists.jboss.org
overlord-commits at lists.jboss.org
Tue Jan 26 04:32:49 EST 2010
Author: heiko.braun at 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 at 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 at jboss.com>
*/
-class DefinitionListView extends AbstractView
+ at 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 at jboss.com>
*/
-class InstanceListView extends AbstractView
+ at 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 at 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!
More information about the overlord-commits
mailing list