Ver Mensaje Individual
  #16 (permalink)  
Antiguo 07/02/2013, 10:47
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Respuesta: formas de usar decordador ViewScript

Pues los decorators es algo independiente de los módulos y del CSS...

Como te digo a mi me funciona bien usar el viewScript:
Código PHP:
Ver original
  1. class FooBar extends Zend_Form
  2. {
  3.     public function init()
  4.     {
  5.         $this->setMethod(Zend_Form::METHOD_POST);
  6.        
  7.         $this->addElement('text', 'foo', array(
  8.             'required' => true,
  9.             'filters' => array('StringTrim')
  10.         ));
  11.         $this->addElement('text', 'bar', array(
  12.             'required' => true,
  13.             'filters' => array('StringTrim'),
  14.             'validators' => array(
  15.                 array('Float')
  16.             )
  17.         ));
  18.        
  19.         $this->addElement('submit', 'enviar', array(
  20.             'ignore' => true,
  21.             'label' => 'Guardar'
  22.         ));
  23.        
  24.         $this->setElementDecorators(array(
  25.             'ViewHelper'
  26.         ));
  27.        
  28.         $this->setDecorators(array(
  29.             'FormErrors',
  30.             array('ViewScript', array('viewScript' => 'form.phtml')),
  31.             'Form'
  32.         ));
  33.     }
  34. }

Saludos.