-- ignite7 <[EMAIL PROTECTED]> wrote
(on Friday, 19 September 2008, 11:25 AM -0700):
> can anyone help me, when I try to use programmatic declaration of dijit, it
> won't work unless I specify which dijit it belongs

<snip> 

> The same also happen in form, 

<snip> 

> And for the code working, I need to explicitly "include" the module I need
> 
> $this->dojo()->setDjConfigOption('parseOnLoad', true) 
>                      ->requireModule('dijit.form.NumberSpinner')
>                      ->requireModule('dijit.form.Button');  
> 
> 
> Please help, because in the Zend framework's manual, I don't need to 
> include the dojoType parameter

The dojo integration is intended to work *with* Zend_Layout or some
other Composite/Two Step View solution. In other words, you need to echo
the dojo() view helper placeholder in your layout script:

    <html>
        <head>
            <title>Dojo example</title>
            <?= $this->dojo() ?>
        </head>
        <body>
            <?= $this->layout()->content ?>
        </body>
    </html>

Rendering the dojo() view helper any time prior to rendering your
elements -- or not rendering it at all -- will result in none of the
required javascript or CSS includes being performed.

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

Reply via email to