]> source.dussan.org Git - vaadin-framework.git/commitdiff
More changes
authorPetter Holmström <petter.holmstrom@itmill.com>
Tue, 3 Nov 2009 07:42:31 +0000 (07:42 +0000)
committerPetter Holmström <petter.holmstrom@itmill.com>
Tue, 3 Nov 2009 07:42:31 +0000 (07:42 +0000)
svn changeset:9592/svn branch:portlet_2.0

src/com/vaadin/Application.java
src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java
src/com/vaadin/terminal/gwt/client/ApplicationConnection.java

index ca86467e04dffc787ed565d9dc8f4d7ed2f13287..bea366307dd69e5a4b5e77a055370d91f8dc764b 100644 (file)
@@ -119,6 +119,11 @@ public abstract class Application implements URIHandler,
      */
     private URL applicationUrl;
 
+    /**
+     * The ID of the portlet window that this application runs in.
+     */
+    private String portletWindowId;
+    
     /**
      * Name of the theme currently used by the application.
      */
@@ -181,6 +186,16 @@ public abstract class Application implements URIHandler,
      */
     private Terminal.ErrorListener errorHandler = this;
 
+    // TODO Document me!
+    public String getPortletWindowId() {
+        return portletWindowId;
+    }
+    
+    // TODO Document me!
+    public void setPortletWindowId(String portletWindowId) {
+        this.portletWindowId = portletWindowId;
+    }
+    
     /**
      * <p>
      * Gets a window by name. Returns <code>null</code> if the application is
index b4ea4cafffc3c538aa44e3c9188d99d5acda7639..f5df828a2c2a9ebdaa366feab2629b967fa4d863 100644 (file)
@@ -25,7 +25,7 @@ public class ApplicationConfiguration {
     private String communicationErrorUrl;
     private boolean useDebugIdInDom = true;
     private boolean usePortletURLs = false;
-    private String portletActionURLBase;
+    private String portletUidlURLBase;
 
     private Class<? extends Paintable>[] classes = new Class[1024];
 
@@ -36,8 +36,8 @@ public class ApplicationConfiguration {
         return usePortletURLs;
     }
     
-    public String getPortletActionURLBase() {
-        return portletActionURLBase;
+    public String getPortletUidlURLBase() {
+        return portletUidlURLBase;
     }
     
     public String getRootPanelId() {
@@ -91,7 +91,7 @@ public class ApplicationConfiguration {
         if($wnd.vaadin.vaadinConfigurations && $wnd.vaadin.vaadinConfigurations[id]) {
             var jsobj = $wnd.vaadin.vaadinConfigurations[id];
             var uri = jsobj.appUri;
-            if(uri[uri.length -1] != "/") {
+            if(uri != null && uri[uri.length -1] != "/") {
                 uri = uri + "/";
             }
             this.@com.vaadin.terminal.gwt.client.ApplicationConfiguration::appUri = uri;
@@ -114,8 +114,8 @@ public class ApplicationConfiguration {
             if (jsobj.usePortletURLs) {
                 this.@com.vaadin.terminal.gwt.client.ApplicationConfiguration::usePortletURLs = jsobj.usePortletURLs;
             }
-            if (jsobj.portletActionURLBase) {
-                this.@com.vaadin.terminal.gwt.client.ApplicationConfiguration::portletActionURLBase = jsobj.portletActionURLBase;
+            if (jsobj.portletUidlURLBase) {
+                this.@com.vaadin.terminal.gwt.client.ApplicationConfiguration::portletUidlURLBase = jsobj.portletUidlURLBase;
             }
         } else {
             $wnd.alert("Vaadin app failed to initialize: " + this.id);
index 1b1a3ee9e97d45f8979b9cdcca5a56e32a0d785e..4719b0cbd319a00830823705a6c9dc5d04a4c6b6 100755 (executable)
@@ -307,7 +307,7 @@ public class ApplicationConnection {
         console.log("Making UIDL Request with params: " + rd);
         String uri;
         if (configuration.usePortletURLs()) {
-            uri = configuration.getPortletActionURLBase() + "&UIDL=true";
+            uri = configuration.getPortletUidlURLBase();
         } else {
             uri = getAppUri() + "UIDL" + configuration.getPathInfo();
         }