-- 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/