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


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="[email protected]">
    <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.

Reply via email to