Marshall Shi created SHINDIG-1820:
-------------------------------------

             Summary: When EE gadgets fail to load, error message not returned 
as expected.
                 Key: SHINDIG-1820
                 URL: https://issues.apache.org/jira/browse/SHINDIG-1820
             Project: Shindig
          Issue Type: Bug
          Components: Javascript 
    Affects Versions: 2.5.0-beta2
            Reporter: Marshall Shi
            Priority: Minor
             Fix For: 2.5.0-beta2


When EE gadgets fail to load, say the EE gadget url is invalid, the expected 
callback param should contain a error property telling user about the failure. 
This is aligned with the callback param with the common container 
navigateGadget API call.

While looking into current EE implementation, the callback is having two 
params, site and the full result of preload.

function ccCallback(gadgetInfo) {
        if (gadgetInfo.error) {
                console.log("Got error!");  // can't get here...
        } else {
                console.log("Success!");
        }
}

var eeRenderParams = {};

var eeDataModel = {
        gadget : "<invalid gadget url>",
        context : {}
};

cc.ee.navigate(
        element,
        eeDataModel,
        eeRenderParams,
        ccCallback
);

--
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

        

Reply via email to