Hi everyone !
I've had a problem with a dojo form, using dojo's SimpleTextArea. Actually the bug is I only get a textarea, but not the benefits of the SimpleTextArea in dojo (the box auto-grows when users types return characters) ;
The thing I don't understand is than when I use a dojo simple text area on the same page, it works normally. I'd like to use it through the Zend framework though, so if anyone has an idea of the problem I'd be really out of pain.
Here's my form :
class MatterCreation extends Zend_Dojo_Form
{
public function init()
{
Zend_Dojo::enableForm($this);
$this->setName('form');
$this->setAction('/new')
->setMethod('post');
$this->addElement(
'SimpleTextarea',
'simpletextarea',
array(
'label' => 'SimpleTextarea',
'required' => true,
'style' => 'width: 100px; height: 50px;'
)
);
}
}
Ok, now here's my page :
<?php $this->dojo()->javascriptCaptureStart(); ?>
dojo.require("dijit.form.Textarea");
<?php $this->dojo()->javascriptCaptureEnd(); ?>
// Simple text area won't work here !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<?php
if(!isset($this->errors))
{
echo $this->form;
}
else { echo $this->errors; }
?>
<!-- // BUT IT DOES WORK PERFECTLY IF I ADD THIS, WTF !!!
<textarea id="textarea2" name="textarea2" dojoType="dijit.form.Textarea"
style="width:200px; background-image:none;">
d
</textarea>
-->
Thanks guys for any tips on how to solve this !
Hotmail : une messagerie fiable avec la protection anti-spam performante de Microsoft Inscrivez-vous
2010年2月11日星期四
订阅:
博文评论 (Atom)
没有评论:
发表评论