You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shindig.apache.org by "Henry Saputra (Commented) (JIRA)" <ji...@apache.org> on 2012/03/01 21:01:58 UTC

[jira] [Commented] (SHINDIG-1715) osapi calls not executed when using registerOnLoadHandler

    [ https://issues.apache.org/jira/browse/SHINDIG-1715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13220304#comment-13220304 ] 

Henry Saputra commented on SHINDIG-1715:
----------------------------------------

Just checking but does your gadget have osapi feature included?
                
> osapi calls not executed when using registerOnLoadHandler
> ---------------------------------------------------------
>
>                 Key: SHINDIG-1715
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1715
>             Project: Shindig
>          Issue Type: Bug
>          Components: Javascript 
>    Affects Versions: 2.5.0
>            Reporter: Max Jonas Werner
>
> I'm running the latest Shindig version from SVN trunk and every gadget that uses registerOnLoadHandler() for initialization runs into the same issue. Given the following JS code in the gadget the function cb(user) is never called. As can be seen with Firebug actually the osapi.people.get() call is actually never executed:
> <script>
> function cb(user) {
>     console.log("i'm here");
> }
> function initData() {
>     osapi.people.get({userId: '@viewer'}).execute(cb);
> }
> gadgets.util.registerOnLoadHandler(initData);
> </script>
> Steps to reproduce:
> 1. Get Shindig from trunk
> 2. Compile with "mvn clean install"
> 3. Run jetty with "mvn -Prun"
> 4. Navigate to http://localhost:8080/samplecontainer/samplecontainer.html
> 5. Set the displaying gadget to "http://localhost:8080/samplecontainer/samplecontainer.html"
> 6. Click "reset all"
> After step 6 I expect to see the rendered list of friends but I don't see anything being rendered inside the gadget except for the "Say hello" button. Pressing it doesn't seem to trigger any API call or sth.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira