Thanks Pádraic for the speedy and helpful response. Wow, helping 5-6 teams
weekly? How about adding a 7th or a live IRC Q&A ;) Thanks for your hard work
with ZVE, looking forward to incubator release.
I added getter/setter pairs to ViewRenderer, actually needed an extra set for
response. If anyone else is having trouble with this, here's what worked for us:
Add to Zend/Controller/Action/Helper/ViewRenderer.php :
public function getRequest() {
return Zend_Controller_Front::getInstance()->getRequest();
}
public function setRequest($request) {
return Zend_Controller_Front::getInstance()->setRequest($request);
}
public function getResponse() {
return Zend_Controller_Front::getInstance()->getResponse();
}
public function setResponse($response) {
return Zend_Controller_Front::getInstance()->setResponse($response);
}
-Adam
----- Original Message ----
From: Pádraic Brady <[EMAIL PROTECTED]>
To: Adam Torrino <[EMAIL PROTECTED]>
Cc: Zend Framework General <[email protected]>
Sent: Wednesday, September 19, 2007 10:33:49 AM
Subject: Re: [fw-general] ZVE dispatch controller action
Hi Adam,
The way the current proposal version (which is alpha at best) works is that it
requires a change to the ViewRenderer class to allow for Request substitution.
Mainly this was because ViewRenderer was stuck on the original request data so
much that relying on it to update view script names was difficult.
You can either add this method to ViewRenderer yourself - it's just a simple
setter/getter pair and no other fancy coding. Or I think you can disable
ViewRenderer for your sub-controllers and set the Response body manually.
Hope this throw some light on the subject :).
Paddy
P.S. The current code was only ever intended to support a proposal (i.e. I
assumed a proposal did not require actual working code beyond a demo
implementation) but so far I've heard of
ZVE in use on about 5-6 projects whose team is in contact every week or so
with me.
You'll be glad to hear that whatever the rough cut version's flaws are, work
will progress on an official version (Layouts will be delegated to Zend_Layout
instead however) in the near future which will do away with such uncertainties
and support some extra edge cases. If you have any other issues feel free to
contact me.
Pádraic Brady
http://blog.astrumfutura.com
http://www.patternsforphp.com
----- Original Message ----
From: Adam Torrino <[EMAIL PROTECTED]>
To: [email protected]
Sent: Wednesday, September 19, 2007 3:10:33 PM
Subject: [fw-general] ZVE dispatch controller action
Hi all,
LOVE Zend_View Enhanced and have begun using it for a large project... only
problem I've noticed is when trying to render the result of a controller action
into a layout.
The idea is to have a Sidebar controller just for this purpose, and each action
being a separate sidebar "widget", and no publicly mapped routes of course.
In layout:
echo $this->controller('tagCloud', 'sidebarwidgets', null, array());
Gives:
Fatal error: Call to undefined method
Zend_Controller_Action_Helper_ViewRenderer::setRequest() in
/www/project1/Zend/View/Helper/Controller.php on line 56
Seen this on the astrumfutura blog too but no resolution - I know its a work in
progress...any ideas on this?
Catch up on fall's hot new shows on Yahoo! TV. Watch previews, get
listings, and more!
Check out the hottest 2008 models today at Yahoo! Autos.
____________________________________________________________________________________
Got a little couch potato?
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz