Author: heiko.braun(a)jboss.com
Date: 2009-09-09 09:54:53 -0400 (Wed, 09 Sep 2009)
New Revision: 834
Added:
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/EventDetailView.java
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/LoadRecordAction.java
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/LoadRecordEvent.java
sam/trunk/sam/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/TwitterStatus.java
Modified:
sam/trunk/SAMM.iws
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/CVTView.java
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/HistoryView.java
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/LoadEvent.java
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/TwitterEditor.java
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/ValueTable.java
sam/trunk/console/server/war/src/main/java/org/jboss/bpm/console/server/CVTFacade.java
sam/trunk/sam/core/src/main/java/org/jboss/sam/cvt/SwapHandler.java
sam/trunk/sam/core/src/main/java/org/jboss/sam/cvt/internal/NoopSwapHandler.java
sam/trunk/sam/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/InMemorySwapHandler.java
Log:
Added record loading capabilities
Modified: sam/trunk/SAMM.iws
===================================================================
--- sam/trunk/SAMM.iws 2009-09-09 12:25:04 UTC (rev 833)
+++ sam/trunk/SAMM.iws 2009-09-09 13:54:53 UTC (rev 834)
@@ -87,7 +87,7 @@
</component>
<component name="DebuggerManager">
<line_breakpoints>
- <breakpoint
url="file://$PROJECT_DIR$/console/server/war/src/main/java/org/jboss/bpm/console/server/CVTFacade.java"
line="105" class="org.jboss.bpm.console.server.CVTFacade"
package="org.jboss.bpm.console.server">
+ <breakpoint
url="file://$PROJECT_DIR$/sam/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/InMemorySwapHandler.java"
line="52" class="org.jboss.sam.examples.twitter.InMemorySwapHandler"
package="org.jboss.sam.examples.twitter">
<option name="ENABLED" value="true" />
<option name="SUSPEND_POLICY" value="SuspendAll" />
<option name="LOG_ENABLED" value="false" />
@@ -100,7 +100,7 @@
<option name="CONDITION" value="" />
<option name="LOG_MESSAGE" value="" />
</breakpoint>
- <breakpoint
url="file://$PROJECT_DIR$/sam/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/InMemorySwapHandler.java"
line="45" class="org.jboss.sam.examples.twitter.InMemorySwapHandler"
package="org.jboss.sam.examples.twitter">
+ <breakpoint
url="file://$PROJECT_DIR$/console/server/war/src/main/java/org/jboss/bpm/console/server/CVTFacade.java"
line="138" class="org.jboss.bpm.console.server.CVTFacade"
package="org.jboss.bpm.console.server">
<option name="ENABLED" value="true" />
<option name="SUSPEND_POLICY" value="SuspendAll" />
<option name="LOG_ENABLED" value="false" />
@@ -184,7 +184,57 @@
</subPane>
</component>
<component name="FileEditorManager">
- <leaf />
+ <leaf>
+ <file leaf-file-name="CVTView.java" pinned="false"
current="false" current-in-tab="false">
+ <entry
file="file://$PROJECT_DIR$/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/CVTView.java">
+ <provider selected="true"
editor-type-id="text-editor">
+ <state line="113" column="45"
selection-start="3798" selection-end="3798"
vertical-scroll-proportion="0.64761907">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="EventDetailView.java" pinned="false"
current="false" current-in-tab="false">
+ <entry
file="file://$PROJECT_DIR$/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/EventDetailView.java">
+ <provider selected="true"
editor-type-id="text-editor">
+ <state line="35" column="13"
selection-start="1507" selection-end="1507"
vertical-scroll-proportion="0.28070176">
+ <folding>
+ <element signature="imports" expanded="true"
/>
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="LoadRecordAction.java" pinned="false"
current="false" current-in-tab="false">
+ <entry
file="file://$PROJECT_DIR$/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/LoadRecordAction.java">
+ <provider selected="true"
editor-type-id="text-editor">
+ <state line="53" column="0"
selection-start="1878" selection-end="1878"
vertical-scroll-proportion="0.62857145">
+ <folding>
+ <element signature="imports" expanded="true"
/>
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="ValueTable.java" pinned="false"
current="true" current-in-tab="true">
+ <entry
file="file://$PROJECT_DIR$/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/ValueTable.java">
+ <provider selected="true"
editor-type-id="text-editor">
+ <state line="75" column="4"
selection-start="2711" selection-end="2711"
vertical-scroll-proportion="-1.4380952">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="HistoryView.java" pinned="false"
current="false" current-in-tab="false">
+ <entry
file="file://$PROJECT_DIR$/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/HistoryView.java">
+ <provider selected="true"
editor-type-id="text-editor">
+ <state line="56" column="38"
selection-start="1847" selection-end="1847"
vertical-scroll-proportion="0.54269004">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ </leaf>
</component>
<component name="FindManager">
<FindUsagesManager>
@@ -1321,26 +1371,23 @@
</component>
<component name="RestoreUpdateTree" />
<component name="RunManager" selected="Remote.server">
- <tempConfiguration default="false" name="Runner"
type="Application" factoryName="Application" enabled="false"
merge="false">
- <option name="MAIN_CLASS_NAME"
value="org.jboss.bpm.console.server.Runner" />
+ <tempConfiguration default="false" name="TwitterStatus"
type="Application" factoryName="Application" enabled="false"
merge="false">
+ <option name="MAIN_CLASS_NAME"
value="org.jboss.sam.examples.twitter.TwitterStatus" />
<option name="VM_PARAMETERS" />
<option name="PROGRAM_PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$"
/>
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false"
/>
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
- <module name="server-war" />
+ <module name="twitter" />
<RunnerSettings RunnerId="Debug">
- <option name="DEBUG_PORT" value="62202" />
+ <option name="DEBUG_PORT" value="61799" />
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="true" />
</RunnerSettings>
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
- <method>
- <option name="Make" value="false" />
- </method>
</tempConfiguration>
<configuration default="true" type="Application"
factoryName="Application" enabled="false" merge="false">
<option name="MAIN_CLASS_NAME" />
@@ -1440,6 +1487,24 @@
<option name="Make" value="true" />
</method>
</configuration>
+ <configuration default="false" name="TwitterStatus"
type="Application" factoryName="Application" enabled="false"
merge="false">
+ <option name="MAIN_CLASS_NAME"
value="org.jboss.sam.examples.twitter.TwitterStatus" />
+ <option name="VM_PARAMETERS" />
+ <option name="PROGRAM_PARAMETERS" />
+ <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$"
/>
+ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false"
/>
+ <option name="ALTERNATIVE_JRE_PATH" />
+ <option name="ENABLE_SWING_INSPECTOR" value="false" />
+ <module name="twitter" />
+ <RunnerSettings RunnerId="Debug">
+ <option name="DEBUG_PORT" value="61799" />
+ <option name="TRANSPORT" value="0" />
+ <option name="LOCAL" value="true" />
+ </RunnerSettings>
+ <RunnerSettings RunnerId="Run" />
+ <ConfigurationWrapper RunnerId="Debug" />
+ <ConfigurationWrapper RunnerId="Run" />
+ </configuration>
<configuration name="<template>" type="WebApp"
default="true" selected="false">
<Host>localhost</Host>
<Port>5050</Port>
@@ -1521,25 +1586,25 @@
</component>
<component name="ToolWindowManager">
<frame x="301" y="30" width="1371"
height="1002" extended-state="0" />
- <editor active="false" />
+ <editor active="true" />
<layout>
<window_info id="UI Designer" active="false"
anchor="left" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.32922825"
order="3" />
<window_info id="CVS" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.33"
order="14" />
<window_info id="IDEtalk" active="false"
anchor="right" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.33"
order="3" />
<window_info id="TODO" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.33"
order="7" />
- <window_info id="Project" active="true"
anchor="left" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="true" weight="0.3517398"
order="0" />
+ <window_info id="Project" active="false"
anchor="left" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="true" weight="0.3517398"
order="0" />
<window_info id="Find" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.41878453"
order="1" />
<window_info id="Structure" active="false"
anchor="left" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.24432677"
order="1" />
- <window_info id="Messages" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.32908458"
order="9" />
+ <window_info id="Messages" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.3281768"
order="9" />
<window_info id="Inspection" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.4"
order="6" />
<window_info id="Module Dependencies" active="false"
anchor="right" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.33"
order="6" />
<window_info id="Dependency Viewer" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.33"
order="10" />
<window_info id="Palette" active="false"
anchor="right" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.18719211"
order="4" />
<window_info id="Ant Build" active="false"
anchor="right" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.25"
order="1" />
<window_info id="Changes" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.32791728"
order="11" />
- <window_info id="Run" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.57937425"
order="2" />
+ <window_info id="Run" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.57900554"
order="2" />
<window_info id="Maven" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.33"
order="12" />
- <window_info id="Hierarchy" active="false"
anchor="right" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.24691358"
order="2" />
+ <window_info id="Hierarchy" active="false"
anchor="right" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.24659607"
order="2" />
<window_info id="File View" active="false"
anchor="right" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.33"
order="5" />
<window_info id="Debug" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.39116022"
order="4" />
<window_info id="Commander" active="false"
anchor="right" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.4"
order="0" />
@@ -1631,105 +1696,113 @@
<option name="myLastEditedConfigurable" />
</component>
<component name="editorHistoryManager">
- <entry
file="file://$PROJECT_DIR$/sam/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java">
+ <entry
file="file://$PROJECT_DIR$/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/LoadEvent.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="271" column="4"
selection-start="7922" selection-end="7922"
vertical-scroll-proportion="0.2761905">
+ <state line="26" column="6"
selection-start="1136" selection-end="1136"
vertical-scroll-proportion="0.112280704">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/sam/core/src/main/java/org/jboss/sam/cvt/CVTOutput.java">
+ <entry
file="file://$PROJECT_DIR$/sam/core/src/main/java/org/jboss/sam/cvt/SwapHandler.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="49" column="43"
selection-start="1717" selection-end="1717"
vertical-scroll-proportion="0.17660819">
+ <state line="34" column="20"
selection-start="1367" selection-end="1367"
vertical-scroll-proportion="0.24327485">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/sam/core/src/main/java/org/jboss/sam/cvt/internal/DefaultCVT.java">
+ <entry
file="file://$PROJECT_DIR$/sam/core/src/main/java/org/jboss/sam/cvt/internal/NoopSwapHandler.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="117" column="47"
selection-start="3260" selection-end="3260"
vertical-scroll-proportion="0.85730994">
+ <state line="54" column="28"
selection-start="1853" selection-end="1853"
vertical-scroll-proportion="0.60952383">
<folding />
</state>
</provider>
</entry>
<entry
file="file://$PROJECT_DIR$/sam/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/InMemorySwapHandler.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="48" column="69"
selection-start="1625" selection-end="1625"
vertical-scroll-proportion="0.44912282">
+ <state line="93" column="28"
selection-start="2479" selection-end="2479"
vertical-scroll-proportion="0.7754386">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/console/server/war/src/main/java/org/jboss/bpm/console/server/CVTFacade.java">
+ <entry
file="file://$PROJECT_DIR$/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/TwitterEditor.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="100" column="50"
selection-start="3005" selection-end="3005"
vertical-scroll-proportion="1.0666667">
+ <state line="50" column="9"
selection-start="2030" selection-end="2030"
vertical-scroll-proportion="0.33684212">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/console/gui/war/src/main/java/org/jboss/bpm/console/client/SettingsEditorNavigation.java">
+ <entry
file="file://$PROJECT_DIR$/console/server/war/src/main/java/org/jboss/bpm/console/server/CVTFacade.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="30" column="6"
selection-start="1274" selection-end="1274"
vertical-scroll-proportion="0.1497076">
+ <state line="158" column="43"
selection-start="4237" selection-end="4237"
vertical-scroll-proportion="0.5660819">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/console/gui/war/src/main/java/org/jboss/bpm/console/client/SettingsEditor.java">
+ <entry
file="file://$PROJECT_DIR$/sam/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/TwitterStatus.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="130" column="75"
selection-start="4122" selection-end="4184"
vertical-scroll-proportion="0.6952381">
- <folding />
+ <state line="44" column="18"
selection-start="1522" selection-end="1522"
vertical-scroll-proportion="0.44912282">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/console/gui/war/src/main/resources/org/jboss/bpm/console/public/images/red.png">
- <provider selected="true" editor-type-id="images">
- <state />
+ <entry
file="file://$PROJECT_DIR$/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/HistoryView.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="56" column="38"
selection-start="1847" selection-end="1847"
vertical-scroll-proportion="0.54269004">
+ <folding />
+ </state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/console/gui/war/src/main/resources/org/jboss/bpm/console/public/images/loading.gif">
- <provider selected="true" editor-type-id="images">
- <state />
+ <entry
file="file://$PROJECT_DIR$/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/CVTView.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="113" column="45"
selection-start="3798" selection-end="3798"
vertical-scroll-proportion="0.64761907">
+ <folding />
+ </state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/CVTView.java">
+ <entry
file="file://$PROJECT_DIR$/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/EventDetailView.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="98" column="0"
selection-start="3153" selection-end="3153"
vertical-scroll-proportion="0.12631579">
+ <state line="35" column="13"
selection-start="1507" selection-end="1507"
vertical-scroll-proportion="0.28070176">
<folding>
- <element signature="class#2531:3045" expanded="false"
/>
+ <element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/HistoryView.java">
+ <entry
file="file://$PROJECT_DIR$/console/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="43" column="35"
selection-start="1640" selection-end="1640"
vertical-scroll-proportion="0.28070176">
+ <state line="37" column="13"
selection-start="1552" selection-end="1552"
vertical-scroll-proportion="-1.5047619">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/console/gui/war/src/main/java/org/jboss/bpm/console/client/icons/ConsoleIconBundle.java">
+ <entry
file="file://$PROJECT_DIR$/console/gui/war/src/main/java/org/jboss/bpm/console/client/Application.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="134" column="48"
selection-start="3283" selection-end="3283"
vertical-scroll-proportion="0.7380117">
+ <state line="96" column="46"
selection-start="3412" selection-end="3768"
vertical-scroll-proportion="0.68187135">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/ValueTable.java">
+ <entry
file="file://$PROJECT_DIR$/console/gui/war/src/main/java/org/jboss/bpm/console/client/Header.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="49" column="14"
selection-start="1879" selection-end="1879"
vertical-scroll-proportion="0.2857143">
+ <state line="39" column="13"
selection-start="1626" selection-end="1626"
vertical-scroll-proportion="-0.83809525">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/console/gui/war/src/main/resources/org/jboss/bpm/console/public/console.css">
+ <entry
file="file://$PROJECT_DIR$/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/LoadRecordAction.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="35" column="43"
selection-start="502" selection-end="502"
vertical-scroll-proportion="0.65497077">
- <folding />
+ <state line="53" column="0"
selection-start="1878" selection-end="1878"
vertical-scroll-proportion="0.62857145">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/console/gui/war/src/main/java/org/jboss/bpm/console/client/Header.java">
+ <entry
file="file://$PROJECT_DIR$/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/ValueTable.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="117" column="47"
selection-start="4269" selection-end="4269"
vertical-scroll-proportion="0.53333336">
+ <state line="75" column="4"
selection-start="2711" selection-end="2711"
vertical-scroll-proportion="-1.4380952">
<folding />
</state>
</provider>
Modified:
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/CVTView.java
===================================================================
---
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/CVTView.java 2009-09-09
12:25:04 UTC (rev 833)
+++
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/CVTView.java 2009-09-09
13:54:53 UTC (rev 834)
@@ -23,6 +23,7 @@
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.user.client.ui.TextBox;
import com.googlecode.gchart.client.GChart;
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
@@ -58,7 +59,7 @@
private HistoryView history;
private boolean initialzed;
-
+
public CVTView(String tableName)
{
super(new BoxLayout(BoxLayout.Orientation.VERTICAL));
@@ -97,12 +98,25 @@
this.add(chart, new BoxLayoutData(BoxLayoutData.FillStyle.VERTICAL));
chart.update();
- this.currentValues = new ValueTable("Current Events");
- this.add(currentValues, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
+ // -----
+ LayoutPanel comparisonPanel = new LayoutPanel(new
BoxLayout(BoxLayout.Orientation.HORIZONTAL));
+ this.currentValues = new ValueTable("Current Events", controller);
+ comparisonPanel.add(currentValues, new
BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
+
this.history = new HistoryView();
- controller.addView(HistoryView.ID, this.history);
+ controller.addView(HistoryView.ID, this.history);
+ this.history.initialize();
+ comparisonPanel.add(history, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
+ this.add(comparisonPanel, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
+
+ // ------
+
+ EventDetailView detailView = new EventDetailView();
+ controller.addView(EventDetailView.ID, detailView);
+ this.add(detailView);
+
this.initialzed = true;
currentValues.highlight();
}
Added:
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/EventDetailView.java
===================================================================
---
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/EventDetailView.java
(rev 0)
+++
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/EventDetailView.java 2009-09-09
13:54:53 UTC (rev 834)
@@ -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.sam;
+
+import org.gwt.mosaic.ui.client.layout.LayoutPanel;
+import org.gwt.mosaic.ui.client.layout.BoxLayout;
+import org.gwt.mosaic.ui.client.layout.BoxLayoutData;
+import org.gwt.mosaic.ui.client.Label;
+import com.mvc4g.client.ViewInterface;
+import com.mvc4g.client.Controller;
+import com.google.gwt.user.client.ui.TextBox;
+import com.google.gwt.user.client.ui.TextArea;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class EventDetailView extends LayoutPanel implements ViewInterface
+{
+
+ public final static String ID = EventDetailView.class.getName();
+
+ private TextArea textBox;
+
+ public EventDetailView()
+ {
+ super(new BoxLayout(BoxLayout.Orientation.VERTICAL));
+
+ this.add(new Label("Event details"));
+ this.textBox = new TextArea();
+ this.textBox.setVisibleLines(5);
+ this.textBox.setCharacterWidth(60);
+ this.add(textBox, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
+ }
+
+ public void setController(Controller controller)
+ {
+ //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public void update(String text)
+ {
+ textBox.setText(text);
+ }
+}
Modified:
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/HistoryView.java
===================================================================
---
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/HistoryView.java 2009-09-09
12:25:04 UTC (rev 833)
+++
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/HistoryView.java 2009-09-09
13:54:53 UTC (rev 834)
@@ -26,31 +26,48 @@
import com.google.gwt.user.client.WindowCloseListener;
import org.gwt.mosaic.ui.client.layout.LayoutPanel;
import org.gwt.mosaic.ui.client.WindowPanel;
+import org.jboss.bpm.console.client.LazyPanel;
import java.util.List;
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-public class HistoryView extends LayoutPanel implements ViewInterface
+public class HistoryView extends LayoutPanel implements ViewInterface, LazyPanel
{
public final static String ID = HistoryView.class.getName();
private ValueTable valueTable;
private Controller controller;
- private WindowPanel window;
+ //private WindowPanel window;
+ private boolean initialized;
public HistoryView()
{
super();
- this.valueTable = new ValueTable("Past events");
- this.add(valueTable);
- this.window = createSnapshotWindow();
+ }
+ public boolean isInitialized()
+ {
+ return initialized;
}
+ public void initialize()
+ {
+ if(!initialized)
+ {
+ this.valueTable = new ValueTable("Past events", controller);
+ this.add(valueTable);
+ //this.window = createSnapshotWindow();
+
+ valueTable.highlight();
+
+ this.initialized = true;
+ }
+ }
+
/**
* The 'layout' window panel.
*/
@@ -86,6 +103,6 @@
public void update(String snapshotId, List<List<String>> results)
{
this.valueTable.update(snapshotId, results);
- window.show();
+ //window.show();
}
}
Modified:
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/LoadEvent.java
===================================================================
---
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/LoadEvent.java 2009-09-09
12:25:04 UTC (rev 833)
+++
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/LoadEvent.java 2009-09-09
13:54:53 UTC (rev 834)
@@ -24,7 +24,7 @@
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-public final class LoadEvent
+public class LoadEvent
{
String table;
String snapshot;
Added:
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/LoadRecordAction.java
===================================================================
---
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/LoadRecordAction.java
(rev 0)
+++
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/LoadRecordAction.java 2009-09-09
13:54:53 UTC (rev 834)
@@ -0,0 +1,65 @@
+/*
+ * 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.sam;
+
+import com.google.gwt.http.client.RequestBuilder;
+import com.google.gwt.http.client.Response;
+import com.google.gwt.http.client.URL;
+import com.mvc4g.client.Controller;
+import org.jboss.bpm.console.client.common.AbstractRESTAction;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class LoadRecordAction extends AbstractRESTAction
+{
+
+ public final static String ID = LoadRecordAction.class.getName();
+
+ public String getId()
+ {
+ return ID;
+ }
+
+ public String getUrl(Object event)
+ {
+ LoadRecordEvent lre = (LoadRecordEvent)event;
+
+ String baseURL = appContext.getConfig().getConsoleServerUrl();
+ String url = baseURL + "/rs/cvt/table/details?table=" +
URL.encode(lre.table);
+ url += "&snapshot="+lre.snapshot;
+ url += "&record="+lre.recordId;
+
+ return url;
+ }
+
+ public RequestBuilder.Method getRequestMethod()
+ {
+ return RequestBuilder.GET;
+ }
+
+ public void handleSuccessfulResponse(final Controller controller, final Object event,
Response response)
+ {
+ EventDetailView view = (EventDetailView)controller.getView(EventDetailView.ID);
+ view.update(response.getText());
+ }
+}
Added:
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/LoadRecordEvent.java
===================================================================
---
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/LoadRecordEvent.java
(rev 0)
+++
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/LoadRecordEvent.java 2009-09-09
13:54:53 UTC (rev 834)
@@ -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.sam;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class LoadRecordEvent extends LoadEvent
+{
+
+ public String recordId;
+
+ public LoadRecordEvent(String table, String snapshot)
+ {
+ super(table, snapshot);
+ }
+}
Modified:
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/TwitterEditor.java
===================================================================
---
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/TwitterEditor.java 2009-09-09
12:25:04 UTC (rev 833)
+++
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/TwitterEditor.java 2009-09-09
13:54:53 UTC (rev 834)
@@ -48,7 +48,7 @@
private ToggleButton toggle;
private DecoratedTabLayoutPanel tabPanel;
- private static final String TABLE_NAME = "iran results";
+ public static final String TABLE_NAME = "iran results";
public TwitterEditor(ApplicationContext appContext)
{
@@ -68,6 +68,7 @@
// action and view
controller.addAction(CurrentSnapshotAction.ID, new CurrentSnapshotAction());
controller.addAction(LoadSnapshotAction.ID, new LoadSnapshotAction());
+ controller.addAction(LoadRecordAction.ID, new LoadRecordAction());
// --------------
Modified:
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/ValueTable.java
===================================================================
---
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/ValueTable.java 2009-09-09
12:25:04 UTC (rev 833)
+++
sam/trunk/console/gui/war/src/main/java/org/jboss/bpm/console/client/sam/ValueTable.java 2009-09-09
13:54:53 UTC (rev 834)
@@ -21,22 +21,25 @@
*/
package org.jboss.bpm.console.client.sam;
-import org.gwt.mosaic.ui.client.layout.LayoutPanel;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.Command;
+import com.google.gwt.user.client.Timer;
+import com.google.gwt.user.client.ui.ChangeListener;
+import com.google.gwt.user.client.ui.Image;
+import com.google.gwt.user.client.ui.Widget;
+import com.mvc4g.client.Controller;
+import com.mvc4g.client.Event;
+import org.gwt.mosaic.ui.client.Label;
+import org.gwt.mosaic.ui.client.ListBox;
+import org.gwt.mosaic.ui.client.PopupMenu;
import org.gwt.mosaic.ui.client.layout.BoxLayout;
import org.gwt.mosaic.ui.client.layout.BoxLayoutData;
-import org.gwt.mosaic.ui.client.ListBox;
-import org.gwt.mosaic.ui.client.Label;
+import org.gwt.mosaic.ui.client.layout.LayoutPanel;
import org.gwt.mosaic.ui.client.list.DefaultListModel;
import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
import java.util.List;
-import com.google.gwt.user.client.ui.ChangeListener;
-import com.google.gwt.user.client.ui.Widget;
-import com.google.gwt.user.client.ui.Image;
-import com.google.gwt.user.client.Timer;
-import com.google.gwt.core.client.GWT;
-
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
@@ -46,11 +49,16 @@
private String snapshotId;
private Image reload;
+ private List<List<String>> currentModel;
- public ValueTable(String title)
+ private Controller controller;
+
+ public ValueTable(String title, Controller controller)
{
super(new BoxLayout(BoxLayout.Orientation.VERTICAL));
+ this.controller = controller;
+
LayoutPanel imgContainer = new LayoutPanel(new
BoxLayout(BoxLayout.Orientation.HORIZONTAL));
imgContainer.setHeight("16px");
@@ -63,18 +71,19 @@
this.listBox = createListBox();
this.add(listBox, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
-
+
}
public String getSnapshotId()
{
return snapshotId;
}
-
+
public void update(String snapshotId, List<List<String>> results)
{
this.snapshotId = snapshotId;
-
+ this.currentModel = results;
+
// update listbox model
final DefaultListModel<List<String>> model =
(DefaultListModel<List<String>>) listBox.getModel();
@@ -146,6 +155,43 @@
}
});
+ listBox.setContextMenu(createContextMenu());
+
return listBox;
}
+
+ private PopupMenu createContextMenu()
+ {
+ Command cmd = new Command()
+ {
+ public void execute()
+ {
+ int index = listBox.getSelectedIndex();
+ String recordId = currentModel.get(index).get(2);
+
+ LoadRecordEvent meta = new LoadRecordEvent(TwitterEditor.TABLE_NAME,
snapshotId);
+ meta.recordId = recordId;
+
+ controller.handleEvent(
+ new Event(LoadRecordAction.ID,
+ meta
+ )
+ );
+
+ //InfoPanel.show("Selection", recordId);
+ }
+ };
+
+ PopupMenu contextMenu = new PopupMenu();
+
+ contextMenu.addItem("View Details", cmd);
+
+ /*contextMenu.addSeparator();
+
+ contextMenu.addItem("MenuItem 3", cmd);
+ contextMenu.addItem("MenuItem 4", cmd);
+ */
+ return contextMenu;
+ }
+
}
Modified:
sam/trunk/console/server/war/src/main/java/org/jboss/bpm/console/server/CVTFacade.java
===================================================================
---
sam/trunk/console/server/war/src/main/java/org/jboss/bpm/console/server/CVTFacade.java 2009-09-09
12:25:04 UTC (rev 833)
+++
sam/trunk/console/server/war/src/main/java/org/jboss/bpm/console/server/CVTFacade.java 2009-09-09
13:54:53 UTC (rev 834)
@@ -74,19 +74,15 @@
@Path("table/current")
@Produces("application/json")
@RsComment(
- title = "CVT values by table name",
+ title = "Current Values",
description = "Access current table values")
public Response getCurrentCVT(
@QueryParam("table")
String tableId
)
{
- String decodedKey = URLDecoder.decode(tableId);
- CVT cvt = getMonitor().getCVTRegistry().lookupCVT(decodedKey);
- if(null==cvt)
- throw new IllegalArgumentException("No CVT for key "+decodedKey);
-
- CVTSnapshot snapshot = cvt.snapshot();
+ CVT cvt = getCVT(tableId);
+ CVTSnapshot snapshot = cvt.snapshot();
return parseCVTTable(snapshot);
}
@@ -94,7 +90,7 @@
@Path("table/load")
@Produces("application/json")
@RsComment(
- title = "Access CVT history",
+ title = "Previous snapshots",
description = "Access stored table values")
public Response loadCVT(
@QueryParam("table")
@@ -103,10 +99,7 @@
String snapshotId
)
{
- String decodedKey = URLDecoder.decode(tableId);
- CVT cvt = getMonitor().getCVTRegistry().lookupCVT(decodedKey);
- if(null==cvt)
- throw new IllegalArgumentException("No CVT for key "+decodedKey);
+ CVT cvt = getCVT(tableId);
if(cvt.getSwapHandler().maintains(snapshotId)==false)
{
@@ -114,12 +107,42 @@
}
else
{
- CVTSnapshot snapshot = cvt.getSwapHandler().load(snapshotId);
+ CVTSnapshot snapshot = cvt.getSwapHandler().load(snapshotId);
return parseCVTTable(snapshot);
}
}
+ private CVT getCVT(String tableId)
+ {
+ String decodedKey = URLDecoder.decode(tableId);
+ CVT cvt = getMonitor().getCVTRegistry().lookupCVT(decodedKey);
+ if(null==cvt)
+ throw new IllegalArgumentException("No CVT for key "+decodedKey);
+ return cvt;
+ }
+
@GET
+ @Path("table/details")
+ @Produces("text/plain")
+ @RsComment(
+ title = "Fetch details",
+ description = "Access CVT record details")
+ public Response loadCVT(
+ @QueryParam("table")
+ String tableId,
+ @QueryParam("snapshot")
+ String snapshotId,
+ @QueryParam("record")
+ String record
+ )
+ {
+ CVT cvt = getCVT(tableId);
+ Object o = cvt.getSwapHandler().loadContent(record);
+ return Response.ok(o).build();
+ }
+
+
+ @GET
@Path("registry/keys")
@Produces("application/json")
@RsComment(
@@ -159,7 +182,7 @@
converted
);
- Gson gson = GsonFactory.createInstance();
+ Gson gson = GsonFactory.createInstance();
//Type mapType = new TypeToken<List<Map<String, String>>>()
{}.getType();
String json = gson.toJson(jsonModel);
return Response.ok(json).type("application/json").build();
Modified: sam/trunk/sam/core/src/main/java/org/jboss/sam/cvt/SwapHandler.java
===================================================================
--- sam/trunk/sam/core/src/main/java/org/jboss/sam/cvt/SwapHandler.java 2009-09-09
12:25:04 UTC (rev 833)
+++ sam/trunk/sam/core/src/main/java/org/jboss/sam/cvt/SwapHandler.java 2009-09-09
13:54:53 UTC (rev 834)
@@ -60,4 +60,12 @@
* @return true if the snapshot can be loaded
*/
boolean maintains(String snapshotId);
+
+ /**
+ * Load record contents
+ *
+ * @param recordId
+ * @return a content represenation
+ */
+ Object loadContent(String recordId);
}
Modified:
sam/trunk/sam/core/src/main/java/org/jboss/sam/cvt/internal/NoopSwapHandler.java
===================================================================
---
sam/trunk/sam/core/src/main/java/org/jboss/sam/cvt/internal/NoopSwapHandler.java 2009-09-09
12:25:04 UTC (rev 833)
+++
sam/trunk/sam/core/src/main/java/org/jboss/sam/cvt/internal/NoopSwapHandler.java 2009-09-09
13:54:53 UTC (rev 834)
@@ -50,4 +50,10 @@
{
return false; // stateless
}
+
+
+ public Object loadContent(String recordId)
+ {
+ return null;
+ }
}
Modified:
sam/trunk/sam/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/InMemorySwapHandler.java
===================================================================
---
sam/trunk/sam/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/InMemorySwapHandler.java 2009-09-09
12:25:04 UTC (rev 833)
+++
sam/trunk/sam/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/InMemorySwapHandler.java 2009-09-09
13:54:53 UTC (rev 834)
@@ -25,7 +25,6 @@
import org.jboss.sam.cvt.SwapHandler;
import java.util.LinkedList;
-import java.util.List;
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
@@ -37,6 +36,14 @@
private final static int MAX_SNAPSHOTS = 50;
+ private TwitterStatus status;
+
+
+ public InMemorySwapHandler()
+ {
+ this.status = new TwitterStatus();
+ }
+
public void store(CVTSnapshot snapshot)
{
synchronized(buffer)
@@ -83,4 +90,10 @@
{
return internalLoad(snapshotId, false)!=null;
}
+
+ public Object loadContent(String recordId)
+ {
+ // doesn't require the snapshotId
+ return status.load(recordId);
+ }
}
Added:
sam/trunk/sam/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/TwitterStatus.java
===================================================================
---
sam/trunk/sam/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/TwitterStatus.java
(rev 0)
+++
sam/trunk/sam/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/TwitterStatus.java 2009-09-09
13:54:53 UTC (rev 834)
@@ -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.sam.examples.twitter;
+
+import twitter4j.Twitter;
+import twitter4j.Status;
+import twitter4j.TwitterException;
+import org.jboss.logging.Logger;
+
+/**
+ * Simple helper to fetch tweets.
+ *
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class TwitterStatus
+{
+ private final static Logger log = Logger.getLogger(TwitterStatus.class);
+
+ private Twitter twitter;
+
+ public TwitterStatus()
+ {
+ this.twitter = new Twitter("hlan", "sam2000");
+ }
+
+ public String load(String id)
+ {
+ String text = "";
+ try
+ {
+ Status st = twitter.show(Long.valueOf(id));
+ text = st.getText();
+ }
+ catch (TwitterException e)
+ {
+ log.error("Failed to retrieve status", e);
+ }
+
+ return text;
+ }
+}