incubator-ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r791501 - in /incubator/ace/trunk/webui: ./ .settings/ lib/ lib/gwt/ src/ src/org/ src/org/apache/ src/org/apache/ace/ src/org/apache/ace/client/ src/org/apache/ace/server/ war/ war/WEB-INF/ war/WEB-INF/lib/
Date Mon, 06 Jul 2009 14:49:38 GMT
Author: marrs
Date: Mon Jul  6 14:49:36 2009
New Revision: 791501

URL: http://svn.apache.org/viewvc?rev=791501&view=rev
Log:
ACE-24 Initial import of (still non-interesting) web UI. This commits contains the GWT jars
necessary to be able to build, but for development purposes, you should install the GWT plugin
in eclipse.

Added:
    incubator/ace/trunk/webui/.classpath   (with props)
    incubator/ace/trunk/webui/.project   (with props)
    incubator/ace/trunk/webui/.settings/
    incubator/ace/trunk/webui/.settings/com.google.appengine.eclipse.core.prefs   (with props)
    incubator/ace/trunk/webui/.settings/com.google.gdt.eclipse.core.prefs   (with props)
    incubator/ace/trunk/webui/.settings/com.google.gwt.eclipse.core.prefs   (with props)
    incubator/ace/trunk/webui/README.txt   (with props)
    incubator/ace/trunk/webui/build.xml   (with props)
    incubator/ace/trunk/webui/lib/
    incubator/ace/trunk/webui/lib/gwt/
    incubator/ace/trunk/webui/lib/gwt/gwt-dev-mac.jar   (with props)
    incubator/ace/trunk/webui/lib/gwt/gwt-servlet.jar   (with props)
    incubator/ace/trunk/webui/lib/gwt/gwt-user.jar   (with props)
    incubator/ace/trunk/webui/src/
    incubator/ace/trunk/webui/src/org/
    incubator/ace/trunk/webui/src/org/apache/
    incubator/ace/trunk/webui/src/org/apache/ace/
    incubator/ace/trunk/webui/src/org/apache/ace/client/
    incubator/ace/trunk/webui/src/org/apache/ace/client/GreetingService.java   (with props)
    incubator/ace/trunk/webui/src/org/apache/ace/client/GreetingServiceAsync.java   (with
props)
    incubator/ace/trunk/webui/src/org/apache/ace/client/webui.java   (with props)
    incubator/ace/trunk/webui/src/org/apache/ace/server/
    incubator/ace/trunk/webui/src/org/apache/ace/server/GreetingServiceImpl.java   (with props)
    incubator/ace/trunk/webui/src/org/apache/ace/webui.gwt.xml   (with props)
    incubator/ace/trunk/webui/war/
    incubator/ace/trunk/webui/war/WEB-INF/
    incubator/ace/trunk/webui/war/WEB-INF/lib/
    incubator/ace/trunk/webui/war/WEB-INF/lib/gwt-servlet.jar   (with props)
    incubator/ace/trunk/webui/war/WEB-INF/web.xml   (with props)
    incubator/ace/trunk/webui/war/webui.css   (with props)
    incubator/ace/trunk/webui/war/webui.html   (with props)
    incubator/ace/trunk/webui/webui.launch   (with props)

Added: incubator/ace/trunk/webui/.classpath
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/webui/.classpath?rev=791501&view=auto
==============================================================================
--- incubator/ace/trunk/webui/.classpath (added)
+++ incubator/ace/trunk/webui/.classpath Mon Jul  6 14:49:36 2009
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/liq"/>
+	<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
+	<classpathentry kind="output" path="war/WEB-INF/classes"/>
+</classpath>

Propchange: incubator/ace/trunk/webui/.classpath
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/ace/trunk/webui/.project
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/webui/.project?rev=791501&view=auto
==============================================================================
--- incubator/ace/trunk/webui/.project (added)
+++ incubator/ace/trunk/webui/.project Mon Jul  6 14:49:36 2009
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>webui</name>
+	<comment>webui project</comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.google.gdt.eclipse.core.webAppProjectValidator</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.google.gwt.eclipse.core.gwtProjectValidator</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>com.google.gdt.eclipse.core.webAppNature</nature>
+		<nature>com.google.gwt.eclipse.core.gwtNature</nature>
+	</natures>
+</projectDescription>

