2009年2月11日星期三

[fw-mvc] Zend_View_Helper_Action and Dojo

Hello,
i have one guestion of rendering dijits when is use action helper in layout.

In layout script have calling action helper eq:
<html>
<head> /** All header tags and dojo include */ </head>
<body>
<?php
echo $this->action('loginform','auth'); // this action generate loginform or
box for loged user (when is authenticate)
$this->layout()->content; // rendering content from view scripts
?>
</body>
</html>

If i use dijits i view script, then is in header tag generated js dojo code
like this:
dojo.addOnLoad(function() {
dojo.forEach(zendDijits, function(info) {
var n = dojo.byId(info.id);
if (null != n) {
dojo.attr(n, dojo.mixin({ id: info.id }, info.params));
}
});
dojo.parser.parse();
});
var zendDijits = [.....] <= ALL used dijits from view scripts, without
dijits from action helper :-/ => loginform hasn't dijit elements.

Is that ok? How rendering dijits from action helper?
Both controllers used same init method with inicializing dojo.

Excuse my English :-/
Thanks for help.
--
View this message in context: http://www.nabble.com/Zend_View_Helper_Action-and-Dojo-tp21951515p21951515.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: