Documentation Centre for the Apache Shindig's Features

This documentation centre is for developer who wants to use the Apache Shindig's features.

Apache Shindig Features

A list of features can be found in the source code.

Using Features

To use an above feature in your gadget, you need to specify the feature as in and defining some Javascript codes to use it.

For example, if you plan to use the tabs/feature.xml, your gadget will look like the following:

<Module>
  <ModulePrefs title="TabExample" description="Tabs Example">
    <Require feature="tabs"></Require>
  </ModulePrefs>
  <Content type="html">
    <![CDATA[
    <script type="text/javascript">
      function onLoad(){ 
        var tabset=new gadgets.TabSet();
        tabset.alignTabs('left');

        tabset.addTab("Tab1",{contentContainer:document.getElementById("tab1")});

        tabset.addTab("Tab2",{contentContainer:document.getElementById("tab2")});
      } 

      gadgets.util.registerOnLoadHandler(onLoad);
    </script>

    <div id="tab1">
      Contents go to Tab1
    </div>

    <div id="tab2">
      Contents go to Tab2
    </div>
    ]]>
  </Content>
</Module>

You could test your code using the Gadget testing container at: http://localhost:8080/samplecontainer/examples/commoncontainer/index.html.

Common Container

Create Your Own Feature

TODO need to document this

Resources