Propchange: incubator/ace/trunk/webui/.project
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/ace/trunk/webui/.settings/com.google.appengine.eclipse.core.prefs
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/webui/.settings/com.google.appengine.eclipse.core.prefs?rev=791501&view=auto
==============================================================================
--- incubator/ace/trunk/webui/.settings/com.google.appengine.eclipse.core.prefs (added)
+++ incubator/ace/trunk/webui/.settings/com.google.appengine.eclipse.core.prefs Mon Jul  6
14:49:36 2009
@@ -0,0 +1,3 @@
+#Mon Jul 06 16:29:56 CEST 2009
+eclipse.preferences.version=1
+filesCopiedToWebInfLib=

Propchange: incubator/ace/trunk/webui/.settings/com.google.appengine.eclipse.core.prefs
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/ace/trunk/webui/.settings/com.google.gdt.eclipse.core.prefs
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/webui/.settings/com.google.gdt.eclipse.core.prefs?rev=791501&view=auto
==============================================================================
--- incubator/ace/trunk/webui/.settings/com.google.gdt.eclipse.core.prefs (added)
+++ incubator/ace/trunk/webui/.settings/com.google.gdt.eclipse.core.prefs Mon Jul  6 14:49:36
2009
@@ -0,0 +1,3 @@
+#Mon Jul 06 16:41:31 CEST 2009
+eclipse.preferences.version=1
+jarsExcludedFromWebInfLib=

Propchange: incubator/ace/trunk/webui/.settings/com.google.gdt.eclipse.core.prefs
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/ace/trunk/webui/.settings/com.google.gwt.eclipse.core.prefs
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/webui/.settings/com.google.gwt.eclipse.core.prefs?rev=791501&view=auto
==============================================================================
--- incubator/ace/trunk/webui/.settings/com.google.gwt.eclipse.core.prefs (added)
+++ incubator/ace/trunk/webui/.settings/com.google.gwt.eclipse.core.prefs Mon Jul  6 14:49:36
2009
@@ -0,0 +1,5 @@
+#Mon Jul 06 16:41:35 CEST 2009
+eclipse.preferences.version=1
+entryPointModules=
+filesCopiedToWebInfLib=gwt-servlet.jar
+gwtCompileSettings=PGd3dC1jb21waWxlLXNldHRpbmdzPjxsb2ctbGV2ZWw+SU5GTzwvbG9nLWxldmVsPjxvdXRwdXQtc3R5bGU+T0JGVVNDQVRFRDwvb3V0cHV0LXN0eWxlPjxleHRyYS1hcmdzPjwhW0NEQVRBW11dPjwvZXh0cmEtYXJncz48dm0tYXJncz48IVtDREFUQVstWG14NTEybV1dPjwvdm0tYXJncz48L2d3dC1jb21waWxlLXNldHRpbmdzPg\=\=

