portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msnickl...@apache.org
Subject [2/6] portals-pluto git commit: Removes @author tags from portlet API source files. Improved JSdoc comments for JavaScript API. worked on portlet-api POM file to add creation of jar files for the sources and API documentation. Created two versions of the
Date Wed, 02 Nov 2016 14:19:03 GMT
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/ff6efc18/portlet-api/src/main/javascript/portlet.js
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/javascript/portlet.js b/portlet-api/src/main/javascript/portlet.js
index be21b85..5a2fe12 100644
--- a/portlet-api/src/main/javascript/portlet.js
+++ b/portlet-api/src/main/javascript/portlet.js
@@ -339,7 +339,8 @@ var portlet = portlet || {};
          this.windowState = s.windowState;
          if (s.parameters) {
             for (n in s.parameters) {
-               if (s.parameters.hasOwnProperty(n) && Array.isArray(s.parameters[n])) {
+               if (s.parameters.hasOwnProperty(n)
+                     && Array.isArray(s.parameters[n])) {
                   this.parameters[n] = s.parameters[n].slice(0);
                }
             }
@@ -375,7 +376,8 @@ var portlet = portlet || {};
          throw new TypeError('Parameter name must be a string');
       }
       if (typeof value !== 'string' && value !== null && !Array.isArray(value)) {
-         throw new TypeError('Parameter value must be a string, an array, or null');
+         throw new TypeError(
+               'Parameter value must be a string, an array, or null');
       }
       var val = value;
       if (!Array.isArray(value)) {
@@ -443,8 +445,8 @@ var portlet = portlet || {};
     *
     * @typedef    PortletData
     * @property   {RenderState} state       The current RenderState object
-    * @property   {string[]}     pubParms    String array declaring the public
-    *                                        parameters for the portlet
+    * @property {string[]} pubParms String array declaring the public parameters
+    *           for the portlet
     * @property   {RenderData}   renderData  Render data for the portlet
     * @private
     */
@@ -565,8 +567,7 @@ var portlet = portlet || {};
    handleCtr = 0,                         // used to generate handles returned by addEventListener
 
    /**
-    * The internal data structure for managing listeners and the 
-    * update queue.
+    * The internal data structure for managing listeners and the update queue.
     * 
     * @typedef  QueueData
     * @property {String}      handle   The listener handle
@@ -648,8 +649,7 @@ var portlet = portlet || {};
          if (list[handle].id === pid) {
             delete list[handle];
          } else {
-            throwAccessDeniedException("Invalid handle for portlet ID="
-                  + pid);
+            throwAccessDeniedException("Invalid handle for portlet ID=" + pid);
          }
          return true;
       }
@@ -679,7 +679,7 @@ var portlet = portlet || {};
       // add the listener
       var hand = "handle-" + (++handleCtr);
 
-      console.log("addSystemListener, handle="+hand+", pid="+pid);
+      console.log("addSystemListener, handle=" + hand + ", pid=" + pid);
 
       list[hand] = {
                      handle   : hand,
@@ -728,8 +728,8 @@ var portlet = portlet || {};
 
 
    /**
-    * Sends an onError event to all registered error event handlers for a
-    * given portlet.
+    * Sends an onError event to all registered error event handlers for a given
+    * portlet.
     * 
     * @param {string}
     *            pid The portletID
@@ -798,7 +798,7 @@ var portlet = portlet || {};
          if (oscListeners.hasOwnProperty(handle)) {
             qdata = oscListeners[handle];
             if (qdata.id === pid) {
-               for (ii=0; ii < updateQueue.length; ii++) {
+               for (ii = 0; ii < updateQueue.length; ii++) {
             	   if (updateQueue[ii].handle == handle) {
             		   dup = true;
             		   break;
@@ -806,8 +806,9 @@ var portlet = portlet || {};
                }
                if (dup === false) {
             	  updateQueue.push(qdata);
-           	      console.log("Queued update: handle=" + qdata.handle + ", pid=" + qdata.id+
-               		   ", Queue length=" + updateQueue.length)
+                  console.log("Queued update: handle=" + qdata.handle
+                        + ", pid=" + qdata.id + ", Queue length="
+                        + updateQueue.length)
                }
             }
          }
@@ -831,8 +832,8 @@ var portlet = portlet || {};
                // onStateChange function
                qdata = updateQueue.shift();
 
-               console.log("Dispatch update: handle=" + qdata.handle + ", pid=" + qdata.id +
-            		   ", Queue length=" + updateQueue.length);
+               console.log("Dispatch update: handle=" + qdata.handle + ", pid="
+                     + qdata.id + ", Queue length=" + updateQueue.length);
 
                pi = _registeredPortlets[qdata.id];
 
@@ -841,8 +842,8 @@ var portlet = portlet || {};
                callback = qdata.callback;
 
                if ((data !== undefined) && (data !== null)
-                     && (data.renderData !== undefined)
-                     && (data.renderData !== null)) {
+                     && (data.content !== undefined)
+                     && (data.content !== null)) {
                   callback("portlet.onStateChange", state, data);
                } else {
                   callback("portlet.onStateChange", state);
@@ -921,8 +922,8 @@ var portlet = portlet || {};
     * to be used by the Portlet Hub impl in order to initiate an unsolicited
     * state update for the input list of portlet IDs.
     *
-    * @returns {Promise} fulfilled with the actual upddate function when the
-    *          hub is not busy.
+    * @returns {Promise} fulfilled with the actual upddate function when the hub
+    *          is not busy.
     *
     * @private
     */
@@ -943,8 +944,8 @@ var portlet = portlet || {};
    /**
     * Updates the render state, taking the public render parameters into
     * account. The portlet client requesting the change, represented by the
-    * supplied portelt ID, is updated, along with each portlet that has a
-    * public render parameter update.
+    * supplied portelt ID, is updated, along with each portlet that has a public
+    * render parameter update.
     * 
     * @param {string}
     *            pid The portlet ID
@@ -1002,8 +1003,8 @@ var portlet = portlet || {};
     *            minParms The minimum number of arguments
     * @param {number}
     *            maxParms The maximum number of arguments. If this value is
-    *            undefined, the function can take any number of arguments
-    *            greater than numArgs
+    *           undefined, the function can take any number of arguments greater
+    *           than numArgs
     * @param {string[]}
     *            types An array containing the expected parameter types in the
     *            order of occurrance in the argument array
@@ -1014,7 +1015,8 @@ var portlet = portlet || {};
 
       // Check for the minimum number of arguments
       if (parms.length < minParms) {
-         throw new TypeError("Too few arguments provided. Number of arguments: "
+         throw new TypeError(
+               "Too few arguments provided. Number of arguments: "
                + parms.length);
 
          // check for maximum number of arguments
@@ -1029,17 +1031,16 @@ var portlet = portlet || {};
          var ii;
          for (ii = Math.min(parms.length, types.length) - 1; ii >= 0; ii = ii - 1) {
             if (typeof parms[ii] !== types[ii]) {
-               throw new TypeError("Parameter " + ii
-                     + " is of type " + (typeof parms[ii])
-                     + " rather than the expected type " + types[ii]);
+               throw new TypeError("Parameter " + ii + " is of type "
+                     + (typeof parms[ii]) + " rather than the expected type "
+                     + types[ii]);
             }
 
             // If checking for types, also make sure the arguments are
             // neither
             // null nor undefined.
             if ((parms[ii] === null) || (parms[ii] === undefined)) {
-               throw new TypeError("Argument is "
-                     + (typeof parms[ii]));
+               throw new TypeError("Argument is " + (typeof parms[ii]));
             }
          }
       }
@@ -1070,21 +1071,18 @@ var portlet = portlet || {};
 
       // check for null or undefined argument
       if ((parms === null) || (parms === undefined)) {
-         throw new TypeError("The parameters object is "
-               + (typeof parms));
+         throw new TypeError("The parameters object is " + (typeof parms));
       }
 
       for (parm in parms) {
          if (parms.hasOwnProperty(parm)) {
             if (Object.prototype.toString.call(parms[parm]) !== '[object Array]') {
-               throw new TypeError("Invalid parameters. The value of "
-                     + parm
-                     + " is "
-                     + Object.prototype.toString.call(parm)
+               throw new TypeError("Invalid parameters. The value of " + parm
+                     + " is " + Object.prototype.toString.call(parm)
                      + " rather than '[object Array]'");
             } else if (parms[parm].length === 0) {
-               throw new TypeError("Invalid parameters. The value of "
-                     + parm + " is " + "an array with length 0.");
+               throw new TypeError("Invalid parameters. The value of " + parm
+                     + " is " + "an array with length 0.");
             }
          }
       }
@@ -1132,8 +1130,8 @@ var portlet = portlet || {};
       } else {
          state.portletMode = state.portletMode.toLowerCase();
          if (!_isAllowedPM(pid, state.portletMode)) {
-            throw new TypeError("Invalid portletMode="
-               + state.portletMode + " is not in " + pi.getAllowedPM());
+            throw new TypeError("Invalid portletMode=" + state.portletMode
+                  + " is not in " + pi.getAllowedPM());
       }
       }
       
@@ -1146,8 +1144,8 @@ var portlet = portlet || {};
       } else {
          state.windowState = state.windowState.toLowerCase();
          if (!_isAllowedWS(pid, state.windowState)) {
-            throw new TypeError("Invalid windowState="
-               + state.windowState + " is not in " + pi.getAllowedWS());
+            throw new TypeError("Invalid windowState=" + state.windowState
+                  + " is not in " + pi.getAllowedWS());
       }
       }
 
@@ -1205,8 +1203,8 @@ var portlet = portlet || {};
     * Callback function that must be called after a partial action has been
     * started.
     * <p>
-    * The page state is generated by the portal and transmitted to the client
-    * by the portlet. The portlet client that initiated the partial action must
+    * The page state is generated by the portal and transmitted to the client by
+    * the portlet. The portlet client that initiated the partial action must
     * pass the page state string to this function.
     * <p>
     * The callback should only be called once to conclude a partial action
@@ -1250,15 +1248,15 @@ var portlet = portlet || {};
     * Registers a portlet client with the portlet hub.
     * <p>
     * The portlet client calling this method must provide a valid portlet ID.
-    * The portlet ID is identical to the unique namespace provided by the
-    * portal server for the portlet.
+    * The portlet ID is identical to the unique namespace provided by the portal
+    * server for the portlet.
     *
     * @param {string}
     *            portletId The unique portlet identifier
-    * @returns {Promise} A Promise object. Returns an {@link PortletInit}
-    *          object containing functions for use by the portlet client on
-    *          successful resolution. Returns an Error object containing a
-    *          descriptive message on failure.
+    * @returns {Promise} A Promise object. Returns an {@link PortletInit} object
+    *          containing functions for use by the portlet client on successful
+    *          resolution. Returns an Error object containing a descriptive
+    *          message on failure.
     */
    portlet.register = function(portletId) {
 
@@ -1268,9 +1266,9 @@ var portlet = portlet || {};
       checkArguments(arguments, 1, 1, [ 'string' ]);
 
       /**
-       * Dispatched to the implementation. The promise will be fulfilled as
-       * soon as the implementation has assembled the required information.
-       * From that point on it is valid to call into other functions on the
+       * Dispatched to the implementation. The promise will be fulfilled as soon
+       * as the implementation has assembled the required information. From that
+       * point on it is valid to call into other functions on the
        * implementation. These other functions as passed in as an argument
        */
       return portlet.impl
@@ -1282,133 +1280,122 @@ var portlet = portlet || {};
                            portletImpl);
 
                      /**
-                      * Keep track of the callback functions for our
-                      * portlets
+                      * Keep track of the callback functions for our portlets
                       */
                      _registeredPortlets[portletId] = portletImpl;
 
                      /**
-                      * Returned by the {@link portlet.register} method
-                      * to provide functions for use by the portlet
-                      * client.
+                      * Returned by the {@link portlet.register} method to
+                      * provide functions for use by the portlet client.
                       * 
                       * @namespace PortletInit
                       */
                      return {
          
             /**
-                         * A string array containing the portlet modes
-                         * that are defined for the portlet.
+                         * A string array containing the portlet modes that are
+                         * defined for the portlet.
              * <p>
-                         * Note that even if a portlet mode is defined,
-                         * it may not be allowed, depending on access
-                         * rights or other conditions.
+                         * Note that even if a portlet mode is defined, it may
+                         * not be allowed, depending on access rights or other
+                         * conditions.
              *
-                         * @property {string[]} portletModes The defined
-                         *           portlet mode values
+                         * @property {string[]} portletModes The defined portlet
+                         *           mode values
              * @memberOf         PortletInit
              */
             portletModes : portletImpl.getAllowedPM(),
          
             /**
-                         * A string array containing the window states
-                         * that are defined for the portlet.
+                         * A string array containing the window states that are
+                         * defined for the portlet.
              * <p>
-                         * Note that even if a window state is defined,
-                         * it may not be allowed, depending on access
-                         * rights or other conditions.
+                         * Note that even if a window state is defined, it may
+                         * not be allowed, depending on access rights or other
+                         * conditions.
              *
-                         * @property {string[]} windowStates The defined
-                         *           window state values
+                         * @property {string[]} windowStates The defined window
+                         *           state values
              * @memberOf         PortletInit
              */
             windowStates : portletImpl.getAllowedWS(),
          
             /**
-                         * Adds a listener function for specified event
-                         * type.
+                         * Adds a listener function for specified event type.
              * <p>
                          * The portlet hub defines two classes of events -
                          * System Events and Portlet Client events:
              * <dl>
              * <dt>System Events</dt>
-                         * <dd> Events that are generated by the portlet
-                         * hub. They are used to pass portlet-specific
-                         * information to the registered portlet client.
-                         * The parameters passed to the system event
-                         * callback functions are defined by the portlet
-                         * hub.
+                         * <dd> Events that are generated by the portlet hub.
+                         * They are used to pass portlet-specific information to
+                         * the registered portlet client. The parameters passed
+                         * to the system event callback functions are defined by
+                         * the portlet hub.
                          * <p>
-                         * Event types prefixed with "portlet." are
-                         * reserved for system events. System event
-                         * types may not be specified with a regular
-                         * expression or wildcard. However, the same
-                         * event listener may be added for both types of
-                         * system events.
+                         * Event types prefixed with "portlet." are reserved for
+                         * system events. System event types may not be
+                         * specified with a regular expression or wildcard.
+                         * However, the same event listener may be added for
+                         * both types of system events.
              * <p>
-                         * Only one listener for each type of system
-                         * event may be added.
+                         * Only one listener for each type of system event may
+                         * be added.
              * <p>
              * The following system event types are defined:
              * <dl>
              * <dt>portlet.onStateChange</dt>
-                         * <dd> Fired when the render state changes. In
-                         * order to participate in the portlet Ajax
-                         * support, a portlet client must register an
-                         * {@link onStateChange} event listener for this
-                         * event type.
+                         * <dd> Fired when the render state changes. In order to
+                         * participate in the portlet Ajax support, a portlet
+                         * client must register an {@link onStateChange} event
+                         * listener for this event type.
                          * <p>
-                         * After the portlet client adds an event
-                         * listener for the onStateChange event, the
-                         * portlet hub will call the onStateChange
-                         * callback function to provide the portlet
-                         * client with its initial state information.
-                         * However, this will not occur before the call
-                         * to addEventListener returns. </dd>
+                         * After the portlet client adds an event listener for
+                         * the onStateChange event, the portlet hub will call
+                         * the onStateChange callback function to provide the
+                         * portlet client with its initial state information.
+                         * However, this will not occur before the call to
+                         * addEventListener returns. </dd>
              * <dt>portlet.onError</dt>
-                         * <dd> Fired when an error occurs that cannot
-                         * be communicated through an exception. In
-                         * general, this will be some type of
-                         * asynchronous communication error. In order to
-                         * receive notification about errors, a portlet
-                         * must register an {@link onError} event
+                         * <dd> Fired when an error occurs that cannot be
+                         * communicated through an exception. In general, this
+                         * will be some type of asynchronous communication
+                         * error. In order to receive notification about errors,
+                         * a portlet must register an {@link onError} event
                          * listener for this event type. </dd>
              * </dl>
              * </dd>
              * <dt>Portlet Client Events</dt>
-                         * <dd> Events initiated by the portlet client
-                         * through the dispatch method.
+                         * <dd> Events initiated by the portlet client through
+                         * the dispatch method.
              * <p>
-                         * When adding a listener for a portlet client
-                         * event, the event type may be specified by a
-                         * regular expression string. The listener will
-                         * be called for every event type that the
-                         * regular expression string matches.
+                         * When adding a listener for a portlet client event,
+                         * the event type may be specified by a regular
+                         * expression string. The listener will be called for
+                         * every event type that the regular expression string
+                         * matches.
                          * <p>
                          * Example: <br>
-                         * myHub.addEventListener("^myCompany\..*",
-                         * myListener); // registers myListener for all
-                         * event types beginning with "myCompany." </dd>
+                         * myHub.addEventListener("^myCompany\..*", myListener); //
+                         * registers myListener for all event types beginning
+                         * with "myCompany." </dd>
              * </dl>
              * <p>
-                         * An event listener can be added for multiple
-                         * event types. This function returns a handle
-                         * to identify the unique listener for the event
-                         * type and for the portlet client associated
-                         * with the function.
+                         * An event listener can be added for multiple event
+                         * types. This function returns a handle to identify the
+                         * unique listener for the event type and for the
+                         * portlet client associated with the function.
                          * 
                          * @param {string}
                          *            type The type of listener
                          * @param {function}
-                         *            func Function called when event
-                         *            occurs
+                         *           func Function called when event occurs
              *
-                         * @returns {object} A handle that can be used
-                         *          to remove the event listener
+                         * @returns {object} A handle that can be used to remove
+                         *          the event listener
              *
                          * @throws {TypeError}
-                         *             Thrown if the input parameters
-                         *             are invalid
+                         *            Thrown if the input parameters are invalid
              *
              * @memberOf            PortletInit
              */
@@ -1429,7 +1416,8 @@ var portlet = portlet || {};
                               // portlet.onError event, throw
                               if ((type !== "portlet.onStateChange")
                                     && (type !== "portlet.onError")) {
-                                 throw new TypeError("The system event type is invalid: "
+                                 throw new TypeError(
+                                       "The system event type is invalid: "
                                        + type);
                   }
          
@@ -1447,8 +1435,8 @@ var portlet = portlet || {};
          
                               // will throw an exception if the
                               // listener has already been added
-                              handle = addSystemListener(listeners,
-                                    portletId, type, func);
+                              handle = addSystemListener(listeners, portletId,
+                                    type, func);
          
                               // If just added an onStateChange
                               // listener, update the state
@@ -1459,8 +1447,8 @@ var portlet = portlet || {};
                } else {
          
                   // Portlet client event listener
-                              handle = addPCListener(pcListeners,
-                                    portletId, type, func);
+                              handle = addPCListener(pcListeners, portletId,
+                                    type, func);
                }
          
                return handle;
@@ -1468,21 +1456,20 @@ var portlet = portlet || {};
          
             /**
                          * Removes a previously added listener function
-                         * designated by the handle. The handle must be
-                         * the same object previously returned by the
-                         * addEventListener function.
+                         * designated by the handle. The handle must be the same
+                         * object previously returned by the addEventListener
+                         * function.
                          * 
                          * @param {object}
-                         *            handle The handle of the listener
-                         *            to be removed
+                         *           handle The handle of the listener to be
+                         *           removed
              *
                          * @throws {TypeError}
-                         *             Thrown if the input parameters
-                         *             are invalid
+                         *            Thrown if the input parameters are invalid
              * @throws  {AccessDeniedException}
-                         *             Thrown if the event listener
-                         *             associated with this handle was
-                         *             registered by a different portlet
+                         *            Thrown if the event listener associated
+                         *            with this handle was registered by a
+                         *            different portlet
              *
              * @memberOf            PortletInit
              */
@@ -1493,8 +1480,7 @@ var portlet = portlet || {};
                checkArguments(arguments, 1, 1, []);
          
                // check for null or undefined argument
-                           if ((handle === null)
-                                 || (handle === undefined)) {
+                           if ((handle === null) || (handle === undefined)) {
                               throw new TypeError("The argument provided is "
                                     + (typeof handle));
                            }
@@ -1506,68 +1492,61 @@ var portlet = portlet || {};
                            // (or an exception will be thrown by
                            // removePCListener), so throw.
 
-                           if ((removePCListener(pcListeners,
+                           if ((removePCListener(pcListeners, portletId, handle) === false)
+                                 && (removeSystemListener(oscListeners,
                                  portletId, handle) === false)
-                                 && (removeSystemListener(
-                                       oscListeners, portletId,
-                                       handle) === false)
-                                 && (removeSystemListener(
-                                       oeListeners, portletId,
-                                       handle) === false)) {
+                                 && (removeSystemListener(oeListeners,
+                                       portletId, handle) === false)) {
          
-                              throw new TypeError("The event listener handle doesn't match any listeners.");
+                              throw new TypeError(
+                                    "The event listener handle doesn't match any listeners.");
                }
             },
          
             /**
-                         * Sets the render state, which consists of the
-                         * public and private render parameters, the
-                         * portlet mode, and the window state.
+                         * Sets the render state, which consists of the public
+                         * and private render parameters, the portlet mode, and
+                         * the window state.
                          * <p>
-                         * When the render state has been successfully
-                         * set, a copy of the render state will be
-                         * provided to the portlet client through the
-                         * {@link onStateChange} listener function. A
-                         * portlet client can modify this state object
-                         * and pass it to the setRenderState function to
-                         * update the render state.
+                         * When the render state has been successfully set, a
+                         * copy of the render state will be provided to the
+                         * portlet client through the {@link onStateChange}
+                         * listener function. A portlet client can modify this
+                         * state object and pass it to the setRenderState
+                         * function to update the render state.
                          * <p>
-                         * However, it is also possible for the portal
-                         * to completely refresh the page as a response
-                         * to setting the render state. This may occur
-                         * in order to support portlets on the page that
-                         * do not participate in the Portlet 3.0 Ajax
-                         * support or due to configuration settings, for
-                         * example.
+                         * However, it is also possible for the portal to
+                         * completely refresh the page as a response to setting
+                         * the render state. This may occur in order to support
+                         * portlets on the page that do not participate in the
+                         * Portlet 3.0 Ajax support or due to configuration
+                         * settings, for example.
                          * <p>
-                         * If the page is completely refreshed, it will
-                         * be rendered according to render parameters
-                         * set on the server.
+                         * If the page is completely refreshed, it will be
+                         * rendered according to render parameters set on the
+                         * server.
                          * <p>
-                         * Setting the render state is a blocking
-                         * operation. To allow for orderly state
-                         * transitions, the portlet hub does not allow
-                         * this function to be used while a blocking
-                         * operation is in progress. A blocking
-                         * operation is considered to be in progress
-                         * from the initial call until the final
-                         * onStateChange event for that operation has
-                         * been fired. See {@link portlet} for further
-                         * information.
+                         * Setting the render state is a blocking operation. To
+                         * allow for orderly state transitions, the portlet hub
+                         * does not allow this function to be used while a
+                         * blocking operation is in progress. A blocking
+                         * operation is considered to be in progress from the
+                         * initial call until the final onStateChange event for
+                         * that operation has been fired. See {@link portlet}
+                         * for further information.
              *
                          * @param {RenderState}
                          *            state The new state to be set
              *
                          * @throws {TypeError}
-                         *             Thrown if the input parameters
-                         *             are invalid
+                         *            Thrown if the input parameters are invalid
              * @throws  {AccessDeniedException}
-             *                   Thrown if a blocking operation is
-             *                   already in progress.
+                         *            Thrown if a blocking operation is already
+                         *            in progress.
              * @throws  {NotInitializedException}
-                         *             Thrown if a portlet ID is
-                         *             provided, but no onStateChange
-             *                   listener has been registered.
+                         *            Thrown if a portlet ID is provided, but no
+                         *            onStateChange listener has been
+                         *            registered.
              *
              * @memberOf   PortletInit
              */
@@ -1579,8 +1558,7 @@ var portlet = portlet || {};
                            // 'object'
                            // make sure an onStateChange listener is
                            // registered by providing portlet ID
-                           checkArguments(arguments, 1, 1,
-                                 [ 'object' ]);
+                           checkArguments(arguments, 1, 1, [ 'object' ]);
          
                            // validate render state & throw exception
                            // if incorrect
@@ -1594,71 +1572,61 @@ var portlet = portlet || {};
 
 
             /**
-                         * Returns a promise for a resource URL with
-                         * parameters set appropriately for the page
-                         * state according to the resource parameters,
-                         * cacheability option, and resource ID
-                         * provided.
+                         * Returns a promise for a resource URL with parameters
+                         * set appropriately for the page state according to the
+                         * resource parameters, cacheability option, and
+                         * resource ID provided.
                          * <p>
-                         * The portlet client may use the resource URL
-                         * with any appropriate javascript framework to
-                         * retrieve content from the portlet through the
-                         * server-side serveResource method.
+                         * The portlet client may use the resource URL with any
+                         * appropriate javascript framework to retrieve content
+                         * from the portlet through the server-side
+                         * serveResource method.
                          * <p>
-                         * Resource parameters are optional parameters
-                         * attached to a resource URL in addition to any
-                         * render state values that may be present.
-                         * Resource parameters do not influence the
-                         * render state.
+                         * Resource parameters are optional parameters attached
+                         * to a resource URL in addition to any render state
+                         * values that may be present. Resource parameters do
+                         * not influence the render state.
                          * <p>
-                         * The resource parameters must be an object
-                         * containing properties representing parameter
-                         * names whose values must be an array of string
-                         * values, as described under
-                         * {@link PortletParameters}. All of the
-                         * resource parameters will be attached to the
-                         * URL. Use of resource parameters is optional.
+                         * The resource parameters must be an object containing
+                         * properties representing parameter names whose values
+                         * must be an array of string values, as described under
+                         * {@link PortletParameters}. All of the resource
+                         * parameters will be attached to the URL. Use of
+                         * resource parameters is optional.
                          * <p>
-                         * The cacheability option designates the degree
-                         * to which the content to be served can be
-                         * cached and influences the type of content
-                         * that can be served. There are three possible
-                         * values:
+                         * The cacheability option designates the degree to
+                         * which the content to be served can be cached and
+                         * influences the type of content that can be served.
+                         * There are three possible values:
              * <dl>
                          * <dd>"full"</dd>
-                         * <dt> Most cacheable, because the URL contains
-                         * no portlet-specific or page-specific
-                         * information. </dt>
+                         * <dt> Most cacheable, because the URL contains no
+                         * portlet-specific or page-specific information. </dt>
                          * <dd>"portlet"</dd>
-                         * <dt> More cacheable, because the URL contains
-                         * only portlet-specific but no page-specific
-                         * information. </dt>
+                         * <dt> More cacheable, because the URL contains only
+                         * portlet-specific but no page-specific information.
+                         * </dt>
                          * <dd>"page"</dd>
                          * <dt> Least cacheable because the URL contains
-                         * portlet-specific and page-specific
-                         * information.
+                         * portlet-specific and page-specific information.
                          * <p>
-                         * However, cacheability must be set to "page"
-                         * if the content to be served contains portal
-                         * URLs. </dt>
+                         * However, cacheability must be set to "page" if the
+                         * content to be served contains portal URLs. </dt>
              * </dl>
              * <p>
-                         * Specification of cacheability is optional. If
-                         * the cacheability is not specified,
-                         * cacheability for the URL will be set to
-                         * "PAGE".
+                         * Specification of cacheability is optional. If the
+                         * cacheability is not specified, cacheability for the
+                         * URL will be set to "PAGE".
                          * <p>
-                         * The resource ID is an additional identifying
-                         * string that the resource serving method on
-                         * the server can use to determine the
-                         * information to be provided. The resource ID
-                         * argument is optional.
+                         * The resource ID is an additional identifying string
+                         * that the resource serving method on the server can
+                         * use to determine the information to be provided. The
+                         * resource ID argument is optional.
                          * <p>
-                         * The parameters must be provided in the
-                         * defined order. However, if a preceding
-                         * argument is not needed, it may be specified
-                         * as <code>null</code>. Examples of valid
-                         * calls: <code>
+                         * The parameters must be provided in the defined order.
+                         * However, if a preceding argument is not needed, it
+                         * may be specified as <code>null</code>. Examples of
+                         * valid calls: <code>
              * <br>createResourceUrl();
              * <br>createResourceUrl(resParams, cache);
                          * <br>createResourceUrl(resParams, cache, resid);
@@ -1668,30 +1636,26 @@ var portlet = portlet || {};
              * </code>
              *
                          * @param {PortletParameters}
-                         *            resParams Resource parameters to
-                         *            be added to the URL
+                         *           resParams Resource parameters to be added
+                         *           to the URL
                          * @param {string}
-                         *            cache Cacheability option. The
-                         *            strings defined under
-                         *            {@link PortletConstants} should be
-                         *            used to specifiy cacheability.
+                         *           cache Cacheability option. The strings
+                         *           defined under {@link PortletConstants}
+                         *           should be used to specifiy cacheability.
                          * @param {string}
                          *            resid Resource ID.
                          * 
-                         * @returns {Promise} A Promise object. Returns
-                         *          a string representing the resource
-                         *          URL on successful resolution.
-                         *          Returns an Error object containing a
-                         *          descriptive message on failure.
+                         * @returns {Promise} A Promise object. Returns a string
+                         *          representing the resource URL on successful
+                         *          resolution. Returns an Error object
+                         *          containing a descriptive message on failure.
              *
                          * @throws {TypeError}
-                         *             Thrown if the input parameters
-                         *             are invalid
+                         *            Thrown if the input parameters are invalid
              *
              * @memberOf   PortletInit
              */
-                        createResourceUrl : function(resParams, cache,
-                              resid) {
+                        createResourceUrl : function(resParams, cache, resid) {
                            var ii, arg, cacheability = null, pi, rid = null;
 
                            // check arguments. make sure there is a
@@ -1699,7 +1663,8 @@ var portlet = portlet || {};
                            // args and determine the types. Check
                            // values as possible.
                            if (arguments.length > 3) {
-                              throw new TypeError("Too many arguments. 3 arguments are allowed.");
+                              throw new TypeError(
+                                    "Too many arguments. 3 arguments are allowed.");
                            }
 
                            if (resParams) {
@@ -1710,7 +1675,8 @@ var portlet = portlet || {};
                                                       // are
                                                       // invalid
                               } else {
-                                 throw new TypeError("Invalid argument type. Resource parameters must be a parameters object.");
+                                 throw new TypeError(
+                                       "Invalid argument type. Resource parameters must be a parameters object.");
                               }
                }
          
@@ -1723,11 +1689,13 @@ var portlet = portlet || {};
                                     cacheability = cache;
                         break;
                      default:
-                                    throw new TypeError("Invalid cacheability argument: "
+                                    throw new TypeError(
+                                          "Invalid cacheability argument: "
                                           + cache);
                      }
                    } else {
-                                 throw new TypeError("Invalid argument type. Cacheability argument must be a string.");
+                                 throw new TypeError(
+                                       "Invalid argument type. Cacheability argument must be a string.");
                   }
                }
                
@@ -1740,7 +1708,8 @@ var portlet = portlet || {};
                               if (typeof resid === 'string') {
                                  rid = resid;
                               } else {
-                                 throw new TypeError("Invalid argument type. Resource ID argument must be a string.");
+                                 throw new TypeError(
+                                       "Invalid argument type. Resource ID argument must be a string.");
                               }
                            }
 
@@ -1751,142 +1720,130 @@ var portlet = portlet || {};
             },
          
             /**
-                         * Initiates a portlet action using the
-                         * specified action parameters and element
-             * arguments.
+                         * Initiates a portlet action using the specified action
+                         * parameters and element arguments.
              * <p>
-                         * When the action has successfully completed, a
-                         * copy of the render state will be provided to
-                         * the portlet client through the
-                         * {@link onStateChange} listener function. A
-                         * portlet client can modify this state object
-                         * and pass it to the setRenderState function to
+                         * When the action has successfully completed, a copy of
+                         * the render state will be provided to the portlet
+                         * client through the {@link onStateChange} listener
+                         * function. A portlet client can modify this state
+                         * object and pass it to the setRenderState function to
                          * update the render state.
                          * <p>
-                         * However, it is also possible for the portal
-                         * to completely refresh the page as a response
-                         * to the action. This may occur in order to
-                         * support portlets on the page that do not
-                         * participate in the Portlet 3.0 Ajax support
-                         * or due to configuration settings, for
-                         * example.
+                         * However, it is also possible for the portal to
+                         * completely refresh the page as a response to the
+                         * action. This may occur in order to support portlets
+                         * on the page that do not participate in the Portlet
+                         * 3.0 Ajax support or due to configuration settings,
+                         * for example.
                          * <p>
-                         * If the page is completely refreshed, it will
-                         * be rendered according to render parameters
-                         * set on the server.
+                         * If the page is completely refreshed, it will be
+                         * rendered according to render parameters set on the
+                         * server.
                          * <p>
-                         * Action parameters are optional parameters
-                         * attached to a action URL in addition to any
-                         * render state values that may be present.
-                         * Action parameters do not influence the render
-                         * state.
+                         * Action parameters are optional parameters attached to
+                         * a action URL in addition to any render state values
+                         * that may be present. Action parameters do not
+                         * influence the render state.
                          * <p>
-                         * The action parameters must be an object
-                         * containing properties representing parameter
-                         * names whose values must be an array of string
-                         * values, as described under
+                         * The action parameters must be an object containing
+                         * properties representing parameter names whose values
+                         * must be an array of string values, as described under
                          * {@link PortletParameters}. All of the action
-                         * parameters will be attached to the URL. Use
-                         * of action parameters is optional.
+                         * parameters will be attached to the URL. Use of action
+                         * parameters is optional.
                          * <p>
-                         * If the <code>element</code> argument is
-                         * present, it must refer to an HTML form to be
-                         * submitted. The portlet hub will use this form
-                         * to execute the action.
+                         * If the <code>element</code> argument is present, it
+                         * must refer to an HTML form to be submitted. The
+                         * portlet hub will use this form to execute the action.
                          * <p>
-                         * If the form element is specified, the
-                         * encoding type must be
-                         * 'application/x-www-form-urlencoded' or
-                         * 'multipart/form-data'. The encoding type
-                         * 'text/plain' is not supported.
+                         * If the form element is specified, the encoding type
+                         * must be 'application/x-www-form-urlencoded' or
+                         * 'multipart/form-data'. The encoding type 'text/plain'
+                         * is not supported.
                          * <p>
-                         * If the encoding type is
-                         * 'multipart/form-data', the submission method
-                         * must be 'POST'. Form 'INPUT' elements of type
-                         * 'FILE' are supported.
+                         * If the encoding type is 'multipart/form-data', the
+                         * submission method must be 'POST'. Form 'INPUT'
+                         * elements of type 'FILE' are supported.
                          * <p>
                          * If the encoding type is
-                         * 'application/x-www-form-urlencoded', the
-                         * submission method can be either 'GET' or
-                         * 'POST'. However, form 'INPUT' elements of
-                         * type 'FILE' are not supported.
+                         * 'application/x-www-form-urlencoded', the submission
+                         * method can be either 'GET' or 'POST'. However, form
+                         * 'INPUT' elements of type 'FILE' are not supported.
                          * <p>
-                         * Specification of <code>element</code> is
-                         * optional. If the <code>element</code> is
-                         * not specified, the portlet hub will submit
-                         * the action to the server by executing a
-                         * 'POST' with an action URL containing any
+                         * Specification of <code>element</code> is optional.
+                         * If the <code>element</code> is not specified, the
+                         * portlet hub will submit the action to the server by
+                         * executing a 'POST' with an action URL containing any
                          * action parameters provided.
                          * <p>
-                         * The parameters may be specified in either
-                         * order, individually, or not at all. Examples
-                         * of valid calls: <code>
+                         * The parameters may be specified in either order,
+                         * individually, or not at all. Examples of valid calls:
+                         * <code>
              * <br>action();
              * <br>action(actParams, element);
              * <br>action(actParams);
              * <br>action(element);
              * </code>
              * <p>
-                         * A portlet action is a blocking operation. To
-                         * allow for orderly state transitions, the
-                         * portlet hub does not allow this function to
-                         * be used while a blocking operation is in
-                         * progress. A blocking operation is considered
-                         * to be in progress from the initial call until
-                         * the final onStateChange event for that
-                         * operation has been fired. See {@link portlet}
-                         * for further information.
+                         * A portlet action is a blocking operation. To allow
+                         * for orderly state transitions, the portlet hub does
+                         * not allow this function to be used while a blocking
+                         * operation is in progress. A blocking operation is
+                         * considered to be in progress from the initial call
+                         * until the final onStateChange event for that
+                         * operation has been fired. See {@link portlet} for
+                         * further information.
              * <p>
              * 
              *
                          * @param {PortletParameters}
-                         *            actParams Action parameters to be
-                         *            added to the URL (optional)
+                         *           actParams Action parameters to be added to
+                         *           the URL (optional)
                          * @param {HTMLFormElement}
-                         *            element DOM element of form to be
-                         *            submitted (optional)
+                         *           element DOM element of form to be submitted
+                         *           (optional)
                          * 
-                         * @returns {Promise} A Promise object that is
-                         *          resolved with no argument when the
-                         *          action request has completed.
+                         * @returns {Promise} A Promise object that is resolved
+                         *          with no argument when the action request has
+                         *          completed.
              *
                          * @throws {TypeError}
-                         *             Thrown if the input parameters
-                         *             are invalid
+                         *            Thrown if the input parameters are invalid
              * @throws  {AccessDeniedException}
-             *                   Thrown if a blocking operation is
-             *                   already in progress.
+                         *            Thrown if a blocking operation is already
+                         *            in progress.
              * @throws  {NotInitializedException}
-                         *             Thrown if a portlet ID is
-                         *             provided, but no onStateChange
-             *                   listener has been registered.
+                         *            Thrown if a portlet ID is provided, but no
+                         *            onStateChange listener has been
+                         *            registered.
              *
              * @memberOf   PortletInit
              */
                         action : function(actParams, element) {
                var ii, arg, type, parms = null, el = null, meth;
          
-                           console
-                                 .log("Executing action for portlet: "
+                           console.log("Executing action for portlet: "
                                        + portletId);
                            // check arguments. make sure there is a
                            // maximum of two
                            // args and determine the types. Check
                            // values as possible.
                if (arguments.length > 2) {
-                              throw new TypeError("Too many arguments. 2 arguments are allowed.");
+                              throw new TypeError(
+                                    "Too many arguments. 2 arguments are allowed.");
                }
          
                ii = arguments.length;
                            while (--ii >= 0) {
                   arg = arguments[ii];
-                              type = Object.prototype.toString
-                                    .call(arg);
+                              type = Object.prototype.toString.call(arg);
                   if (type === '[object HTMLFormElement]') {
                      if (el === null) {
                         el = arg;
                      } else {
-                                    throw new TypeError("too many [object HTMLFormElement] arguments: "
+                                    throw new TypeError(
+                                          "too many [object HTMLFormElement] arguments: "
                                + arg + ", " + el);
                      }
                   } else if (type === '[object Object]') {
@@ -1894,14 +1851,14 @@ var portlet = portlet || {};
                                                 // parms are
                                                 // invalid
                      if (parms !== null) {
-                                    throw new TypeError("too many parameters arguments.");
+                                    throw new TypeError(
+                                          "too many parameters arguments.");
                      }
                      parms = arg;
                               } else if (arg !== undefined) {
-                                 throw new TypeError("Invalid argument type. Argument "
-                                       + (ii + 1)
-                                       + " is of type "
-                                       + type);
+                                 throw new TypeError(
+                                       "Invalid argument type. Argument "
+                                             + (ii + 1) + " is of type " + type);
                   }
                }
                
@@ -1910,11 +1867,10 @@ var portlet = portlet || {};
                console.log("form element", el);
                
                if (el) {
-                              meth = el.method ? el.method
-                                    .toUpperCase() : undefined;
+                              meth = el.method ? el.method.toUpperCase()
+                                    : undefined;
             	   
-                              if (meth && (meth !== 'POST')
-                                    && (meth !== 'GET')) {
+                              if (meth && (meth !== 'POST') && (meth !== 'GET')) {
                                  throw new TypeError("Invalid form method "
                                        + el.method
                                        + ". Allowed methods are GET & POST ");
@@ -1926,7 +1882,8 @@ var portlet = portlet || {};
                               if (el.enctype
                                     && el.enctype !== 'application\/x-www-form-urlencoded'
                                     && el.enctype !== 'multipart\/form-data') {
-                                 throw new TypeError("Invalid form enctype "
+                                 throw new TypeError(
+                                       "Invalid form enctype "
                                        + el.enctype
                                        + ". Allowed: 'application\/x-www-form-urlencoded' & 'multipart\/form-data'  ");
                               }
@@ -1934,7 +1891,8 @@ var portlet = portlet || {};
                               if (el.enctype
                                     && (el.enctype === 'multipart\/form-data')
                                     && (meth !== 'POST')) {
-                                 throw new TypeError("Invalid method with multipart/form-data. Must be POST.");
+                                 throw new TypeError(
+                                       "Invalid method with multipart/form-data. Must be POST.");
                   }
                   
                               // if the data is supposed to be
@@ -1943,11 +1901,10 @@ var portlet = portlet || {};
                               if (!el.enctype
                                     || (el.enctype === 'application\/x-www-form-urlencoded')) {
                      for (ii = 0; ii < el.elements.length; ii++) {
-                                    if (el.elements[ii].nodeName
-                                          .toUpperCase() === 'INPUT'
-                                          && el.elements[ii].type
-                                                .toUpperCase() === 'FILE') {
-                                       throw new TypeError("Must use enctype = 'multipart/form-data' with input type FILE.");
+                                    if (el.elements[ii].nodeName.toUpperCase() === 'INPUT'
+                                          && el.elements[ii].type.toUpperCase() === 'FILE') {
+                                       throw new TypeError(
+                                             "Must use enctype = 'multipart/form-data' with input type FILE.");
                         }
                      }
                   }
@@ -1959,85 +1916,96 @@ var portlet = portlet || {};
             },
          
             /**
-                         * Starts partial action processing and returns
-                         * a {@link PartialActionInit} object to the
-                         * caller. The <code>PartialActionInit</code>
-                         * object contains a partial action URL and an
-                         * {@setPageState}. The partial action URL can
-                         * be used to initiate an action request. The
-                         * {@setPageState} callback function allows the
-                         * portlet client to complete the partial action
-                         * operation by updating the state of all
-                         * portlet clients on the page that are affected
-                         * by action and event processing on the server
+             * Starts partial action processing and returns a
+             * {@link PartialActionInit} object to the caller. The
+                         * <code>PartialActionInit</code> object contains a
+                         * partial action URL and a {@setPageState} callback
+                         * function. The partial action URL can be used to
+                         * initiate an action request. The {@setPageState}
+                         * callback function allows the portlet client to
+                         * complete the partial action operation by updating the
+                         * state of all portlet clients on the page that are
+                         * affected by action and event processing on the server
                          * resulting from the partial action.
                          * <p>
-                         * After the <code>setPageState</code>
-                         * function has been called, a copy of the
-                         * render state will be provided to each
-                         * affected portlet client through the
+                         * After the <code>setPageState</code> function has
+                         * been called, a copy of the render state will be
+                         * provided to each affected portlet client through the
                          * {@link onStateChange} listener function.
                          * <p>
-                         * However, it is also possible for the portal
-                         * to completely refresh the page as a response
-                         * to the action. This may occur in order to
-                         * support portlets on the page that do not
-                         * participate in the Portlet 3.0 Ajax support
-                         * or due to configuration settings, for
-                         * example.
+                         * In addition, the {@link onStateChange} listener
+                         * function for the initiating portlet will be provided
+                         * with a {@link RenderData} object, which contains the
+                         * same data as would be available through a portlet
+                         * resource request using the current render state with
+                         * no additional resource parameters and with the
+                         * resource URL cacheability option set to "PAGE".
                          * <p>
-                         * If the page is completely refreshed, it will
-                         * be rendered according to render parameters
-                         * set on the server.
+                         * Note that HTTP header information for the partial
+                         * action response is set by the action processing
+                         * method on the server. Any header information set by
+                         * the resource method called to obtain the
+                         * {@link RenderData} will be lost. If the portlet
+                         * client needs access to the header data set by the
+                         * resource method, it should create a resource URL and
+                         * fetch the resource data on its own when the
+                         * {@link onStateChange} listener function is called
+                         * after the partial action has been performed.
                          * <p>
-                         * Action parameters are optional parameters
-                         * attached to a action URL in addition to any
-                         * render state values that may be present.
-                         * Action parameters do not influence the render
-                         * state.
+                         * However, it is also possible for the portal to
+                         * completely refresh the page as a response to the
+                         * action. This may occur in order to support portlets
+                         * on the page that do not participate in the Portlet
+                         * 3.0 Ajax support or due to configuration settings,
+                         * for example.
                          * <p>
-                         * The action parameters must be an object
-                         * containing properties representing parameter
-                         * names whose values must be an array of string
-                         * values, as described under
-                         * {@link PortletParameters}. All of the action
-                         * parameters will be attached to the URL. Use
-                         * of action parameters is optional.
+                         * If the page is completely refreshed, it will be
+                         * rendered according to render parameters set on the
+                         * server.
                          * <p>
-                         * A partial action is a blocking operation. To
-                         * allow for orderly state transitions, the
-                         * portlet hub does not allow this function to
-                         * be used while a blocking operation is in
-                         * progress. A blocking operation is considered
-                         * to be in progress from the initial call until
-                         * the final onStateChange event for that
-                         * operation has been fired. See {@link portlet}
-                         * for further information.
-                         * 
-                         * @param {PortletParameters}
-                         *            actParams Action parameters to be
-                         *            added to the URL (optional)
-                         * 
-                         * @returns {Promise} A Promise object. Returns
-                         *          a {PortletActionInit} object
-                         *          containing a partial action URL and
-                         *          the setPageState callback function
-                         *          on successful resolution. Returns an
-                         *          Error object containing a
-                         *          descriptive message on failure.
-             *
-                         * @throws {TypeError}
-                         *             Thrown if the input parameters
-                         *             are invalid
-             * @throws  {AccessDeniedException}
-             *                   Thrown if a blocking operation is
-             *                   already in progress.
-             * @throws  {NotInitializedException}
-                         *             Thrown if a portlet ID is
-                         *             provided, but no onStateChange
-             *                   listener has been registered.
-             *
-             * @memberOf   PortletInit
+                         * Action parameters are optional parameters attached to
+                         * a action URL in addition to any render state values
+                         * that may be present. Action parameters do not
+                         * influence the render state.
+                         * <p>
+                         * The action parameters must be an object containing
+                         * properties representing parameter names whose values
+                         * must be an array of string values, as described under
+                         * {@link PortletParameters}. All of the action
+                         * parameters will be attached to the URL. Use of action
+                         * parameters is optional.
+             * <p>
+                         * A partial action is a blocking operation. To allow
+                         * for orderly state transitions, the portlet hub does
+                         * not allow this function to be used while a blocking
+                         * operation is in progress. A blocking operation is
+                         * considered to be in progress from the initial call
+                         * until the final onStateChange event for that
+                         * operation has been fired. See {@link portlet} for
+                         * further information.
+             * 
+             * @param {PortletParameters}
+                         *           actParams Action parameters to be added to
+                         *           the URL (optional)
+             * 
+             * @returns {Promise} A Promise object. Returns a
+                         *          {PortletActionInit} object containing a
+                         *          partial action URL and the setPageState
+                         *          callback function on successful resolution.
+                         *          Returns an Error object containing a
+             *          descriptive message on failure.
+             * 
+             * @throws {TypeError}
+             *            Thrown if the input parameters are invalid
+             * @throws {AccessDeniedException}
+                         *            Thrown if a blocking operation is already
+                         *            in progress.
+             * @throws {NotInitializedException}
+             *            Thrown if a portlet ID is provided, but no
+                         *            onStateChange listener has been
+                         *            registered.
+             * 
+             * @memberOf PortletInit
              */
                         startPartialAction : function(actParams) {
                var  parms = null, paObj = {}, pi;
@@ -2047,7 +2015,8 @@ var portlet = portlet || {};
                            // args and determine the types. Check
                            // values as possible.
                if (arguments.length > 1) {
-                              throw new TypeError("Too many arguments. 1 arguments are allowed.");
+                              throw new TypeError(
+                                    "Too many arguments. 1 arguments are allowed.");
                } else if (actParams !== undefined) {
                   if (typeof actParams === 'object') {
                                  validateParms(actParams); // throws
@@ -2057,7 +2026,8 @@ var portlet = portlet || {};
                                                       // invalid
                      parms = actParams;
                   } else {
-                                 throw new TypeError("Invalid argument type. Argument is of type "
+                                 throw new TypeError(
+                                       "Invalid argument type. Argument is of type "
                            + (typeof actParams));
                   }
                }
@@ -2077,16 +2047,11 @@ var portlet = portlet || {};
                // let errors propagate to caller.
                
                pi = _registeredPortlets[portletId];
-                           return pi
-                                 .getUrl("PARTIAL_ACTION", parms)
-                                 .then(
+                           return pi.getUrl("PARTIAL_ACTION", parms).then(
                                        function(url) {
                   paObj.url = url;
-                                          paObj.setPageState = function(
-                                                ustr) {
-                                             setPageState(
-                                                   portletId,
-                                                   ustr);
+                                    paObj.setPageState = function(ustr) {
+                                       setPageState(portletId, ustr);
                                           };
                   return paObj;
                });
@@ -2094,40 +2059,37 @@ var portlet = portlet || {};
             },
          
             /**
-                         * Tests whether a blocking operation is in
-                         * progress.
+                         * Tests whether a blocking operation is in progress.
              * <p>
-                         * The portlet client can use this function to
-                         * test whether a state change is in progress
-                         * before initiating a blocking operation.
+                         * The portlet client can use this function to test
+                         * whether a state change is in progress before
+                         * initiating a blocking operation.
                          * <p>
-                         * Note that if the portlet client uses this
-                         * function to implement a waiting function, the
-                         * render state may be changed during the time
-                         * that the portlet client waits. Also note that
-                         * the portal may choose to refresh the page as
-                         * a response to a blocking operation, in which
-                         * case the waiting function would not complete.
+                         * Note that if the portlet client uses this function to
+                         * implement a waiting function, the render state may be
+                         * changed during the time that the portlet client
+                         * waits. Also note that the portal may choose to
+                         * refresh the page as a response to a blocking
+                         * operation, in which case the waiting function would
+                         * not complete.
                          * <p>
                          * The portlet hub provides for orderly state
-                         * transitions by allowing only a single
-                         * blocking operation ({@link action},
-                         * {@link setRenderState},
-                         * {@link startPartialAction}) to be active at
-                         * any one time.
+                         * transitions by allowing only a single blocking
+                         * operation ({@link action}, {@link setRenderState},
+                         * {@link startPartialAction}) to be active at any one
+                         * time.
                          * <p>
-                         * The state transition is considered to be
-                         * active from the initial portlet client call
-                         * to one of the blocking operations until the
-                         * portlet hub has performed the requested state
-                         * change and has informed all of the affected
-                         * portlet clients by firing the corresponding
-                         * onStateChange events.
+                         * The state transition is considered to be active from
+                         * the initial portlet client call to one of the
+                         * blocking operations until the portlet hub has
+                         * performed the requested state change and has informed
+                         * all of the affected portlet clients by firing the
+                         * corresponding onStateChange events.
              * <p>
              * See {@link portlet} for further information.
              *
-                         * @returns {boolean} <code>true</code> if a
-                         *          blocking operation is in progress
+                         * @returns {boolean} <code>true</code> if a blocking
+                         *          operation is in progress
              *
              * @memberOf   PortletInit
              */
@@ -2138,62 +2100,56 @@ var portlet = portlet || {};
             /**
              * Dispatches a client event.
              * <p>
-                         * Client events of the specified type are
-                         * queued for delivery to registered event
-                         * listeners of that type.
+                         * Client events of the specified type are queued for
+                         * delivery to registered event listeners of that type.
                          * <p>
-                         * The event type is matched against the type
-                         * strings associated with registered event
-                         * listeners. An event will be dispatched for
-                         * each matching listener. The number of
-                         * matching listeners will be returned.
+                         * The event type is matched against the type strings
+                         * associated with registered event listeners. An event
+                         * will be dispatched for each matching listener. The
+                         * number of matching listeners will be returned.
                          * <p>
-                         * The event payload is defined by the
-                         * dispatcher of the event. It must be present,
-                         * but may be of any type or value.
+                         * The event payload is defined by the dispatcher of the
+                         * event. It must be present, but may be of any type or
+                         * value.
                          * <p>
-                         * The portlet Client may not dispatch event
-                         * types beginning with the reserved string
-                         * "portlet.".
+                         * The portlet Client may not dispatch event types
+                         * beginning with the reserved string "portlet.".
                          * <p>
                          * The client is responsible for preventing race
-                         * conditions. For example, a race condition can
-                         * occur if portlet A dispatches an event to
-                         * portlet B, causing an event to portlet A,
-                         * which dispatches again to portlet B, etc.
+                         * conditions. For example, a race condition can occur
+                         * if portlet A dispatches an event to portlet B,
+                         * causing an event to portlet A, which dispatches again
+                         * to portlet B, etc.
                          * <p>
-                         * Event delivery cannot be guaranteed, and may
-                         * vary according to the situation.
+                         * Event delivery cannot be guaranteed, and may vary
+                         * according to the situation.
                          * <p>
-                         * Take for example a scenario where a portlet
-                         * issues an event to several other portlets,
-                         * perhaps including itself. Due to the event,
-                         * each portlet updates parameters through use
-                         * of the {@link setRenderState} function.
+                         * Take for example a scenario where a portlet issues an
+                         * event to several other portlets, perhaps including
+                         * itself. Due to the event, each portlet updates
+                         * parameters through use of the {@link setRenderState}
+                         * function.
                          * <p>
-                         * The <code>setRenderState</code> function
-                         * can cause a page refresh depending on the
-                         * situation. If all portlets on the page
-                         * participate in the JSR 362 Ajax support, the
-                         * portlet hub might not cause a page refresh.
-                         * However, if there are legacy portlets to be
-                         * supported, the portal or portlet hub might
-                         * choose to refresh the page.
+                         * The <code>setRenderState</code> function can cause
+                         * a page refresh depending on the situation. If all
+                         * portlets on the page participate in the JSR 362 Ajax
+                         * support, the portlet hub might not cause a page
+                         * refresh. However, if there are legacy portlets to be
+                         * supported, the portal or portlet hub might choose to
+                         * refresh the page.
                          * <p>
-                         * In the latter case, this means that the first
-                         * portlet receiving the event will be able to
-                         * successfully update its parameters, but the
-                         * remaining portlets will not. This can have
-                         * unintentional consequences.
+                         * In the latter case, this means that the first portlet
+                         * receiving the event will be able to successfully
+                         * update its parameters, but the remaining portlets
+                         * will not. This can have unintentional consequences.
                          * 
                          * @param {string}
                          *            type The type of listener
                          * @param {any}
-                         *            payload The payload to be
-                         *            delivered
+                         *           payload The payload to be delivered
              *
-                         * @returns {number} The number of events queued
-                         *          for delivery
+                         * @returns {number} The number of events queued for
+                         *          delivery
              *
              * @memberOf   PortletInit
              */
@@ -2202,8 +2158,7 @@ var portlet = portlet || {};
          
                            // check for 2 arguments, the first of which
                            // must be a string
-                           checkArguments(arguments, 2, 2,
-                                 [ 'string' ]);
+                           checkArguments(arguments, 2, 2, [ 'string' ]);
          
                            // disallow use of reserved name for system
                            // event types
@@ -2215,11 +2170,8 @@ var portlet = portlet || {};
                for (li in pcListeners) {
                   if (pcListeners.hasOwnProperty(l

<TRUNCATED>

Mime
View raw message