You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shindig.apache.org by "Rajender Nagulapalle (JIRA)" <ji...@apache.org> on 2010/09/02 20:57:53 UTC

[jira] Updated: (SHINDIG-1417) Adding view feature returns an error

     [ https://issues.apache.org/jira/browse/SHINDIG-1417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rajender Nagulapalle updated SHINDIG-1417:
------------------------------------------

    Attachment: viewsnav.xml

Views Test gadget from google

> Adding view feature returns an error
> ------------------------------------
>
>                 Key: SHINDIG-1417
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1417
>             Project: Shindig
>          Issue Type: Bug
>          Components: Java
>    Affects Versions: 1.1-BETA5
>         Environment: Mac OSX, Tomcat Server, JRE 1.6.18
>            Reporter: Rajender Nagulapalle
>             Fix For: 1.1-BETA5
>
>         Attachments: viewsnav.xml
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> Hi All,
> I have been writing a simple gadget with included views feature. The views.js features are not available when i don't have default view defined in my gadget defination. That means, if I have only profile and canvas defined then I am getting "Unable to locate an appropriate view in this gadget. Requested: 'default' Available: [canvas, profile]" this error. In my Iframe URL am passing "view=default" but it is not rendering anything. 
> Please find the attached gadget script below:
> <?xml version="1.0" encoding="UTF-8"?>
> <Module>
>   <ModulePrefs title="Test subviews"
>                author="api.kurrik@google.com">
>     <Require feature="views" />
>   </ModulePrefs>
>   <Content type="html" view="profile">
>     <![CDATA[
>       <h1>Profile view</h1>
>     ]]>
>   </Content>
>   <Content type="html" view="canvas">
>     <![CDATA[
>       <h1>Available views</h1>
>       <div id="view-output"></div>
>       <script type="text/javascript">
>         var views = gadgets.views.getSupportedViews();
>         var dom = document.getElementById("view-output");
>         for (var view in views) {
>           if (views.hasOwnProperty(view)) {
>             dom.innerHTML += "<div>" + view + "</div>";
>           }
>         }
>         gadgets.log(views);
>       </script>
>     ]]>
>   </Content>
>  </Module>
> In what scenario, it renders profile and canvas views. It is strictly looking for "default" defined or not. If i don't include "default" then gadgets.views.getCurrentView() is returning "gadgets undefined" error message.
> Thanks
> _raj

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.