Propchange: incubator/ace/trunk/webui/.settings/com.google.gwt.eclipse.core.prefs
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/ace/trunk/webui/README.txt
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/webui/README.txt?rev=791501&view=auto
==============================================================================
--- incubator/ace/trunk/webui/README.txt (added)
+++ incubator/ace/trunk/webui/README.txt Mon Jul  6 14:49:36 2009
@@ -0,0 +1,62 @@
+--- Generated by GWT WebAppCreator ---
+
+Congratulations, you've successfully generated a starter project!  What next?
+
+-- Option A: Import your project into Eclipse (recommended) --
+
+If you use Eclipse, you can simply import the generated project into Eclipse.
+We've tested against Eclipse 3.3 and 3.4.  Later versions will likely also
+work, earlier versions may not.
+
+In Eclipse, go to the File menu and choose:
+
+  File -> Import... -> Existing Projects into Workspace
+
+  Browse to the directory containing this file,
+  select "webui".
+  
+  Be sure to uncheck "Copy projects into workspace" if it is checked.
+  
+  Click Finish.
+  
+You can now browse the project in Eclipse.
+
+To launch your web app in GWT hosted mode, go to the Run menu and choose:
+
+  Run -> Open Debug Dialog...
+
+  Under Java Application, you should find a launch configuration
+  named "webui".  Select and click "Debug".
+
+  You can now use the built-in debugger to debug your web app in hosted mode.
+
+To compile for web mode, just run your app in hosted mode and press the
+"Compile/Browse" button.
+
+-- Option B: Build from the command line with Ant --
+
+If you prefer to work from the command line, you can use Ant to build your
+project. (http://ant.apache.org/)  Ant uses the generated 'build.xml' file
+which describes exactly how to build your project.  This file has been tested
+to work against Ant 1.7.1.  The following assumes 'ant' is on your command
+line path.
+
+To run hosted mode, just type 'ant hosted'.
+
+To compile your project for deployment, just type 'ant'.
+
+To compile and also bundle into a .war file, type 'ant war'.
+
+For a full listing of other targets, type 'ant -p'.
+
+-- Option C: Using another IDE --
+
+GWT projects can be run in other IDEs as well, but will require some manual
+setup.  If you go this route, be sure to:
+
+* Have your IDE build .class files into 'war/WEB-INF/classes'.
+* Add gwt-user.jar and gwt-dev-<platform>.jar to your project build path.
+* When creating a launch configuration, add a classpath entry for your 'src'
+  folder (this is somewhat unusual but GWT needs access to your source files).
+
+If you get stuck, try to mimic what the Ant 'build.xml' would do.

Propchange: incubator/ace/trunk/webui/README.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/ace/trunk/webui/build.xml
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/webui/build.xml?rev=791501&view=auto
==============================================================================
--- incubator/ace/trunk/webui/build.xml (added)
+++ incubator/ace/trunk/webui/build.xml Mon Jul  6 14:49:36 2009
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<project name="webui" default="build" basedir=".">
+    <taskdef resource="net/sf/antcontrib/antlib.xml" classpath="../liq/lib/ant-contrib-1.0b3.jar"
/>
+  <!-- Configure path to GWT SDK -->
+    <property name="gwt.sdk" location="../webui/lib/gwt" />
+
+  <path id="project.class.path">
+    <pathelement location="war/WEB-INF/classes"/>
+    <pathelement location="${gwt.sdk}/gwt-user.jar"/>
+    <fileset dir="${gwt.sdk}" includes="gwt-dev*.jar"/>
+    <!-- Add any additional non-server libs (such as JUnit) -->
+    <fileset dir="war/WEB-INF/lib" includes="**/*.jar"/>
+  </path>
+
+  <target name="libs" description="Copy libs to WEB-INF/lib">
+    <mkdir dir="war/WEB-INF/lib" />
+    <copy todir="war/WEB-INF/lib" file="${gwt.sdk}/gwt-servlet.jar" />
+    <!-- Add any additional server libs that need to be copied -->
+  </target>
+
+  <target name="javac" depends="libs" description="Compile java source">
+    <mkdir dir="war/WEB-INF/classes"/>
+    <javac srcdir="src" includes="**" encoding="utf-8"
+        destdir="war/WEB-INF/classes"
+        source="1.5" target="1.5" nowarn="true"
+        debug="true" debuglevel="lines,vars,source">
+      <classpath refid="project.class.path"/>
+    </javac>
+    <copy todir="war/WEB-INF/classes">
+      <fileset dir="src" excludes="**/*.java"/>
+    </copy>
+  </target>
+
+  <target name="gwtc" depends="javac" description="GWT compile to JavaScript">
+    <java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
+      <classpath>
+        <pathelement location="src"/>
+        <path refid="project.class.path"/>
+      </classpath>
+      <!-- add jvmarg -Xss16M or similar if you see a StackOverflowError -->
+      <jvmarg value="-Xmx256M"/>
+<jvmarg value="-XstartOnFirstThread"/>
+      <!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
+      <arg value="org.apache.ace.webui"/>
+    </java>
+  </target>
+
+  <target name="hosted" depends="javac" description="Run hosted mode">
+    <java failonerror="true" fork="true" classname="com.google.gwt.dev.HostedMode">
+      <classpath>
+        <pathelement location="src"/>
+        <path refid="project.class.path"/>
+      </classpath>
+      <jvmarg value="-Xmx256M"/>
+<jvmarg value="-XstartOnFirstThread"/>
+      <arg value="-startupUrl"/>
+      <arg value="webui.html"/>
+      <!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
+      <arg value="org.apache.ace.webui"/>
+    </java>
+  </target>
+
+  <target name="build" depends="gwtc" description="Build this project" />
+
+  <target name="war" depends="build" description="Create a war file" unless="webui.uptodate">
+    <zip destfile="webui.war" basedir="war"/>
+  </target>
+
+  <target name="clean" description="Cleans this project">
+    <delete dir="war/WEB-INF/classes" failonerror="false" />
+    <delete dir="war/webui" failonerror="false" />
+  </target>
+
+</project>

Propchange: incubator/ace/trunk/webui/build.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/ace/trunk/webui/lib/gwt/gwt-dev-mac.jar
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/webui/lib/gwt/gwt-dev-mac.jar?rev=791501&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ace/trunk/webui/lib/gwt/gwt-dev-mac.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ace/trunk/webui/lib/gwt/gwt-servlet.jar
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/webui/lib/gwt/gwt-servlet.jar?rev=791501&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ace/trunk/webui/lib/gwt/gwt-servlet.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ace/trunk/webui/lib/gwt/gwt-user.jar
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/webui/lib/gwt/gwt-user.jar?rev=791501&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ace/trunk/webui/lib/gwt/gwt-user.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ace/trunk/webui/src/org/apache/ace/client/GreetingService.java
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/webui/src/org/apache/ace/client/GreetingService.java?rev=791501&view=auto
==============================================================================
--- incubator/ace/trunk/webui/src/org/apache/ace/client/GreetingService.java (added)
+++ incubator/ace/trunk/webui/src/org/apache/ace/client/GreetingService.java Mon Jul  6 14:49:36
2009
@@ -0,0 +1,12 @@
+package org.apache.ace.client;
+
+import com.google.gwt.user.client.rpc.RemoteService;
+import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
+
+/**
+ * The client side stub for the RPC service.
+ */
+@RemoteServiceRelativePath("greet")
+public interface GreetingService extends RemoteService {
+  String greetServer(String name);
+}

Propchange: incubator/ace/trunk/webui/src/org/apache/ace/client/GreetingService.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/ace/trunk/webui/src/org/apache/ace/client/GreetingServiceAsync.java
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/webui/src/org/apache/ace/client/GreetingServiceAsync.java?rev=791501&view=auto
==============================================================================
--- incubator/ace/trunk/webui/src/org/apache/ace/client/GreetingServiceAsync.java (added)
+++ incubator/ace/trunk/webui/src/org/apache/ace/client/GreetingServiceAsync.java Mon Jul
 6 14:49:36 2009
@@ -0,0 +1,10 @@
+package org.apache.ace.client;
+
+import com.google.gwt.user.client.rpc.AsyncCallback;
+
+/**
+ * The async counterpart of <code>GreetingService</code>.
+ */
+public interface GreetingServiceAsync {
+  void greetServer(String input, AsyncCallback<String> callback);
+}

Propchange: incubator/ace/trunk/webui/src/org/apache/ace/client/GreetingServiceAsync.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/ace/trunk/webui/src/org/apache/ace/client/webui.java
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/webui/src/org/apache/ace/client/webui.java?rev=791501&view=auto
==============================================================================
--- incubator/ace/trunk/webui/src/org/apache/ace/client/webui.java (added)
+++ incubator/ace/trunk/webui/src/org/apache/ace/client/webui.java Mon Jul  6 14:49:36 2009
@@ -0,0 +1,136 @@
+package org.apache.ace.client;
+
+import com.google.gwt.core.client.EntryPoint;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.event.dom.client.KeyCodes;
+import com.google.gwt.event.dom.client.KeyUpEvent;
+import com.google.gwt.event.dom.client.KeyUpHandler;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.DialogBox;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.RootPanel;
+import com.google.gwt.user.client.ui.TextBox;
+import com.google.gwt.user.client.ui.VerticalPanel;
+
+/**
+ * Entry point classes define <code>onModuleLoad()</code>.
+ */
+public class webui implements EntryPoint {
+  /**
+   * The message displayed to the user when the server cannot be reached or
+   * returns an error.
+   */
+  private static final String SERVER_ERROR = "An error occurred while "
+      + "attempting to contact the server. Please check your network "
+      + "connection and try again.";
+
+  /**
+   * Create a remote service proxy to talk to the server-side Greeting service.
+   */
+  private final GreetingServiceAsync greetingService = GWT.create(GreetingService.class);
+
+  /**
+   * This is the entry point method.
+   */
+  public void onModuleLoad() {
+    final Button sendButton = new Button("Send");
+    final TextBox nameField = new TextBox();
+    nameField.setText("GWT User");
+
+    // We can add style names to widgets
+    sendButton.addStyleName("sendButton");
+
+    // Add the nameField and sendButton to the RootPanel
+    // Use RootPanel.get() to get the entire body element
+    RootPanel.get("nameFieldContainer").add(nameField);
+    RootPanel.get("sendButtonContainer").add(sendButton);
+
+    // Focus the cursor on the name field when the app loads
+    nameField.setFocus(true);
+    nameField.selectAll();
+
+    // Create the popup dialog box
+    final DialogBox dialogBox = new DialogBox();
+    dialogBox.setText("Remote Procedure Call");
+    dialogBox.setAnimationEnabled(true);
+    final Button closeButton = new Button("Close");
+    // We can set the id of a widget by accessing its Element
+    closeButton.getElement().setId("closeButton");
+    final Label textToServerLabel = new Label();
+    final HTML serverResponseLabel = new HTML();
+    VerticalPanel dialogVPanel = new VerticalPanel();
+    dialogVPanel.addStyleName("dialogVPanel");
+    dialogVPanel.add(new HTML("<b>Sending name to the server:</b>"));
+    dialogVPanel.add(textToServerLabel);
+    dialogVPanel.add(new HTML("<br><b>Server replies:</b>"));
+    dialogVPanel.add(serverResponseLabel);
+    dialogVPanel.setHorizontalAlignment(VerticalPanel.ALIGN_RIGHT);
+    dialogVPanel.add(closeButton);
+    dialogBox.setWidget(dialogVPanel);
+
+    // Add a handler to close the DialogBox
+    closeButton.addClickHandler(new ClickHandler() {
+      public void onClick(ClickEvent event) {
+        dialogBox.hide();
+        sendButton.setEnabled(true);
+        sendButton.setFocus(true);
+      }
+    });
+
+    // Create a handler for the sendButton and nameField
+    class MyHandler implements ClickHandler, KeyUpHandler {
+      /**
+       * Fired when the user clicks on the sendButton.
+       */
+      public void onClick(ClickEvent event) {
+        sendNameToServer();
+      }
+
+      /**
+       * Fired when the user types in the nameField.
+       */
+      public void onKeyUp(KeyUpEvent event) {
+        if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
+          sendNameToServer();
+        }
+      }
+
+      /**
+       * Send the name from the nameField to the server and wait for a response.
+       */
+      private void sendNameToServer() {
+        sendButton.setEnabled(false);
+        String textToServer = nameField.getText();
+        textToServerLabel.setText(textToServer);
+        serverResponseLabel.setText("");
+        greetingService.greetServer(textToServer, new AsyncCallback<String>() {
+          public void onFailure(Throwable caught) {
+            // Show the RPC error message to the user
+            dialogBox.setText("Remote Procedure Call - Failure");
+            serverResponseLabel.addStyleName("serverResponseLabelError");
+            serverResponseLabel.setHTML(SERVER_ERROR);
+            dialogBox.center();
+            closeButton.setFocus(true);
+          }
+
+          public void onSuccess(String result) {
+            dialogBox.setText("Remote Procedure Call");
+            serverResponseLabel.removeStyleName("serverResponseLabelError");
+            serverResponseLabel.setHTML(result);
+            dialogBox.center();
+            closeButton.setFocus(true);
+          }
+        });
+      }
+    }
+
+    // Add a handler to send the name to the server
+    MyHandler handler = new MyHandler();
+    sendButton.addClickHandler(handler);
+    nameField.addKeyUpHandler(handler);
+  }
+}

