Sorry Matt, for seeing your question so late.

I would like to write a tutorial on devzone about those tricks, but my proposal about that is still under review (Matthew, Cal?).

It comes down to delegating the responsibility for adding decorators to a small set of classes that know how to add decorators well. They are organized in such a way that you can group form elements in any way your like, without having to worry about decorators. If you require a new way of grouping elements, you extend one of those classes to suit your needs and never have to worry about decorators again. The tricky part is, that with jquery (and dojo?), these classes will have to check if a jquery decorator is present and preserve that. After I arranged this, I still got the error of argument 4 not being an array. The solution to that is in my mail posted earlier today.

Regards,

Bart

Matthew Ratzloff schreef:

    It would have been nice if this element would have been completely
    compatible with all the tricks I play.


What tricks are those?

-Matt

On Thu, Oct 23, 2008 at 2:57 PM, Bart McLeod <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Hi Benjamin,

    Yes and no. I know where to look to find out what is happening. It
    would have been nice if this element would have been completely
    compatible with all the tricks I play. For now, just close the
    bugreport. If I find a compatibility issue later, that I can
    describe more properly, I will let you know.

    At the moment, I am a little sad that using jquery directly is
    simpler than using its'  ZF integrated counterpart. I was
    expecting the opposite...but I will not give up yet.

    Regards,

    Bart

    Benjamin Eberlei schreef:
so this is not at all ZendX_JQuery related? its due to your own form implementation? i have already created a bug report, i will close it then if you can confirm that.

    On Thursday 23 October 2008 23:31:41 Bart McLeod wrote:
    By now, I found that the error is due to some internal magic I use for
    my forms. Still a strange error.
    I was able to use a ZendX_JQuery_Form_Element_Datepicker, named 'begin'
    in a regular form that has no magic to it.

    Bart

    Bart McLeod schreef:
    Hi all,

            $elem = new ZendX_JQuery_Form_Element_DatePicker("begin",
    "12.12.2007", array(), array());
            $elem->setJQueryParam('dateFormat', 'dd.mm.yy');
            $this->addElement($elem);

    yields:
    *Catchable fatal error*: Argument 4 passed to
    ZendX_JQuery_View_Helper_DatePicker::datePicker() must be an array,
    null given in
    *E:\ZendFramework\library\ZendX\JQuery\View\Helper\DatePicker.php* on
    line *54

    *while:

            $elem = new ZendX_JQuery_Form_Element_DatePicker("*begin1*",
    "12.12.2007", array(), array());
            $elem->setJQueryParam('dateFormat', 'dd.mm.yy');
            $this->addElement($elem);

    gets a datepicker. See the difference? The id! The id cannot be called
    'begin'. It can be called 'begin1'. Maybe there is something in my
    form magic that it causing this. So I should try this without any
    magic, in a very simple form. Wanted to share it with you before I
    forget.

    Bart


Reply via email to