I have done some patches, and now it works perfect with Zend_Form. If you
are interested I can share.

To begin change ZendX_JQuery_Form_Decorator_UiWidgetElement render method
(line #13) http://pastie.org/727831

This patch enables you to use ZendX_JQuery_Form like Zend_Form, just replace
ViewHelper decorator with UiWidgetElement.

Read also http://framework.zend.com/manual/en/zendx.jquery.html

Regards,
Saša Stamenković


On Thu, Dec 3, 2009 at 6:51 PM, Jigal sanders <[email protected]> wrote:

> Hello everyone,
>
> Since I want to use some JQuery in my form I installed ZendX_JQuery. But
> can anyone give example's or tutorials to learn how to use Zend_JQuery_Form?
> How does it go together wit zend_form?
> Thanks
>
>
> On Thu, Dec 3, 2009 at 11:32 AM, Саша Стаменковић <[email protected]>wrote:
>
>> I'm trying now to make tabs, but with display groups, not subforms like in
>> docs example
>>
>> In my form which extends ZendX_JQuery_Form
>>
>> $this->setDisableLoadDefaultDecorators(true);
>>  $this->setDecorators(array(
>>     'FormElements',
>>     array('TabContainer', array(
>>         'id'          => 'tabContainer',
>>         'style'       => 'width: 600px;',
>>     )),
>>     'Form',
>> ));
>>
>> $decorators = array(
>>     'FormElements',
>>     array(
>>      'TabPane', array(
>>          'jQueryParams' => array(
>>          'containerId' => 'tabContainer',
>>  'title' => 'DatePicker and Slider'
>>          )
>>      )
>> )
>> );
>> )->addElement(
>> ...
>> )->addElement(
>> ...
>> )->addDisplayGroup(
>> array(
>>          'el1',
>>          'el3'
>>         ),
>>         'group2',
>>         array (
>>          'decorators' => $decorators
>>         )
>> ...
>>
>> But it looks like ZendX_JQuery_View_Helper_TabContainer does not renders
>> anything, just
>>
>> <div id="tabContainer" class="ui-tabs ui-widget ui-widget-content
>> ui-corner-all" style="width: 600px;" action="/search/result"> </div>
>>
>> Any idea? Where did I go wrong?
>>
>> Regards,
>> Saša Stamenković
>>
>>
>>
>> On Thu, Dec 3, 2009 at 10:35 AM, Саша Стаменковић <[email protected]>wrote:
>>
>>> Is there a way to achieve that in one shot?
>>>
>>> My form is extends ZendX_JQuery_Form and I want
>>> to $this->setElementDecorators() but which one to set UiWidgetElement
>>> or ViewHelper? I don't want to set decorators for each element separately.
>>>
>>> Regards,
>>> Saša Stamenković
>>>
>>>
>>> On Thu, Dec 3, 2009 at 10:21 AM, Benjamin Eberlei <[email protected]>
>>>  wrote:
>>>
>>>>
>>>> The UiWidgetElement decorator is supposed to be used only with jQuery
>>>> elements,
>>>> wheras the "normal" decorator is for "normal" elements.
>>>>
>>>> On Wed, 2 Dec 2009 23:15:38 -0800 (PST), umpirsky <[email protected]>
>>>>
>>>> wrote:
>>>> > Hi.
>>>> >
>>>> > I started using ZendX_JQuery_Form, and noted few things:
>>>> >
>>>> > 1. Replacing ViewHelper with UiWidgetElement produces
>>>> Zend_Form_Element*
>>>> > not
>>>> > to render correctly. Then I added ugly patch in
>>>> > ZendX_JQuery_Form_Decorator_UiWidgetElement in render method
>>>> > (http://pastie.org/725073 line #13).
>>>> > I don't see why ZendX_JQuery_Form_Decorator_UiWidgetElement calls
>>>> > $elementContent = $view->$helper($name, $value, $jQueryParams,
>>>> $attribs);
>>>>
>>>> > instead
>>>> > $elementContent = $view->$helper($name, $value, $attribs,
>>>> > $element->options);
>>>> > in this case it can have jQuery options in attribs use it and then
>>>> just
>>>> > unset it - and we have a compatibility with Zend_Form_Element_*. Which
>>>> is
>>>> a
>>>> > must, since jQuery UI don't have all element replacements(input,
>>>> checkbox,
>>>> > radio...)
>>>> >
>>>> > 2. Is there a support for factory methods -
>>>> ZendX_Jquery_Form::addElement()
>>>> > ? How do we add elements to ZendX_Jquery_Form?
>>>> >
>>>> > 3. I use
>>>> >
>>>>
>>>> http://www.filamentgroup.com/lab/jquery_ui_selectmenu_an_aria_accessible_plugin_for_styling_a_html_select/
>>>> > and
>>>> >
>>>>
>>>> http://www.filamentgroup.com/lab/update_jquery_ui_slider_from_a_select_element_now_with_aria_support/
>>>> > on my site, have already implemented selectmenu
>>>> (http://pastie.org/725079)
>>>> > it would be nice if someone can review.
>>>> >
>>>> > 4. I have sent my signed CLA a week ago via email, still no response.
>>>> Maybe
>>>> > I can contribute if there is someone from ZendX_JQuery authors to
>>>> discuss.
>>>> >
>>>> > Regards,
>>>> > Saša Stamenković.
>>>>
>>>>
>>
>
>
>
>

Reply via email to