Propchange: incubator/ace/trunk/webui/src/org/apache/ace/client/webui.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/ace/trunk/webui/src/org/apache/ace/server/GreetingServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/webui/src/org/apache/ace/server/GreetingServiceImpl.java?rev=791501&view=auto
==============================================================================
--- incubator/ace/trunk/webui/src/org/apache/ace/server/GreetingServiceImpl.java (added)
+++ incubator/ace/trunk/webui/src/org/apache/ace/server/GreetingServiceImpl.java Mon Jul 
6 14:49:36 2009
@@ -0,0 +1,19 @@
+package org.apache.ace.server;
+
+import org.apache.ace.client.GreetingService;
+import com.google.gwt.user.server.rpc.RemoteServiceServlet;
+
+/**
+ * The server side implementation of the RPC service.
+ */
+@SuppressWarnings("serial")
+public class GreetingServiceImpl extends RemoteServiceServlet implements
+    GreetingService {
+
+  public String greetServer(String input) {
+    String serverInfo = getServletContext().getServerInfo();
+    String userAgent = getThreadLocalRequest().getHeader("User-Agent");
+    return "Hello, " + input + "!<br><br>I am running " + serverInfo
+        + ".<br><br>It looks like you are using:<br>" + userAgent;
+  }
+}

Propchange: incubator/ace/trunk/webui/src/org/apache/ace/server/GreetingServiceImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/ace/trunk/webui/src/org/apache/ace/webui.gwt.xml
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/webui/src/org/apache/ace/webui.gwt.xml?rev=791501&view=auto
==============================================================================
--- incubator/ace/trunk/webui/src/org/apache/ace/webui.gwt.xml (added)
+++ incubator/ace/trunk/webui/src/org/apache/ace/webui.gwt.xml Mon Jul  6 14:49:36 2009
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.6.4//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.6.4/distro-source/core/src/gwt-module.dtd">
+<module rename-to='webui'>
+  <!-- Inherit the core Web Toolkit stuff.                        -->
+  <inherits name='com.google.gwt.user.User'/>
+
+  <!-- Inherit the default GWT style sheet.  You can change       -->
+  <!-- the theme of your GWT application by uncommenting          -->
+  <!-- any one of the following lines.                            -->
+  <inherits name='com.google.gwt.user.theme.standard.Standard'/>
+  <!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
+  <!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/>     -->
+
+  <!-- Other module inherits                                      -->
+
+  <!-- Specify the app entry point class.                         -->
+  <entry-point class='org.apache.ace.client.webui'/>
+</module>

