Author: [email protected]
Date: Fri Jan 30 16:50:42 2009
New Revision: 4600

Modified:
     
releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java
     
releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.java

Log:
Build fix: moved where GWT.getModuleBaseURL() is called to accomodate use  
from the Showcase generator.

Review by: rdayal, jlabanca (TBR)


Modified:  
releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java
==============================================================================
---  
releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java
       
(original)
+++  
releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java
       
Fri Jan 30 16:50:42 2009
@@ -15,6 +15,7 @@
   */
  package com.google.gwt.sample.showcase.client;

+import com.google.gwt.core.client.GWT;
  import com.google.gwt.event.logical.shared.SelectionEvent;
  import com.google.gwt.event.logical.shared.SelectionHandler;
  import com.google.gwt.http.client.Request;
@@ -292,7 +293,7 @@
        vPanel.add(widget);
      }
      onInitializeComplete();
-
+
      return deckPanel;
    }

@@ -309,7 +310,7 @@
    /**
     * Load the contents of a remote file into the specified widget.
     *
-   * @param url the URL of the file relative to the source directory in  
public
+   * @param url a partial path relative to the module base URL
     * @param target the target Widget to place the contents
     * @param callback the callback when the call completes
     */
@@ -317,14 +318,16 @@
        final RequestCallback callback) {
      // Show the loading image
      if (loadingImage == null) {
-      loadingImage = "<img src=\"images/loading.gif\">";
+      loadingImage = "<img src=\"" + GWT.getModuleBaseURL()
+          + "images/loading.gif\">";
      }
      target.setDirection(HasDirection.Direction.LTR);
      DOM.setStyleAttribute(target.getElement(), "textAlign", "left");
      target.setHTML("&nbsp;&nbsp;" + loadingImage);

      // Request the contents of the file
-    RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, url);
+    RequestBuilder builder = new RequestBuilder(RequestBuilder.GET,
+        GWT.getModuleBaseURL() + url);
      RequestCallback realCallback = new RequestCallback() {
        public void onError(Request request, Throwable exception) {
          target.setHTML("Cannot find resource");

Modified:  
releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.java
==============================================================================
---  
releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.java
   
(original)
+++  
releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.java
   
Fri Jan 30 16:50:42 2009
@@ -15,7 +15,6 @@
   */
  package com.google.gwt.sample.showcase.client;

-import com.google.gwt.core.client.GWT;
  import com.google.gwt.i18n.client.Constants;
  import  
com.google.gwt.sample.showcase.client.content.i18n.CwConstantsExample;
  import  
com.google.gwt.sample.showcase.client.content.i18n.CwConstantsWithLookupExample;
@@ -80,7 +79,7 @@
    /**
     * The path to source code for examples, raw files, and style  
definitions.
     */
-  String DST_SOURCE = GWT.getModuleBaseURL() + "gwtShowcaseSource/";
+  String DST_SOURCE = "gwtShowcaseSource/";

    /**
     * The destination folder for parsed source code from Showcase examples.

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to