Author: rbaxter85
Date: Sun Jul  7 21:07:06 2013
New Revision: 1500538

URL: http://svn.apache.org/r1500538
Log:
Updated README to reflect new common container samples.

Modified:
    shindig/trunk/content/README

Modified: shindig/trunk/content/README
URL: 
http://svn.apache.org/viewvc/shindig/trunk/content/README?rev=1500538&r1=1500537&r2=1500538&view=diff
==============================================================================
--- shindig/trunk/content/README (original)
+++ shindig/trunk/content/README Sun Jul  7 21:07:06 2013
@@ -26,6 +26,14 @@
         (Note: yourserver:yourport defaults to localhost:8080 for the java 
server,
         and just localhost for the php server)
 
+        * http://yourserver:yourport/containers/commoncontainer/index.html - 
basic common container example
+        * http://yourserver:yourport/containers/embeddedexperiences/index.html 
- sample container demonstrating embedded experiences
+        * http://yourserver:yourport/containers/conservcontainer/index.html - 
sample container demonstrating actions and selection
+        
+        These samples are very basic and aren't production-ready.
+        
+     C) There are serveral deprecated sample containers that use older 
container code.
+      
         * http://yourserver:yourport/container/sample1.html - basic container
         * http://yourserver:yourport/container/sample2.html - custom rendering
         * http://yourserver:yourport/container/sample3.html - custom layouts
@@ -34,65 +42,26 @@
         * http://yourserver:yourport/container/sample6.html - dynamic height
         * http://yourserver:yourport/container/sample7.html - set title
 
-        These samples are very basic and aren't production-ready. Shindig will
-        include a more advanced container at a later date but it hasn't been
-        completed yet.
+        
 
   2) Play around with the code.
 
      A) Create an HTML file including the following <head> boilerplate:
-        <script type="text/javascript" 
src="../../js/shindig-container:rpc.js?c=1"></script>
+        <script type="text/javascript" 
src="/gadgets/js/container:rpc:xmlutil.js?c=1&debug=1&container=default"></script>
 
-     B) For each Gadget you wish to add to the page:
-        i) Create it. Example, for Gadget whose spec is at 
http://foo.com/spec.xml
-  
-          var gadget = gadgets.container.createGadget(
-              {specUrl: "http://foo.com/spec.xml"});
-
-    Check "gadgets.js" for other options to be set in createGadget. If you are
-    debugging your own gadgets you can consider to use specVersion to get a 
more
-    optimal use of the cache. Alternatively, gadgets.container.setNoCache(1)
-
-        ii) Add it to the container. Example:
-
-          gadgets.container.addGadget(gadget);
-
-    If your setup is too complicated, you can need to tell each Gadget
-    where its server is. Example
-    
-    gadget.setServerBase("http://yourserver:yourport/gadgets/";);
-
-        iii) Ensure the Gadget's chrome ID is defined. This is the ID of the
-          elements in which the Gadget is rendered. The way these are specified
-          differs depending on the LayoutManager being used. Example with 
default
-          LayoutManager:
-
-          gadgets.container.layoutManager.setGadgetChromeIds([ 'gadget-id-1' 
]);
-
-        iv) Render it. The chrome element must exist when this call is 
performed
-          (ie. this must occur onLoad of the document.body or in inline 
script).
-
-          gadgets.container.renderGadget(gadget);
-
-          You may also render several added Gadgets at once:
-
-          gadgets.container.renderGadgets();
-
-     C) Explore samples 2, 3, and 4 for examples using different LayoutManagers
-        and supporting UserPrefs storage.
-
-  4) Run the opensocial sample container
-     A) Set up your own Shindig Gadget Server. See java/README for details. 
(If you
-       are using the java based server make sure you run with mvn 
jetty:run-war)
-
-     B) Hit the sample container at
-       http://yourserver:yourport/samplecontainer/samplecontainer.html
-
-     C) See the sample container help document for more details on how it 
works:
-       http://yourserver:yourport/samplecontainer/getting-started.html
-
-     D) Get, and try to run, coderunner.xml and compliancetests.xml from the 
project
-       http://opensocial-resources.googlecode.com/
+     B) Initialize the common container.
+     
+        var config = {};
+        config[osapi.container.ContainerConfig.RENDER_DEBUG] = '1';
+        var CommonContainer = new osapi.container.Container(config);
+
+     C) Render a gadget.
+       
+        var el = document.getElementById('divId');
+        var params = {};
+        params[osapi.container.RenderParam.WIDTH] = '100%';
+           var gadgetSite = CommonContainer.newGadgetSite(el);
+           CommonContainer.navigateGadget(gadgetSite, 
'http://examples.com/gadget.xml', {}, params);
 
   Licensing
   ---------


Reply via email to