Zend + MVC + Dojo pane ?

3 messages Options
Embed this post
Permalink
forst

Zend + MVC + Dojo pane ?

Reply Threaded More More options
Print post
Permalink
Hi
I'm trying to create a web page using a MVC model (Zend) and some of Dojo/Dijit 's features. My layout is pretty heavy to load each time so I would know if possible to only load each view content ; when a link is clicked ; into a dojox ContentPane ?

Thanks you
weierophinney

Re: Zend + MVC + Dojo pane ?

Reply Threaded More More options
Print post
Permalink
-- forst <[hidden email]> wrote
(on Friday, 06 November 2009, 01:26 PM -0800):
> I'm trying to create a web page using a MVC model (Zend) and some of
> Dojo/Dijit 's features. My layout is pretty heavy to load each time so I
> would know if possible to only load each view content ; when a link is
> clicked ; into a dojox ContentPane ?

You have two options.

First, Dojo offers facilities for creating custom builds. A build
inters all Dojo files into a single file, and does a variety of
compression mechanisms on it (removes whitespace and comments, does some
heuristics on variable names, etc.). This can have a *huge* impact on
your application. However, it's only recommended for production, as
often during development you will benefit from the use-at-will nature of
Dojo. For more information on this, see this section of the manual:

    http://framework.zend.com/manual/en/zend.dojo.build-layers.html

If you want to use XHR calls to populate dojo panes, it's entirely
possible. You will need to intercept links to instead perform XHR calls,
and then have the markup returned fill the content pane. There are
several examples of this in the Dojo documentation (particularly in the
ContentPane docs); I recommend going there for more information.

--
Matthew Weier O'Phinney
Project Lead            | [hidden email]
Zend Framework          | http://framework.zend.com/
forst

Re: Zend + MVC + Dojo pane ?

Reply Threaded More More options
Print post
Permalink
weierophinney wrote:
-- forst <fredforst@yahoo.com> wrote
(on Friday, 06 November 2009, 01:26 PM -0800):
> I'm trying to create a web page using a MVC model (Zend) and some of
> Dojo/Dijit 's features. My layout is pretty heavy to load each time so I
> would know if possible to only load each view content ; when a link is
> clicked ; into a dojox ContentPane ?

You have two options.

First, Dojo offers facilities for creating custom builds. A build
inters all Dojo files into a single file, and does a variety of
compression mechanisms on it (removes whitespace and comments, does some
heuristics on variable names, etc.). This can have a *huge* impact on
your application. However, it's only recommended for production, as
often during development you will benefit from the use-at-will nature of
Dojo. For more information on this, see this section of the manual:

    http://framework.zend.com/manual/en/zend.dojo.build-layers.html

If you want to use XHR calls to populate dojo panes, it's entirely
possible. You will need to intercept links to instead perform XHR calls,
and then have the markup returned fill the content pane. There are
several examples of this in the Dojo documentation (particularly in the
ContentPane docs); I recommend going there for more information.

--
Matthew Weier O'Phinney
Project Lead            | matthew@zend.com
Zend Framework          | http://framework.zend.com/
I have diffculty to do this . Because I have  this code :

 a href="javascript:changeview()"> example
<script type="text/javascript">
    fucntion changeview()
    {
       dijit.byId("cp1").setHref("<?php echo $this->url(array('controller'=>'index','action'=>'tarifs'), 'default', true);?>");
   }
  </script>

<div dojoType="dijit.layout.ContentPane" class="box" hasShadow="true" id="cp1"
  href="index/index">   content test
</div>


The contentPane docs give only how to create a contentpane after action loaded but no since a link clicked.

I need example .

Thanks you