I'm stuck - and its my lack of knowledge of how shindig's rpc relay is
supposed to work that is stumping me.

If I view http://localhost:8080/gadgets/files/container/sample2.html - then
the 2nd of the three sample widgets supports dynamicHeight perfectly.

If however I host just the sample2.html page from the file store (e.g.
file:///D:/workspace/shindig/javascript/container/sample2.html) *AND *change
all the references to point back to the gadget server then dynamicHeight
stops working.  What do I need to add to the following to get it to start
working again?

This is a small repeatable test case as I'm having problems with a container
separate from the gadget server.


<!DOCTYPE html>
<html>
<head>
<title>Sample: Dynamic Height</title>
<!-- default container look and feel -->
<link rel="stylesheet" href="
http://localhost:8080/gadgets/files/container/gadgets.css";>
<script type="text/javascript" src="
http://localhost:8080/gadgets/js/rpc.js?c=1&debug=1";></script>
<script type="text/javascript" src="
http://localhost:8080/gadgets/files/container/cookies.js";></script>
<script type="text/javascript" src="
http://localhost:8080/gadgets/files/container/gadgets.js";></script>
<script type="text/javascript">
var my = {};

my.gadgetSpecUrls = [
  'http://www.google.com/ig/modules/horoscope.xml',
  'http://www.google.com/ig/modules/aue07otr.xml',
  'http://www.labpixies.com/campaigns/todo/todo.xml'
];


// This container lays out and renders gadgets itself.

my.LayoutManager = function() {
  gadgets.LayoutManager.call(this);
};

my.LayoutManager.inherits(gadgets.LayoutManager);

my.LayoutManager.prototype.getGadgetChrome = function(gadget) {
  var chromeId = 'gadget-chrome-' + gadget.id;
  return chromeId ? document.getElementById(chromeId) : null;
};

my.init = function() {
  gadgets.container.layoutManager = new my.LayoutManager();
  gadgets.container.setParentUrl('http://localhost:8080/');
};

my.renderGadgets = function() {
  for (var i = 0; i < my.gadgetSpecUrls.length; ++i) {
    var gadget = gadgets.container.createGadget(
        {specUrl: my.gadgetSpecUrls[i]});
    gadget.setServerBase('http://localhost:8080/gadgets/');

    gadgets.container.addGadget(gadget);
    gadgets.container.renderGadget(gadget);
  }
};
</script>
</head>
<body onLoad="my.init();my.renderGadgets()">
  <h2>Sample: Dynamic Height</h2>
  <div id="gadget-chrome-0" class="gadgets-gadget-chrome"></div>
  <div id="gadget-chrome-1" class="gadgets-gadget-chrome"></div>
  <div id="gadget-chrome-2" class="gadgets-gadget-chrome"></div>
</body>
</html>


Regards
Martin
-- 
Internet Related Technologies - http://www.irt.org

Reply via email to