Issues

ZF-7266: Dijit parsing before store creation fails value setting in FilteringSelect and ComboBox.

Issue Type: Bug Created: 2009-07-14T08:45:18.000+0000 Last Updated: 2009-11-19T11:57:33.000+0000 Status: Resolved Fix version(s): - 1.9.6 (24/Nov/09)

Reporter: Kevin Craine (craineum) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Dojo

Related issues: - ZF-7360

Attachments:

Description

In 1.8.4, doing something like this in a view:

echo $this->filteringSelect( 'select', '20', array( 'store' => 'store', 'storeType' => 'dojo.data.ItemFileReadStore', 'storeParams' => array('url' => '/my/data')) );

Fails, the 'value' is not set because the store is not loaded when it it parses the input. With a filteringSelect the input remains a textbox with the value set, but it is not a dojo object, and everything else on the page breaks. With a comboBox the value and label are set to the identifier value that I am passing instead of the label getting set properly (assuming because combo box allows things not in the store). I tried putting a 'value' option in the params array, but that doesn't seem to propagate, and even if I test this by hand it still doesn't load properly because of the way things are getting parsed.

Anyone have any idea's? Besides creating all this stuff by hand?

Comments

Posted by Matthew Weier O'Phinney (matthew) on 2009-11-19T08:56:26.000+0000

Confirmed.

Posted by Matthew Weier O'Phinney (matthew) on 2009-11-19T09:39:45.000+0000

The following scenarios work: * Declarative usage ** If the store is already defined prior to parsing, and the widget references the jsId of the store, then the value will be set. ** If the store is already defined prior to parsing, but the widget does not define the store and the store is manually added to the widget following parsing, the value will not be set. ** If the store is already defined prior to parsing, but has no jsId, there's no way whatsoever to associate it with the widget; the value will not be set. * Programmatic usage ** The store must be set and added as part of the widget declaration for the value to be set (i.e., added as an object, not as a string referencing the jsId) ** Any other situation will result in no value being set

Thus, the only way for this to work is for the store declaration to happen prior to onLoad, and for the store declaration to define a jsId.

Posted by Matthew Weier O'Phinney (matthew) on 2009-11-19T11:57:33.000+0000

Fixed in trunk and 1.9 release branch

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts