[jbpm-commits] JBoss JBPM SVN: r4555 - in projects/gwt-console/branches/hbraun: plugin-example and 6 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed Apr 15 08:31:41 EDT 2009
Author: heiko.braun at jboss.com
Date: 2009-04-15 08:31:41 -0400 (Wed, 15 Apr 2009)
New Revision: 4555
Added:
projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/v2/
projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/v2/LoginAction.java
projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/v2/LoginView.java
projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/v2/MainView.java
projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/v2/MainViewAction.java
projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/v2/process/
projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/v2/process/ProcessEditor.java
projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/v2/process/ProcessEditorNavigation.java
projects/gwt-console/branches/hbraun/war/src/main/resources/mvc4g-conf.xml
Modified:
projects/gwt-console/branches/hbraun/plugin-example/plugin-example.iml
projects/gwt-console/branches/hbraun/pom.xml
projects/gwt-console/branches/hbraun/war/pom.xml
projects/gwt-console/branches/hbraun/war/src/main/resources/org/jboss/bpm/console/Application.gwt.xml
projects/gwt-console/branches/hbraun/war/src/main/resources/org/jboss/bpm/console/workspace-default.cfg
Log:
MVC revamp, first cut
Modified: projects/gwt-console/branches/hbraun/plugin-example/plugin-example.iml
===================================================================
--- projects/gwt-console/branches/hbraun/plugin-example/plugin-example.iml 2009-04-15 08:24:49 UTC (rev 4554)
+++ projects/gwt-console/branches/hbraun/plugin-example/plugin-example.iml 2009-04-15 12:31:41 UTC (rev 4555)
@@ -9,7 +9,7 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="rpc" />
+ <orderEntry type="module" module-name="toplevel" />
<orderEntry type="module" module-name="plugin-api" />
<orderEntry type="module-library">
<library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:compile">
@@ -68,8 +68,44 @@
</library>
</orderEntry>
<orderEntry type="module-library">
- <library name="M2 Dep: com.gwtext:gwtext:jar:2.0.5:provided">
+ <library name="M2 Dep: com.googlecode.gwtmosaic:gwt-mosaic-gwtx:jar:0.1.9:compile">
<CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/com/googlecode/gwtmosaic/gwt-mosaic-gwtx/0.1.9/gwt-mosaic-gwtx-0.1.9.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: com.googlecode.gwtmosaic:gwt-mosaic-dnd:jar:0.1.9:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/com/googlecode/gwtmosaic/gwt-mosaic-dnd/0.1.9/gwt-mosaic-dnd-0.1.9.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: com.googlecode.gwtmosaic:gwt-mosaic:jar:0.1.9:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/com/googlecode/gwtmosaic/gwt-mosaic/0.1.9/gwt-mosaic-0.1.9.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: com.googlecode.gwtmosaic:gwt-mosaic-incubator:jar:0.1.9:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/com/googlecode/gwtmosaic/gwt-mosaic-incubator/0.1.9/gwt-mosaic-incubator-0.1.9.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: com.gwtext:gwtext:jar:2.0.5:compile">
+ <CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/com/gwtext/gwtext/2.0.5/gwtext-2.0.5.jar!/" />
</CLASSES>
<JAVADOC />
Modified: projects/gwt-console/branches/hbraun/pom.xml
===================================================================
--- projects/gwt-console/branches/hbraun/pom.xml 2009-04-15 08:24:49 UTC (rev 4554)
+++ projects/gwt-console/branches/hbraun/pom.xml 2009-04-15 12:31:41 UTC (rev 4555)
@@ -19,6 +19,8 @@
<commons.fileupload.version>1.2.1</commons.fileupload.version>
<commons.io.version>1.3.2</commons.io.version>
<commons.logging.version>1.1.1</commons.logging.version>
+ <commons-lang.version>2.4</commons-lang.version>
+ <commons-config.version>1.6</commons-config.version>
<gson.version>1.2.2</gson.version>
<gwt.version>1.5.3</gwt.version>
<gwtext.version>2.0.5</gwtext.version>
@@ -30,6 +32,7 @@
<jboss.common.version>2.2.7.GA</jboss.common.version>
<jbpm.version>3.3.1.GA</jbpm.version>
<junit.version>3.8.1</junit.version>
+ <mvc4g.version>1.0.0-jboss</mvc4g.version>
<resteasy.version>1.0.2.GA</resteasy.version>
<stax-api.version>1.0-2</stax-api.version>
</properties>
@@ -46,6 +49,18 @@
<dependencyManagement>
<dependencies>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>${commons-lang.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-configuration</groupId>
+ <artifactId>commons-configuration</artifactId>
+ <version>${commons-config.version}</version>
+ </dependency>
+
<!-- GWT related -->
<dependency>
<groupId>com.google.gwt</groupId>
@@ -94,12 +109,17 @@
<artifactId>gwt-mosaic-incubator</artifactId>
<version>${gwt-mosaic.version}</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>com.googlecode.gwtmosaic</groupId>
<artifactId>gwt-mosaic-gwtx</artifactId>
<version>${gwt-mosaic.version}</version>
</dependency>
+ <dependency>
+ <groupId>com.googlecode.mvc4g</groupId>
+ <artifactId>mvc4g</artifactId>
+ <version>${mvc4g.version}</version>
+ </dependency>
<!-- Other -->
<dependency>
Modified: projects/gwt-console/branches/hbraun/war/pom.xml
===================================================================
--- projects/gwt-console/branches/hbraun/war/pom.xml 2009-04-15 08:24:49 UTC (rev 4554)
+++ projects/gwt-console/branches/hbraun/war/pom.xml 2009-04-15 12:31:41 UTC (rev 4555)
@@ -97,9 +97,25 @@
<artifactId>gwt-mosaic-gwtx</artifactId>
</dependency>
+ <dependency>
+ <groupId>com.googlecode.mvc4g</groupId>
+ <artifactId>mvc4g</artifactId>
+
+ </dependency>
+
<!-- 3rd party -->
<dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-configuration</groupId>
+ <artifactId>commons-configuration</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>javax.xml.stream</groupId>
<artifactId>stax-api</artifactId>
<scope>provided</scope>
Added: projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/v2/LoginAction.java
===================================================================
--- projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/v2/LoginAction.java (rev 0)
+++ projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/v2/LoginAction.java 2009-04-15 12:31:41 UTC (rev 4555)
@@ -0,0 +1,38 @@
+/*
+ * 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.v2;
+
+import com.mvc4g.client.ActionInterface;
+import com.mvc4g.client.Controller;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class LoginAction implements ActionInterface
+{
+
+ public void execute(Controller controller, Object object)
+ {
+ LoginView loginView = (LoginView)controller.getView(LoginView.NAME);
+ loginView.display();
+ }
+}
Added: projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/v2/LoginView.java
===================================================================
--- projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/v2/LoginView.java (rev 0)
+++ projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/v2/LoginView.java 2009-04-15 12:31:41 UTC (rev 4555)
@@ -0,0 +1,193 @@
+/*
+ * 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.v2;
+
+import com.google.gwt.http.client.Request;
+import com.google.gwt.http.client.Response;
+import com.google.gwt.user.client.WindowCloseListener;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.ui.TextBox;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.core.client.GWT;
+import com.mvc4g.client.Controller;
+import com.mvc4g.client.ViewInterface;
+import com.mvc4g.client.Event;
+import org.gwt.mosaic.forms.client.builder.DefaultFormBuilder;
+import org.gwt.mosaic.forms.client.layout.FormLayout;
+import org.gwt.mosaic.ui.client.WindowPanel;
+import org.gwt.mosaic.ui.client.layout.BorderLayout;
+import org.gwt.mosaic.ui.client.layout.BorderLayoutData;
+import org.gwt.mosaic.ui.client.layout.LayoutPanel;
+import org.jboss.bpm.console.client.Authentication;
+import org.jboss.bpm.console.client.ConsoleConfig;
+import org.jboss.bpm.console.client.URLBuilder;
+import org.jboss.bpm.console.client.util.ConsoleLog;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class LoginView implements ViewInterface
+{
+ public final static String NAME = "loginView";
+
+ private Controller controller;
+
+ private ConsoleConfig config;
+ private URLBuilder urlBuilder;
+ private Authentication auth;
+
+ private WindowPanel window = null;
+ private TextBox usernameInput;
+ private TextBox passwordInput;
+
+ public final static String[] KNOWN_ROLES = {"admin", "manager", "user"};
+
+
+ public LoginView()
+ {
+ config = new ConsoleConfig();
+
+ // setup
+
+ if (!GWT.isScript())
+ {
+ String proxyUrl = GWT.getModuleBaseURL() + "xhp";
+ config.setConsoleServerUrl(proxyUrl);
+ }
+
+ ConsoleLog.debug("Console server: " + config.getConsoleServerUrl());
+ ConsoleLog.debug("Report server: " + config.getReportServerUrl());
+
+ urlBuilder = new URLBuilder(config);
+
+ }
+
+ public void setController(Controller controller)
+ {
+ this.controller = controller;
+ }
+
+ public void display()
+ {
+ createLayoutWindowPanel();
+ window.center();
+ }
+
+ /**
+ * The 'layout' window panel.
+ */
+ private void createLayoutWindowPanel() {
+ window = new WindowPanel("jBPM Management Console");
+ window.setAnimationEnabled(false);
+ window.setSize("320px", "180px");
+
+ LayoutPanel panel = new LayoutPanel();
+ window.setWidget(panel);
+ createLayoutContent(panel);
+
+ window.addWindowCloseListener(new WindowCloseListener() {
+ public void onWindowClosed() {
+ window = null;
+ }
+
+ public String onWindowClosing() {
+ return null;
+ }
+ });
+ }
+
+ /**
+ * Create content for layout.
+ */
+ private void createLayoutContent(LayoutPanel layoutPanel) {
+
+ layoutPanel.setLayout(new BorderLayout());
+ layoutPanel.setPadding(5);
+
+ final Button submit = new Button("Submit");
+ submit.addClickListener(new ClickListener()
+ {
+
+ public void onClick(Widget widget)
+ {
+ String user = usernameInput.getText();
+ String pass = passwordInput.getText();
+
+ String url = urlBuilder.getUserInRoleURL(KNOWN_ROLES);
+ auth = new Authentication(url);
+ auth.setCallback(
+ new Authentication.AuthCallback()
+ {
+
+ public void onLoginSuccess(Request request, Response response)
+ {
+ // clear the form
+ usernameInput.setText("");
+ passwordInput.setText("");
+
+ // display main console
+ window.hide();
+
+ // assemble main view
+ controller.handleEvent( new Event("loginSuccessful", auth) );
+ }
+
+ public void onLoginFailed(Request request, Throwable t)
+ {
+ // auth failed
+ ConsoleLog.error("Authentication failed.", t);
+ }
+ }
+ );
+
+ auth.doLogin(user, pass);
+ }
+ });
+
+ layoutPanel.add(createForm(), new BorderLayoutData(BorderLayout.Region.CENTER, 10, 200));
+ layoutPanel.add(submit, new BorderLayoutData(BorderLayout.Region.SOUTH, 10, 200));
+
+ }
+
+ private Widget createForm()
+ {
+ FormLayout layout = new FormLayout(
+ "right:pref, 10px, left:pref:grow", // 3 columns
+ "pref, pref, 5px, pref"); // 4 rows
+
+ DefaultFormBuilder builder = new DefaultFormBuilder(layout);
+ builder.appendSeparator("Login");
+
+ usernameInput = new TextBox();
+ builder.append("Username:", usernameInput);
+ builder.nextLine();
+
+ builder.nextLine(); // empty space
+
+ passwordInput = new TextBox();
+ builder.append("Password:", passwordInput);
+ builder.nextLine();
+
+ return builder.getPanel();
+ }
+}
Added: projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/v2/MainView.java
===================================================================
--- projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/v2/MainView.java (rev 0)
+++ projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/v2/MainView.java 2009-04-15 12:31:41 UTC (rev 4555)
@@ -0,0 +1,38 @@
+/*
+ * 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.v2;
+
+import com.mvc4g.client.ViewInterface;
+import com.mvc4g.client.Controller;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class MainView implements ViewInterface
+{
+ private Controller controller;
+
+ public void setController(Controller controller)
+ {
+ this.controller = controller;
+ }
+}
Added: projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/v2/MainViewAction.java
===================================================================
--- projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/v2/MainViewAction.java (rev 0)
+++ projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/v2/MainViewAction.java 2009-04-15 12:31:41 UTC (rev 4555)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client.v2;
+
+import com.mvc4g.client.ActionInterface;
+import com.mvc4g.client.Controller;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class MainViewAction implements ActionInterface
+{
+ public void execute(Controller controller, Object object)
+ {
+ System.out.println("MainViewAction:" + object);
+ }
+}
Added: projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/v2/process/ProcessEditor.java
===================================================================
--- projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/v2/process/ProcessEditor.java (rev 0)
+++ projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/v2/process/ProcessEditor.java 2009-04-15 12:31:41 UTC (rev 4555)
@@ -0,0 +1,64 @@
+/*
+ * 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.v2.process;
+
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.Editor;
+import org.jboss.bpm.console.client.MenuSection;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class ProcessEditor extends Editor
+{
+ public final static String ID = "org.jboss.bpm.process.ProcessEditor";
+
+ public ProcessEditor(ApplicationContext applicationContext)
+ {
+ super(applicationContext);
+ }
+
+ public String getEditorId()
+ {
+ return ID;
+ }
+
+ public String getTitle()
+ {
+ return "Processes";
+ }
+
+ public String getIconCSS()
+ {
+ return "bpm-process-icon";
+ }
+
+ public MenuSection provideMenuSection()
+ {
+ return new MenuSection(
+ "Process Management",
+ "bpm-process-icon",
+ new ProcessEditorNavigation(appContext)
+ );
+ }
+}
+
Added: projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/v2/process/ProcessEditorNavigation.java
===================================================================
--- projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/v2/process/ProcessEditorNavigation.java (rev 0)
+++ projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/v2/process/ProcessEditorNavigation.java 2009-04-15 12:31:41 UTC (rev 4555)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client.v2.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.Workspace;
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.process.ProcessEditor;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class ProcessEditorNavigation extends Tree
+{
+
+ public ProcessEditorNavigation(final ApplicationContext appContext)
+ {
+ super.setTitle("Processes");
+
+ TreeItem root = addItem("Process Definitions");
+ TreeItem definitions = root.addItem("View definitions");
+
+ addTreeListener(
+ new TreeListener()
+ {
+ public void onTreeItemSelected(TreeItem treeItem)
+ {
+ if("View definitions".equals(treeItem.getText()))
+ {
+ Workspace workspace = appContext.getWorkpace();
+ workspace.showEditor(ProcessEditor.ID);
+ }
+ }
+
+ public void onTreeItemStateChanged(TreeItem treeItem)
+ {
+
+ }
+ }
+ );
+ }
+}
Added: projects/gwt-console/branches/hbraun/war/src/main/resources/mvc4g-conf.xml
===================================================================
--- projects/gwt-console/branches/hbraun/war/src/main/resources/mvc4g-conf.xml (rev 0)
+++ projects/gwt-console/branches/hbraun/war/src/main/resources/mvc4g-conf.xml 2009-04-15 12:31:41 UTC (rev 4555)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+ Console MVC configuration
+ Further explanations canbe found here:
+ http://code.google.com/p/mvc4g
+ -->
+<mvc4g>
+ <controller name="mainController" class="com.mvc4g.client.Controller">
+ <views>
+ <view name="loginView" class="org.jboss.bpm.console.client.v2.LoginView" />
+ <view name="mainView" class="org.jboss.bpm.console.client.v2.MainView" />
+ </views>
+ <actions>
+ <action name="login" class="org.jboss.bpm.console.client.v2.LoginAction" />
+ <action name="loginSuccessful" class="org.jboss.bpm.console.client.v2.MainViewAction" />
+ </actions>
+ </controller>
+
+ <start controllerName="mainController" actionName="login" />
+
+</mvc4g>
\ No newline at end of file
Modified: projects/gwt-console/branches/hbraun/war/src/main/resources/org/jboss/bpm/console/Application.gwt.xml
===================================================================
--- projects/gwt-console/branches/hbraun/war/src/main/resources/org/jboss/bpm/console/Application.gwt.xml 2009-04-15 08:24:49 UTC (rev 4554)
+++ projects/gwt-console/branches/hbraun/war/src/main/resources/org/jboss/bpm/console/Application.gwt.xml 2009-04-15 12:31:41 UTC (rev 4555)
@@ -20,6 +20,9 @@
<inherits name='org.gwt.mosaic.ui.UI'/>
<inherits name="org.gwt.mosaic.forms.Forms"/>
+ <!-- mvc4g -->
+ <inherits name='com.mvc4g.Mvc4gModule'/>
+
<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
@@ -46,7 +49,7 @@
<set-property name="log_WindowLogger" value="DISABLED" />
<!-- Specify the app entry point class. -->
- <entry-point class='org.jboss.bpm.console.client.Application' />
+ <entry-point class='com.mvc4g.client.Mvc4gEntryPoint' />
<servlet path="/xhp" class="jmaki.xhp.XmlHttpProxyServlet"/>
Modified: projects/gwt-console/branches/hbraun/war/src/main/resources/org/jboss/bpm/console/workspace-default.cfg
===================================================================
--- projects/gwt-console/branches/hbraun/war/src/main/resources/org/jboss/bpm/console/workspace-default.cfg 2009-04-15 08:24:49 UTC (rev 4554)
+++ projects/gwt-console/branches/hbraun/war/src/main/resources/org/jboss/bpm/console/workspace-default.cfg 2009-04-15 12:31:41 UTC (rev 4555)
@@ -1,4 +1,4 @@
-org.jboss.bpm.console.client.process.ProcessEditor
+org.jboss.bpm.console.client.v2.process.ProcessEditor
org.jboss.bpm.console.client.task.TaskEditor
# not yet implemented in jBPM4
More information about the jbpm-commits
mailing list