Propchange: incubator/ace/trunk/webui/src/org/apache/ace/webui.gwt.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/ace/trunk/webui/war/WEB-INF/lib/gwt-servlet.jar
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/webui/war/WEB-INF/lib/gwt-servlet.jar?rev=791501&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ace/trunk/webui/war/WEB-INF/lib/gwt-servlet.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ace/trunk/webui/war/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/webui/war/WEB-INF/web.xml?rev=791501&view=auto
==============================================================================
--- incubator/ace/trunk/webui/war/WEB-INF/web.xml (added)
+++ incubator/ace/trunk/webui/war/WEB-INF/web.xml Mon Jul  6 14:49:36 2009
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app
+    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+    "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+
+  <!-- Default page to serve -->
+  <welcome-file-list>
+    <welcome-file>webui.html</welcome-file>
+  </welcome-file-list>
+  
+  <!-- Servlets -->
+  <servlet>
+    <servlet-name>greetServlet</servlet-name>
+    <servlet-class>org.apache.ace.server.GreetingServiceImpl</servlet-class>
+  </servlet>
+  
+  <servlet-mapping>
+    <servlet-name>greetServlet</servlet-name>
+    <url-pattern>/webui/greet</url-pattern>
+  </servlet-mapping>
+
+</web-app>

Propchange: incubator/ace/trunk/webui/war/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/ace/trunk/webui/war/webui.css
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/webui/war/webui.css?rev=791501&view=auto
==============================================================================
--- incubator/ace/trunk/webui/war/webui.css (added)
+++ incubator/ace/trunk/webui/war/webui.css Mon Jul  6 14:49:36 2009
@@ -0,0 +1,34 @@
+/** Add css rules here for your application. */
+
+
+/** Example rules used by the template application (remove for your app) */
+h1 {
+  font-size: 2em;
+  font-weight: bold;
+  color: #777777;
+  margin: 40px 0px 70px;
+  text-align: center;
+}
+
+.sendButton {
+  display: block;
+  font-size: 16pt;
+}
+
+/** Most GWT widgets already have a style name defined */
+.gwt-DialogBox {
+  width: 400px;
+}
+
+.dialogVPanel {
+  margin: 5px;
+}
+
+.serverResponseLabelError {
+  color: red;
+}
+
+/** Set ids using widget.getElement().setId("idOfElement") */
+#closeButton {
+  margin: 15px 6px 6px;
+}

