shindig-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Hermanto <mherma...@gmail.com>
Subject Re: [jira] Created: (SHINDIG-1460) Bug fix and improvement for common container: make gadgets can be rendered successfully with the new common container
Date Wed, 03 Nov 2010 18:17:51 GMT
On Tue, Nov 2, 2010 at 7:18 PM, Kai Feng Zhang (JIRA) <jira@apache.org>wrote:

> Bug fix and improvement for common container: make gadgets can be rendered
> successfully with the new common container
>
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: SHINDIG-1460
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1460
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Javascript
>    Affects Versions: 3.0.0
>            Reporter: Kai Feng Zhang
>             Fix For: 3.0.0
>         Attachments: common_container_1101.patch
>
> Working sample page on the new container, there are some issues we have to
> fix:
>
> 1. client side called "osapi.gadgets.metadata.get", but server side can't
> find that method, the key in the
> mapping of the rpc handler is "gadgets.metadata".
>

Can it just be endPoint in
shindig.container.Service.prototype.initializeOsapi_() not configured
properly?
ie: is apiHost_ and apiPath_ specified as to what you want?


>
> 2. when creating the new metadatarequest in "util.js" in the new container,
> it used 'container':
> window.__CONTAINER, but window.__CONTAINER is undefined, we need provide
> one in the sample page or define it in the
> constants.js. Currently the patch provide one in the sample page.
>

window.__CONTAINER is initialized by init.js. This piggy-backs on the query
param &container= when common container JS is script sourced via Shindig
feature-serving servlet with /gadgets/js/container.js?c=1&container=xxx.
 init.js is already part of container.js, and get executed after all
container JS.


> 3. after the above issues are  fixed, the returned iframeurl in metadata is
> something like this
> "//
> http://localhost:8080/gadgets/ifr?url=http%3A%2F%2Flocalhost%3A8080%2Fcontainer%2Fsample-pubsub-2-publisher.xml&
>
> amp;container=default&view=%25view%25&lang=%25lang%25&country=%25country%25&debug=%25debug%25&nocach
> e=%25nocache%25"
>
> The url began with two slashes. we have to remove them.
>


> One approach is changing it when generating the iframeurl on the server
> side, in the file of
> "DefaultIframeUriManager", another approach is changing it on the client
> side when setting it to the iframe
> src, in the file of "gadgets_holder.js".
>

Please change on the server side, in DefaultIframeUriManager (or in your
class extending it). Client side should just consume the URL verbatim, and
no longer munge on it.
However, I'd need to see the actual code change, so uploading your changes
to codereview.appspot.com will be great.


> Currently the patch is based on the second approach.
>
> ----
>
> A new patch including following fixes and a sample page:
>
> 1. make gadgets.metadata.get can return the gadget's metadata
> 2. delete the slashes before the iframeurl
> 3. add pubsub-2 support in the common container
> 4. fix the security token issue if the gadget requires
> "security-token" feature.
>
> ----
>
> Latest patch:
> 1. change osapi.gadgets.metadata.get to osapi.gadgets.metadata
> in service.js
>
> 2. remove the leading "//" of the url to server side
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message