[jbpm-commits] JBoss JBPM SVN: r3192 - in projects/gwt-console/trunk: server/src/main/java/org/jboss/bpm/console/server and 6 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Thu Dec 4 04:21:44 EST 2008
Author: heiko.braun at jboss.com
Date: 2008-12-04 04:21:44 -0500 (Thu, 04 Dec 2008)
New Revision: 3192
Added:
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/BirtPanel.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/ProcessMetricEditor.java
Modified:
projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/server/gson/GsonFactory.java
projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/server/gson/SQLDateTypeAdapter.java
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/JBPM3MgmtFacade.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/URLBuilder.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/MetricOverview.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/MetricOverviewEditor.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceDetailForm.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceListEditor.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/AssignmentFormPanel.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskDetailsFormPanel.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/ModelChangeListener.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/ModelListenerRegistry.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/RemoteListView.java
projects/gwt-console/trunk/war/src/main/resources/org/jboss/bpm/console/public/console.css
Log:
More work on BIRT integration
Modified: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/server/gson/GsonFactory.java
===================================================================
--- projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/server/gson/GsonFactory.java 2008-12-04 07:38:17 UTC (rev 3191)
+++ projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/server/gson/GsonFactory.java 2008-12-04 09:21:44 UTC (rev 3192)
@@ -32,7 +32,7 @@
public static Gson createInstance()
{
Gson gson = new GsonBuilder()
- .setDateFormat("yyyy-M-d HH:mm:ss")
+ .setDateFormat("yyyy-MM-dd HH:mm:ss")
.registerTypeAdapter(java.sql.Timestamp.class, new SQLDateTypeAdapter())
.create();
return gson;
Modified: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/server/gson/SQLDateTypeAdapter.java
===================================================================
--- projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/server/gson/SQLDateTypeAdapter.java 2008-12-04 07:38:17 UTC (rev 3191)
+++ projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/server/gson/SQLDateTypeAdapter.java 2008-12-04 09:21:44 UTC (rev 3192)
@@ -41,7 +41,7 @@
*/
public class SQLDateTypeAdapter implements JsonSerializer<java.sql.Timestamp>, JsonDeserializer<Date>
{
- private final DateFormat format = new SimpleDateFormat("y-M-d HH:mm:ss");
+ private final DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
public JsonElement serialize(java.sql.Timestamp src, Type typeOfSrc, JsonSerializationContext context)
{
Modified: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/JBPM3MgmtFacade.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/JBPM3MgmtFacade.java 2008-12-04 07:38:17 UTC (rev 3191)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/JBPM3MgmtFacade.java 2008-12-04 09:21:44 UTC (rev 3192)
@@ -115,7 +115,7 @@
String fileName = item.getName();
String contentType = item.getContentType();
boolean isInMemory = item.isInMemory();
- long sizeInBytes = item.getSize();
+ long sizeInBytes = item.getSize();
// Process a file upload in memory
byte[] data = item.get();
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/URLBuilder.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/URLBuilder.java 2008-12-04 07:38:17 UTC (rev 3191)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/URLBuilder.java 2008-12-04 09:21:44 UTC (rev 3192)
@@ -157,8 +157,15 @@
return getConsoleServerUrl()+ "/rs/test/undeploy/harness";
}
- public String getDefaultReportUrl()
+ // TODO: retrieve report name from configuration
+ public String getOverviewReportUrl()
{
return config.getReportServerUrl()+"/preview?__report=process_activity.rptdesign";
}
+
+ public String getDefinitionReportUrl(String name)
+ {
+ String encodedName = URL.encode(name);
+ return config.getReportServerUrl()+"/preview?__report=instance_report.rptdesign&name="+encodedName;
+ }
}
Added: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/BirtPanel.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/BirtPanel.java (rev 0)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/BirtPanel.java 2008-12-04 09:21:44 UTC (rev 3192)
@@ -0,0 +1,51 @@
+/*
+ * 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.metric;
+
+import com.google.gwt.user.client.ui.Frame;
+import com.gwtext.client.widgets.Panel;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class BirtPanel extends Panel
+{
+ private Frame frame;
+
+ public BirtPanel()
+ {
+ setHeader(false);
+ setWidth(660);
+ setHeight(450);
+
+ frame = new Frame();
+ frame.setWidth("660");
+ frame.setHeight("448");
+
+ add(frame);
+ }
+
+ public void setUrl(String url)
+ {
+ frame.setUrl(url);
+ }
+}
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/MetricOverview.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/MetricOverview.java 2008-12-04 07:38:17 UTC (rev 3191)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/MetricOverview.java 2008-12-04 09:21:44 UTC (rev 3192)
@@ -22,7 +22,6 @@
package org.jboss.bpm.console.client.metric;
import com.google.gwt.http.client.*;
-import com.google.gwt.user.client.ui.Frame;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.layout.ColumnLayout;
@@ -55,7 +54,7 @@
// ------------
RequestBuilder rb = new RequestBuilder(RequestBuilder.GET,
- view.getUrlBuilder().getDefaultReportUrl()
+ view.getUrlBuilder().getOverviewReportUrl()
);
try
{
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/MetricOverviewEditor.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/MetricOverviewEditor.java 2008-12-04 07:38:17 UTC (rev 3191)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/MetricOverviewEditor.java 2008-12-04 09:21:44 UTC (rev 3192)
@@ -21,18 +21,19 @@
*/
package org.jboss.bpm.console.client.metric;
-import com.google.gwt.user.client.ui.Frame;
import com.gwtext.client.core.EventObject;
import com.gwtext.client.data.*;
import com.gwtext.client.widgets.Button;
import com.gwtext.client.widgets.Component;
import com.gwtext.client.widgets.Panel;
+import com.gwtext.client.widgets.MessageBox;
import com.gwtext.client.widgets.event.ButtonListenerAdapter;
import com.gwtext.client.widgets.event.PanelListenerAdapter;
import com.gwtext.client.widgets.form.ComboBox;
-import com.gwtext.client.widgets.form.FormPanel;
+import com.gwtext.client.widgets.form.Label;
import com.gwtext.client.widgets.layout.HorizontalLayout;
import com.gwtext.client.widgets.layout.VerticalLayout;
+import com.gwtext.client.widgets.menu.Separator;
import org.jboss.bpm.console.client.Editor;
import org.jboss.bpm.console.client.MainView;
import org.jboss.bpm.console.client.util.ConsoleLog;
@@ -42,12 +43,9 @@
*/
public class MetricOverviewEditor extends Editor
{
-
+ public final static String ID = "org.jboss.bpm.metric.ProcessMetricOverview";
private MainView view;
- private Panel teaserPanel;
- public final static String ID = "org.jboss.bpm.metric.ProcessMetric";
-
public MetricOverviewEditor(final MainView view)
{
super();
@@ -65,54 +63,75 @@
public void onRender(Component component)
{
- final String reportUrl= view.getUrlBuilder().getDefaultReportUrl();
+ Panel panel = new Panel("Metric overview");
+ panel.setPaddings(10);
+
+ final String reportUrl= view.getUrlBuilder().getOverviewReportUrl();
ConsoleLog.debug("Report resource:" + reportUrl);
- final Frame frame = new Frame(reportUrl);
- frame.setWidth("600");
- frame.setHeight("448");
+ final ComboBox comboBox = buildProcessSelection();
+
+ final BirtPanel birtPanel = new BirtPanel();
+ birtPanel.setUrl(reportUrl);
+
+ // --
- Panel container = new Panel();
- container.setHeader(false);
- container.setWidth(600);
- container.setHeight(450);
+ Button refreshBtn = new Button("Refresh", new ButtonListenerAdapter()
+ {
- container.add(frame);
+ public void onClick(Button button, EventObject eventObject)
+ {
+ birtPanel.setUrl(reportUrl);
+ }
+ });
- // ---------
+ Button viewBtn = new Button("Examine", new ButtonListenerAdapter()
+ {
- Panel tools = new Panel();
- tools.setLayout(new HorizontalLayout(10));
+ public void onClick(Button button, EventObject eventObject)
+ {
+ String rawValue = comboBox.getRawValue();
+ if(rawValue==null || rawValue.equals(""))
+ MessageBox.alert("Please enter a process definition name!");
+ else
+ onExamine(rawValue);
+ }
+ });
// --
- tools.addButton(
- new Button("Refresh", new ButtonListenerAdapter(){
+ Panel toolsPanel = new Panel();
+ toolsPanel.setLayout( new HorizontalLayout(10) );
+ Label label = new Label("Process definition");
+ label.setStyleName("bpm-label");
+ toolsPanel.add(label);
+ toolsPanel.add(comboBox);
+ toolsPanel.add( viewBtn );
+ toolsPanel.add( new Separator() );
+ toolsPanel.add( refreshBtn );
- public void onClick(Button button, EventObject eventObject)
- {
- frame.setUrl(reportUrl);
- }
- })
- );
+ panel.add(toolsPanel);
+ panel.add(birtPanel);
- // --
-
- FormPanel form = new FormPanel();
- form.setBorder(false);
- form.add( createProcessSelection() );
-
- // --
-
- add(form);
- add(container);
+ add(panel);
}
}
);
}
- private ComboBox createProcessSelection()
+
+ private void onExamine(String definitionName)
{
+ String editorId = ProcessMetricEditor.createWidgetID(definitionName);
+
+ if(view.hasEditor(editorId))
+ view.showEditor(editorId);
+ else
+ view.addEditor( new ProcessMetricEditor(definitionName, view) );
+ }
+
+ private ComboBox buildProcessSelection()
+ {
final RecordDef recordDef = new RecordDef(
new FieldDef[]{
@@ -135,16 +154,16 @@
ComboBox cb = new ComboBox();
cb.setMinChars(1);
- cb.setFieldLabel("Process");
+ cb.setFieldLabel("Process definition");
cb.setStore(store);
cb.setDisplayField("name");
cb.setMode(ComboBox.LOCAL);
cb.setTriggerAction(ComboBox.ALL);
- cb.setEmptyText("Please enter a process name");
+ cb.setEmptyText("Please enter a name");
cb.setLoadingText("Searching...");
cb.setTypeAhead(true);
cb.setSelectOnFocus(true);
- cb.setWidth(100);
+ cb.setWidth(180);
return cb;
}
Added: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/ProcessMetricEditor.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/ProcessMetricEditor.java (rev 0)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/ProcessMetricEditor.java 2008-12-04 09:21:44 UTC (rev 3192)
@@ -0,0 +1,180 @@
+/*
+ * 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.metric;
+
+import org.jboss.bpm.console.client.MainView;
+import org.jboss.bpm.console.client.Editor;
+import org.jboss.bpm.console.client.UIConstants;
+import org.jboss.bpm.console.client.util.ConsoleLog;
+import com.gwtext.client.widgets.layout.VerticalLayout;
+import com.gwtext.client.widgets.layout.HorizontalLayout;
+import com.gwtext.client.widgets.event.PanelListenerAdapter;
+import com.gwtext.client.widgets.event.ButtonListenerAdapter;
+import com.gwtext.client.widgets.Component;
+import com.gwtext.client.widgets.Button;
+import com.gwtext.client.widgets.MessageBox;
+import com.gwtext.client.widgets.Panel;
+import com.gwtext.client.widgets.menu.Separator;
+import com.gwtext.client.widgets.form.ComboBox;
+import com.gwtext.client.widgets.form.Label;
+import com.gwtext.client.core.EventObject;
+import com.gwtext.client.data.*;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class ProcessMetricEditor extends Editor
+{
+ public final static String ID = "org.jboss.bpm.metric.ProcessMetric";
+ private String definitionName;
+ private MainView view;
+
+ public ProcessMetricEditor(final String definitionName, final MainView view)
+ {
+ this.definitionName = definitionName;
+ this.view = view;
+ this.setId( ProcessMetricEditor.createWidgetID(definitionName) );
+
+ this.setPaddings(10);
+
+ // -------------------------------------
+ this.setLayout(new VerticalLayout(10) );
+
+ this.addListener(
+ new PanelListenerAdapter()
+ {
+
+ public void onRender(Component component)
+ {
+
+ final String reportUrl= view.getUrlBuilder().getDefinitionReportUrl(definitionName);
+ ConsoleLog.debug("Report resource:" + reportUrl);
+
+ final ComboBox comboBox = buildInstanceSelection();
+
+ final BirtPanel birtPanel = new BirtPanel();
+ birtPanel.setUrl(reportUrl);
+
+ // --
+
+ Button refreshBtn = new Button("Refresh", new ButtonListenerAdapter()
+ {
+
+ public void onClick(Button button, EventObject eventObject)
+ {
+ birtPanel.setUrl(reportUrl);
+ }
+ });
+
+ Button viewBtn = new Button("Examine", new ButtonListenerAdapter()
+ {
+
+ public void onClick(Button button, EventObject eventObject)
+ {
+ String rawValue = comboBox.getRawValue();
+ if(rawValue==null || rawValue.equals(""))
+ MessageBox.alert("Please enter a process instance ID!");
+ else
+ MessageBox.alert("Not implemented");
+ }
+ });
+
+ // --
+
+ Panel p = new Panel();
+ p.setLayout( new HorizontalLayout(10) );
+ Label label = new Label("Instance ID");
+ label.setStyleName("bpm-label");
+ p.add(label);
+ p.add(comboBox);
+ p.add( viewBtn );
+ p.add( new Separator() );
+ p.add( refreshBtn );
+
+ add(p);
+ add(birtPanel);
+ }
+ }
+ );
+ }
+
+ private ComboBox buildInstanceSelection()
+ {
+
+ final RecordDef recordDef = new RecordDef(
+ new FieldDef[]{
+ new IntegerFieldDef("instanceId"),
+ new IntegerFieldDef("parentId"),
+ new StringFieldDef("key"),
+ new StringFieldDef("state"),
+ new DateFieldDef("startDate", UIConstants.DATE_FORMAT),
+ new DateFieldDef("endDate", UIConstants.DATE_FORMAT),
+ new BooleanFieldDef("suspended")
+ }
+ );
+
+ final JsonReader reader = new JsonReader(recordDef);
+ reader.setRoot("instances");
+ reader.setTotalProperty("totalCount");
+ reader.setId("instanceId");
+
+ DataProxy dataProxy = new ScriptTagProxy(
+ view.getUrlBuilder().getProcessDefinitionsURL(), 1000*10);
+
+ final Store store = new Store(dataProxy, reader, false);
+ store.load();
+
+ ComboBox cb = new ComboBox();
+ cb.setMinChars(1);
+ cb.setFieldLabel("Instance ID");
+ cb.setStore(store);
+ cb.setDisplayField("ID");
+ cb.setMode(ComboBox.LOCAL);
+ cb.setTriggerAction(ComboBox.ALL);
+ cb.setEmptyText("Please enter an ID");
+ cb.setLoadingText("Searching...");
+ cb.setTypeAhead(true);
+ cb.setSelectOnFocus(true);
+ cb.setWidth(180);
+
+ return cb;
+ }
+ public String getEditorId()
+ {
+ return createWidgetID(definitionName);
+ }
+
+ public String getTitle()
+ {
+ return definitionName +" Metrics";
+ }
+
+ public String getIconCSS()
+ {
+ return "bpm-metric-icon";
+ }
+
+ public static String createWidgetID(String definitionName)
+ {
+ return ID+"."+definitionName;
+ }
+}
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceDetailForm.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceDetailForm.java 2008-12-04 07:38:17 UTC (rev 3191)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceDetailForm.java 2008-12-04 09:21:44 UTC (rev 3192)
@@ -41,7 +41,7 @@
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
*/
-public class ProcessInstanceDetailForm extends Panel implements ModelChangeListener
+class ProcessInstanceDetailForm extends Panel implements ModelChangeListener
{
private FormPanel detailsForm;
@@ -59,7 +59,7 @@
{
super();
- this.mainView = mainView;
+ this.mainView = view;
this.callback = callback;
setTitle("Instance Details");
@@ -175,4 +175,10 @@
detailsForm.doLayout();
}
+
+ public void onReset()
+ {
+ selectedInstance = null;
+ detailsForm.getForm().reset();
+ }
}
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java 2008-12-04 07:38:17 UTC (rev 3191)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java 2008-12-04 09:21:44 UTC (rev 3192)
@@ -48,7 +48,7 @@
{
private Map<Integer, ProcessInstanceRef> row2InstanceMap = new HashMap<Integer, ProcessInstanceRef>();
- private ProcessDefinitionRef parent;
+ private ProcessDefinitionRef parent;
public ProcessInstanceList(ProcessDefinitionRef procDef, String titleName, MainView view)
{
@@ -241,5 +241,4 @@
{
return view.getUrlBuilder().getProcessInstanceURL(parentId);
}
-
}
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceListEditor.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceListEditor.java 2008-12-04 07:38:17 UTC (rev 3191)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceListEditor.java 2008-12-04 09:21:44 UTC (rev 3192)
@@ -51,12 +51,13 @@
private Panel tokenEditorPanel;
private ProcessInstanceRef selectedInstance;
+
+ private ProcessInstanceDetailForm detailsForm;
private TokenEditor currentTokenEditor;
private TabPanel tabPanel;
private ModelListenerRegistry modelListeners;
-
private ModelModificationCallback modelModificationCallback;
public ProcessInstanceListEditor(ProcessDefinitionRef proc, final MainView view)
@@ -104,9 +105,7 @@
resetEditor();
}
};
- Panel detailsForm = new ProcessInstanceDetailForm(view,
- modelModificationCallback
- );
+ detailsForm = new ProcessInstanceDetailForm(view, modelModificationCallback);
modelListeners.addListener( (ModelChangeListener) detailsForm);
// ----------------
@@ -178,18 +177,18 @@
return "bpm-instance-icon";
}
- private void resetEditor()
+ void resetEditor()
{
instanceList.reloadStore();
selectedInstance = null;
+ modelListeners.fireResetEvent();
+
if(currentTokenEditor!=null)
currentTokenEditor.resetEditor();
tokenEditorPanel.clear();
- tokenEditorPanel.doLayout();
-
- //tabPanel.setActiveTab(0);
+ tokenEditorPanel.doLayout();
}
public static String createWidgetID(ProcessDefinitionRef proc)
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/AssignmentFormPanel.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/AssignmentFormPanel.java 2008-12-04 07:38:17 UTC (rev 3191)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/AssignmentFormPanel.java 2008-12-04 09:21:44 UTC (rev 3192)
@@ -228,4 +228,9 @@
ConsoleLog.error("Request failed" ,e1);
}
}
+
+ public void onReset()
+ {
+ formPanel.getForm().reset();
+ }
}
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskDetailsFormPanel.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskDetailsFormPanel.java 2008-12-04 07:38:17 UTC (rev 3191)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskDetailsFormPanel.java 2008-12-04 09:21:44 UTC (rev 3192)
@@ -268,4 +268,9 @@
{
// ignore
}
+
+ public void onReset()
+ {
+ formPanel.getForm().reset();
+ }
}
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/ModelChangeListener.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/ModelChangeListener.java 2008-12-04 07:38:17 UTC (rev 3191)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/ModelChangeListener.java 2008-12-04 09:21:44 UTC (rev 3192)
@@ -31,4 +31,5 @@
{
void onModelChange(ModelListenerRegistry parent, Object changeEvent);
void onRecordChange(ModelListenerRegistry parent, Record record);
+ void onReset();
}
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/ModelListenerRegistry.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/ModelListenerRegistry.java 2008-12-04 07:38:17 UTC (rev 3191)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/ModelListenerRegistry.java 2008-12-04 09:21:44 UTC (rev 3192)
@@ -63,6 +63,14 @@
}
}
+ public void fireResetEvent()
+ {
+ for(ModelChangeListener l : listeners)
+ {
+ l.onReset();
+ }
+ }
+
public Object getUnderlying()
{
return underlying;
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/RemoteListView.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/RemoteListView.java 2008-12-04 07:38:17 UTC (rev 3191)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/RemoteListView.java 2008-12-04 09:21:44 UTC (rev 3192)
@@ -301,6 +301,7 @@
{
ConsoleLog.debug("Reload " + this.getId());
store.load(0,PAGE_SIZE);
+
}
public void setRowSelectionModel(RowSelectionModel rowSelectionModel)
Modified: projects/gwt-console/trunk/war/src/main/resources/org/jboss/bpm/console/public/console.css
===================================================================
--- projects/gwt-console/trunk/war/src/main/resources/org/jboss/bpm/console/public/console.css 2008-12-04 07:38:17 UTC (rev 3191)
+++ projects/gwt-console/trunk/war/src/main/resources/org/jboss/bpm/console/public/console.css 2008-12-04 09:21:44 UTC (rev 3192)
@@ -28,6 +28,11 @@
height:100%;
}
+.bpm-label {
+ font-family: sans-serif;
+ font-size: small;
+}
+
.bpm-ListHeaderRow {
font-weight: bold;
}
More information about the jbpm-commits
mailing list