ZF-8517: Wrong key for ´searchAttr´ in ´storeParams´ ´url´ on load when using setValue() on Zend_Dojo_Form_Element_FilteringSelect

Description

I use a simple filteringSelect in a form using the declarative method.


$fooElem = new Zend_Dojo_Form_Element_FilteringSelect(
    'foo',
    array(
        'label' => 'foo',
        'storeId'   => 'fooStore',
        'storeType' => 'dojox.data.QueryReadStore',
        'storeParams' => array(
            'url' => '/issues/ajax/data'
        ),
        'dijitParams' => array(
            'searchAttr' => 'name'
        )
    )
);
#$fooElem->setValue('xxx');

The store gets the data from the following url on load:


http://.../issues/ajax/data?name=&start=0

The key for the ´searchAttr´ in the query string is named correctely as ´name´. This happens by default even without setting it explicitly in the ´dijitParams´ array.

Next I set the value on the element:


$fooElem->setValue('xxx');

For some reason the key for the ´searchAttr´ in the query string has changed into ´id´, allthough it is explicitly set in the ´dijitParams´ array:


http://.../issues/ajax/data?id=xxx&start=0

The programmatic method acts the same way. This is the ´zendDijits´ Code:


var zendDijits = [{"id":"foo","params":{"store":"fooStore","searchAttr":"name","dojoType":"dijit.form.FilteringSelect"}},{"id":null,"params":{"dojoType":"dijit.form.Form"}}];

The element created looks like this:


It obviously includes invalid tags. See issue http://framework.zend.com/issues/browse/ZF-6052!

Unfortunately I can't see any difference between the code that could cause the wrong url. So I guess this problem occurs in dojo itself?!

Comments

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.