So, I have a Front Controller Plugin that is running post dispatch that needs to add some debug data to the front of the response body. It only needs to perform this action if the action was rendered. So in the action we're setting setNoRender for the action and then in the front controller plugin, we check the getNoRender() method to see if it's true or false.

The problem is that after the action is rendered, setNoRender() is called in the renderScript method of Zend_Controller_Action_Helper_ViewRenderer to prevent double rendering. So, getNoRender() will always return true regardless of whether or not it was set in the action. If we use setNeverRender() instead, this all works as expected, but it seems like a hack to say, "you have to just use setNeverRender because setNoRender/getNoRender doesn't act as one would expect it to."

Maybe I'm completely misunderstanding how setNoRender() and getNoRender() should work, but I'd really like some insight on this question. I haven't been able to find a good way to make this happen as it should without making sure I use setNeverRender everywhere instead of setNoRender.

If there's a better way to accomplish the goals of my Front Controller Plugin, I'd definitely be up suggestions.


Thanks in advance!

Garrison

--
Garrison Locke
Lead Dynamic Functionality Specialist
OIT - Outreach Technology
NC State University
[email protected]
------------------------------------------
Twitter: http://www.twitter.com/gplocke

Reply via email to