The example works on Mozilla, but on IE shows some kind of warning...
line: 21
Error: 'undefined' is null or not an object
Looking at the source line 21 is the following:
dojo.require("dijit.form.DateTextBox");
Any recommendations on IE?
The Hello World! button example from Dojo seems to work on IE btw...
2008/7/28 Christian Sanchez <[EMAIL PROTECTED]>
> Thanks Matthew!! It worked!! Now I'm going to create my own forms :D.
> Thanks!
> I will give another read to the docs, to let you know if there's anything
> to fix as well :P
>
> 2008/7/28 Matthew Weier O'Phinney <[EMAIL PROTECTED]>
>
> -- Christian Sanchez <[EMAIL PROTECTED]> wrote
>> (on Sunday, 27 July 2008, 09:41 PM -0500):
>> > Ok, let's see, I have the following in my bootstrap:
>> >
>> > $view = new Zend_View();
>> > $view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
>> > $view->addHelperPath('Zend/Dojo/View/Helper', 'Zend_Dojo_View_Helper');
>> //the
>> > line added after what you said
>> > $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
>> > $viewRenderer->setView($view);
>> > Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
>> >
>> > After this I have the following in my layout:
>>
>> BZZZTTT!!! Here's part of your issue. If you echo dojo() before
>> everything's been set in it, then you're going to be missing statements.
>> In this example, you're echoing the form in your _layout_ script,
>> _after_ dojo() has already been echoed... which means that any
>> dojo.require() and addOnLoad() statements produced by the form will be
>> missing.
>>
>> Render the form _prior_ to echoing the dojo() view helper; you can even
>> do this in your layout by capturing the value first:
>>
>> <? $form = $this->form->render() ?>
>>
>> and then simply rendering the captured content later:
>>
>> <?= $form ?>
>>
>> >
>> > <body class="tundra">
>> > <h1><?php echo $this->placeholder('title'); ?></h1>
>> > <?php echo $this->layout()->content; ?>
>> > <?php echo $this->form(); ?>
>> >
>> > <br />
>> > <br />
>> > </body>
>> >
>> > In the controller these line to add your example form:
>> >
>> > $form = new MyForm(); // I changed the name of the form to MyForm
>> > $this->view->form = $form;
>>
>> You need to specify a name for the form:
>>
>> $form = new MyForm(array('name' => 'foo'));
>>
>> I'll update the docs to indicate this.
>>
>> > Now I get the following error:
>> >
>> > Warning: Missing argument 1 for Zend_Dojo_View_Helper_Form::form() in
>> W:\usr\
>> > local\php\includes\Zend\Dojo\View\Helper\Form.php on line 62
>> >
>> > Am I doing anything wrong here?
>> >
>> > 2008/7/26 Matthew Weier O'Phinney <[EMAIL PROTECTED]>
>> >
>> > -- Christian Sanchez <[EMAIL PROTECTED]> wrote
>> > (on Friday, 25 July 2008, 10:32 PM -0500):
>> > > Hey, now I'm reading the docs and implementing the example 12.29
>> from the
>> > docs
>> > > (pretty much a copy and paste to see how it works) but I get the
>> > following
>> > > error:
>> > >
>> > > Fatal error: Call to a member function accordionContainer() on a
>> > non-object in
>> > > W:\www\dev\prueba\application\default\layouts\main.phtml on line
>> 37
>> > >
>> > > I read this in a previous page:
>> > >
>> > > "In order to utilize these view helpers, you need to register the
>> path to
>> > the
>> > > dojo view helpers with your view object.
>> > >
>> > > Example 12.9. Registering the Dojo View Helper Prefix Path
>> > >
>> > > $view->addPrefixPath('Zend/Dojo/View/Helper',
>> 'Zend_Dojo_View_Helper');
>> >
>> > This is incorrect - it should read:
>> >
>> > $view->addHelperPath('Zend/Dojo/View/Helper',
>> 'Zend_Dojo_View_Helper');
>> >
>> > I'll update the manual -- thanks for the report!
>> >
>> >
>> > > If I add this line directly in the controller for this view only I
>> get
>> > the
>> > > following error:
>> > >
>> > > Fatal error: Uncaught exception
>> 'Zend_Loader_PluginLoader_Exception' with
>> > > message 'Plugin by name AddPrefixPath was not found in the
>> registry.' in
>> > W:\usr
>> > > \local\php\includes\Zend\Loader\PluginLoader.php:372 Stack trace:
>> #0 W:\
>> > usr\
>> > > local\php\includes\Zend\View\Abstract.php(1114):
>> > Zend_Loader_PluginLoader->load
>> > > ('AddPrefixPath') #1
>> W:\usr\local\php\includes\Zend\View\Abstract.php
>> > (545):
>> > > Zend_View_Abstract->_getPlugin('helper', 'addPrefixPath') #2
>> W:\usr\local
>> > \php\
>> > > includes\Zend\View\Abstract.php(312):
>> Zend_View_Abstract->getHelper
>> > > ('addPrefixPath') #3 [internal function]:
>> Zend_View_Abstract->__call
>> > > ('addPrefixPath', Array) #4 W:\www\dev\prueba\application\default\
>> > controllers\
>> > > IndexController.php(20):
>> Zend_View->addPrefixPath('Zend/Dojo/View/...',
>> > > 'Zend_Dojo_View_...') #5
>> W:\usr\local\php\includes\Zend\Controller\
>> > Action.php
>> > > (502): IndexController->indexAction() #6
>> W:\usr\local\php\includes\Zend\
>> > > Controller\Dispatcher\Standard.php(293):
>> Zend_Controller_Action->dispatch
>> > > ('indexAction') #7
>> W:\usr\local\php\includes\Zend\Controller\Front.p in
>> > W:\usr\
>> > > local\php\includes\Zend\Loader\PluginLoader.php on line 372
>> > >
>> > > Now, I wonder... Where is the mistake?
>> > >
>> > > --
>> > > Christian S nchez A.
>> >
>> > --
>> > Matthew Weier O'Phinney
>> > Software Architect | [EMAIL PROTECTED]
>> > Zend Framework | http://framework.zend.com/
>> >
>> >
>> >
>> >
>> > --
>> > Christian S nchez A.
>>
>> --
>> Matthew Weier O'Phinney
>> Software Architect | [EMAIL PROTECTED]
>> Zend Framework | http://framework.zend.com/
>>
>
>
>
> --
> Christian Sánchez A.
>
--
Christian Sánchez A.