-- jmolins <[EMAIL PROTECTED]> wrote
(on Tuesday, 23 September 2008, 05:04 PM -0700):
> Using the tabContainer or borderContainer in programmatic way, I do not get
> the dojoType values in the divs when the page is generated.

Yes -- because *programmatic* dojo does not push dijit parameters into
the HTML. *Declarative* dojo *does*.

When using Dojo programmatically, which is the default in ZF, the dijit
parameters are accumulated by the dojo() view helper. When the dojo()
view helper is echoed, the javascript that creates the various dijits is
also rendered -- and executed when the page loads.

If you examine the DOM in FireBug, you'll now see the dojoType
attributes -- but if you simply view source on the page, you will not.
Just the way things work.

If you want to see the dojoType attributes always, simply use Zend_Dojo
with declarative syntax.

> I have seen other posts about rendering the dojo at the end. I think that is
> what I do.
> I add the containers in the corresponding view script.
> And then on the layout template I just render the dojo and in the body the
> layout content.
> The divs for the containers are generated but they are not filled with the
> dojoTypes.
> And also I get the correct "dojo.require" for the containers added in the
> final rendering. 
> Is there any other thing that I should consider?
> Thanks a lot
> Jose
> 
> 
> In bootstrap.php
> 
> Zend_Dojo::enableView($view);
> $view->dojo()->setLocalPath('/js/dojo/dojo.js')
>                    ->disable();
> 
> 
> In sponsor.phtml
> 
> $this->dojo()->enable();
> $this->tabContainer()->captureStart('layout1', array('design' =>
> 'headline'));
> echo $this->contentPane('tab1', '', array('title' => 'tab1', 'class' =>
> 'tab'));
> echo $this->contentPane('tab2', '', array('title' => 'tab2', 'class' =>
> 'tab'));
> echo $this->contentPane('tab3', '', array('title' => 'tab3', 'class' =>
> 'tab'));
> echo $this->tabContainer()->captureEnd('layout1');
> 
> 
> And then in layout.phtml
> 
> <head>
> ...
> <?php $this->dojo() ?>
> ...
> </head>
> ...
> <body class="tundra">
> ..
> <?php echo $this->layout()->content ?>
> ..
> -- 
> View this message in context: 
> http://www.nabble.com/dojoType-not-being-added-to-div-tp19639532p19639532.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
> 

-- 
Matthew Weier O'Phinney
Software Architect       | [EMAIL PROTECTED]
Zend Framework           | http://framework.zend.com/

Reply via email to