Propchange: incubator/ace/trunk/webui/war/webui.css
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/ace/trunk/webui/war/webui.html
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/webui/war/webui.html?rev=791501&view=auto
==============================================================================
--- incubator/ace/trunk/webui/war/webui.html (added)
+++ incubator/ace/trunk/webui/war/webui.html Mon Jul  6 14:49:36 2009
@@ -0,0 +1,53 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!-- The HTML 4.01 Transitional DOCTYPE declaration-->
+<!-- above set at the top of the file will set     -->
+<!-- the browser's rendering engine into           -->
+<!-- "Quirks Mode". Replacing this declaration     -->
+<!-- with a "Standards Mode" doctype is supported, -->
+<!-- but may lead to some differences in layout.   -->
+
+<html>
+  <head>
+    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+
+    <!--                                                               -->
+    <!-- Consider inlining CSS to reduce the number of requested files -->
+    <!--                                                               -->
+    <link type="text/css" rel="stylesheet" href="webui.css">
+
+    <!--                                           -->
+    <!-- Any title is fine                         -->
+    <!--                                           -->
+    <title>Web Application Starter Project</title>
+    
+    <!--                                           -->
+    <!-- This script loads your compiled module.   -->
+    <!-- If you add any GWT meta tags, they must   -->
+    <!-- be added before this line.                -->
+    <!--                                           -->
+    <script type="text/javascript" language="javascript" src="webui/webui.nocache.js"></script>
+  </head>
+
+  <!--                                           -->
+  <!-- The body can have arbitrary html, or      -->
+  <!-- you can leave the body empty if you want  -->
+  <!-- to create a completely dynamic UI.        -->
+  <!--                                           -->
+  <body>
+
+    <!-- OPTIONAL: include this if you want history support -->
+    <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
+
+    <h1>Web Application Starter Project</h1>
+
+    <table align="center">
+      <tr>
+        <td colspan="2" style="font-weight:bold;">Please enter your name:</td>
       
