2008年11月7日星期五

Re: [fw-mvc] Getting dojo-> in a Zend_View_Helper

Matthew Weier O'Phinney-3 wrote:
>
> -- Zladivliba Voskuy <nospampam@hotmail.fr> wrote
> (on Friday, 07 November 2008, 04:42 PM +0100):
>>
>> Is there a way to use dojo in a view helper ? I'm trying to set up a
>> login box
>> on all my pages, through a view helper, but with no success so far ; I'm
>> trying
>> this :
>>
>> class Zend_View_Helper_Loginbox extends Zend_View_Helper_Partial
>> {
>> public function loginbox()
>> {
>> $this->dojo()->javascriptCaptureStart(); ?>
>>
>> my xhr request ...
>>
>> <?php $this->dojo()->javascriptCaptureEnd(); }
>
> Use "$this->view->dojo()" -- it's part of the view object attached to
> the helper.
>
>> }
>> ?>
>> This of course throws me a Fatal error: Call to undefined method
>> Zend_View_Helper_Loginbox::dojo()...
>>
>> Well, I'm pretty sure it's not the right way to do it but humm, what
>> would be
>> the right way ?
>
> --
> Matthew Weier O'Phinney
> Software Architect | matthew@zend.com
> Zend Framework | http://framework.zend.com/
>
>


Matthew,

Thanks for your reply. I'm a little bit confused when you say "echo"
captureStart. What exactly do you mean. i didn't think I was echoing it, I
thought I was just calling it. Do you mean I should leave the catureStart
call out of the code?

Barry

--
View this message in context: http://www.nabble.com/Dojo-nested-tabContainer-not-displaying-tp20381223p20384965.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: