-- dele454 <d...@killerinstinct.co.za> wrote
(on Monday, 22 December 2008, 03:07 PM -0800):
> 
> I dont know why this is so but this is the problem i am encountering. If i
> use dojo declaratively, the dojo view helper applies the dijit params as
> expected as well as the theme specified. But if i add a form element
> programmatically, though it create the form element none of the dijit
> paramters as well as the choosen theme is applied
> 
> <input 
>         type="text"
>         id="firstName"
>         size="20"
>         dojoType="dijit.form.ValidationTextBox"
>         required="true"
>         propercase="true"
>         promptMessage="Enter first name."
>         invalidMessage="First name is required."
>         trim="true"
>               onchange="userNameOnChange()"
>         
> />
>       
> <?= $this->validationTextBox(
>     'firstname',
>     'Start writing here...',
>     array('required' => true, 
>             'propercase' => true, 
>                 'promptMessage' => 'Enter first name',
>                 'invalidMessage' => 'First name is required'),
>     array('size' => '20')
>    
> );?>
> 
> These  two textbox creation produces the view attached..
> 
> http://www.nabble.com/file/p21136696/me.gif 
> 
> Doing this programmtically, is it correct as per the docucmentation? Is this
> the programmtic way of creating Dijit Elements?:
> 
> "Programmatic usage allows the developer to decorate existing elements by
> pulling them by ID or CSS selectors and passing them to the appropriate
> object constructors in Dojo. Because no non-standard HTML attributes are
> used, pages continue to validate."
> 
> Sorry but i seem very confused at the moment ;)

The parameters are mixed in client-side, by javascript, after the DOM
has been loaded.  If you do a view source, you won't see them -- but if
you use a tool such as Firebug and inspect the live document, you will. 

-- 
Matthew Weier O'Phinney
Software Architect       | matt...@zend.com
Zend Framework           | http://framework.zend.com/

Reply via email to