2010年5月18日星期二

[fw-mvc] Re: [fw-general] Set script action in frontControllerPlugin::preDispatch()

Maybe an action helper would be better. They also support preDispatch hooks. You will need to bootstrap the helper in order to make sure the hook runs.

Zend_Controller_Action_HelperBroker::getStaticHelper('MyActionHelper');

--
Hector


On Tue, May 18, 2010 at 12:13 PM, Jurian Sluiman <jsluiman@gmail.com> wrote:
Hi all,
I have a frontcontroller plugin, which should be able to set the view script in case of certain conditions. I use the helperBroker to fetch the viewRenderer statically and then I set the scriptAction. This isn't working.

I figured out when an action controller is instantiated, the view renderer resets all its parameters. Therefore you can only change the action script inside the action controller and by no means other resources are able to do such. How do others handle this?

Regards, Jurian

没有评论: