render($this->decoratedComponent->parentComponent) ** would cause an infinite loop trying to render the decorations */ return $this->decoratedComponent->parentComponent->renderContentOn($html); } public function renderDecorationOn($html,$parentHtml){ return $html->div()->id('model-overlay'). $html->div()->id('model-window')->with( $parentHtml ). $html->script()->with($this->loadScript()). $this->renderChildComponentOn($html); } public function updateRoot($anHtmlRoot){ parent::updateRoot($anHtmlRoot); $anHtmlRoot->needsScript('mochikit/MochiKit.js'); return $this; } public function loadScript(){ return ' function updateModelBox(){ fullscreen("model-overlay"); visualCenter("model-window"); $("model-window").style.visibility="visible"; } addToCallStack(window, "onresize", updateModelBox); addLoadEvent(updateModelBox); '; } public function style(){ return $this->decoratedComponent->parentComponent->style(); } public function script(){ return $this->decoratedComponent->parentComponent->script(); } }