Thanks.  I haven't been able to get any of the dojo website examples
working.  So, I want to make sure that I have the above correct first.

I put the first two lines in my controller's init().

    public function init() {
        Zend_Dojo::enableView($this->view);
        $this->view->dojo()->enable();
    }

In my view, I put:
<?php echo $this->dojo() ?>

I know you said to put it in my layout.  But, being very new ZF, I'm not
sure if "views" and "layouts" can be used interchangeably.  Does it go in
the <head> or the <body>?

Darren



On Sat, Aug 16, 2008 at 11:07 AM, Matthew Weier O'Phinney
<[EMAIL PROTECTED]>wrote:

> -- darren <[EMAIL PROTECTED]> wrote
> (on Saturday, 16 August 2008, 08:45 AM -0500):
> > I am trying to follow the example on this page.
> >
> > It looks like the registerModulePath() expects 2 parameters, $module and
> > $path.  But, the example only provides 1.
> >
> > $this->dojo()->enable()
> >
> >              ->setDjConfigOption('parseOnLoad', true)
> >
> >              ->registerModulePath('../custom/')   /* needs two
> parameters? */
> >
> >              ->requireModule('dijit.form.FilteringSelect')
> >
> >              ->requireModule('custom.PairedStore');
> >
> > When I load the page, I get the following error:
> > Warning: Missing argument 2 for
> > Zend_Dojo_View_Helper_Dojo_Container::registerModulePath()
> >
> > Slightly changing the question, what I've really been trying to find is
> the
> > most basic "Hello World" for Zend_Dojo.  The example above is not exactly
> the
> > example I was looking for.  I just picked it to work on.  All I really
> want to
> > be able to do in my first Ajax app in ZF is to do an update in my
> database.  I
> > don't want to return anything back to the view, yet.  That's coming.
>  But,
> > right now, I'd be happy if I could just do an update to the database.  Is
> this
> > addressed somewhere in the documentation?  If so, please direct me to it.
>
> For that, simply:
>
>    Zend_Dojo::enableView($view);
>    $view->dojo()->enable();
>
> and, in your layout:
>
>    <?php echo $this->dojo() ?>
>
> That will setup the dojo environment. From there, you'll need to read
> the Dojo documentation to determine how to send an XHR request to your
> application. Hint:
>
>
> http://dojotoolkit.org/book/dojo-book-0-9/part-3-programmatic-dijit-and-dojo/ajax-transports
>
> --
> Matthew Weier O'Phinney
> Software Architect       | [EMAIL PROTECTED]
> Zend Framework           | http://framework.zend.com/
>

Reply via email to