+      </tr>
+      <tr>
+        <td id="nameFieldContainer"></td>
+        <td id="sendButtonContainer"></td>
+      </tr>
+    </table>
+  </body>
+</html>

Propchange: incubator/ace/trunk/webui/war/webui.html
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/ace/trunk/webui/webui.launch
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/webui/webui.launch?rev=791501&view=auto
==============================================================================
--- incubator/ace/trunk/webui/webui.launch (added)
+++ incubator/ace/trunk/webui/webui.launch Mon Jul  6 14:49:36 2009
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/webui/lib/gwt/gwt-dev-mac.jar"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry
containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER&quot; javaProject=&quot;webui&quot;
path=&quot;1&quot; type=&quot;4&quot;/&gt;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry
internalArchive=&quot;/webui/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry
id=&quot;org.eclipse.jdt.launching.classpathentry.defaultClasspath&quot;&gt;&#10;&lt;memento
project=&quot;webui&quot;/&gt;&#10;&lt;/runtimeClasspathEntry&gt;&#10;"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.HostedMode"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-startupUrl
webui.html&#10;org.apache.ace.webui"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="webui"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx256M&#10;-XstartOnFirstThread"/>
+</launchConfiguration>

Propchange: incubator/ace/trunk/webui/webui.launch
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message