PDA

View Full Version : [OPEN-766][3.2-beta] DataViewTransition doesn't support empty store



killfill
20 Mar 2010, 12:55 PM
Hello all,


Im trying to make work the example of the DataViewTransition, included un ext-3.2-beta, with a jsonstore instead of an array.

This is what im doing:


Index: view/multisort-dataview.js
===================================================================
--- view/multisort-dataview.js (revision 147)
+++ view/multisort-dataview.js (working copy)
@@ -39,6 +39,13 @@

var dataview = new Ext.DataView({
store: store,
+ store: {
+ xtype: 'jsonstore',
+ url: '/app/prueba/dataview2.php',
+ autoLoad: true,
+ root: 'data',
+ fields: ['hasEmail', 'hasCamera', 'id', 'name', 'price', 'screen', 'camera', 'color', 'type', 'reviews', 'screen-size']
+ },
tpl : new Ext.XTemplate(
'<ul>',
'<tpl for=".">',


The file dataview2.php is this:

<?
$datos = array();
$datos[] = array('hasEmail'=>false, 'hasCamera'=>false, 'id'=>1, 'name'=>'nombre1', 'price'=>343, 'screen'=>'screen1', 'camera'=>'cam1', 'color'=>'az1', 'type'=>'tipo1', 'reviews'=>'rew1', 'screen-size'=>'scree-siz1');
$datos[] = array('hasEmail'=>false, 'hasCamera'=>false, 'id'=>2, 'name'=>'nombre2', 'price'=>323, 'screen'=>'screen2', 'camera'=>'cam2', 'color'=>'az2', 'type'=>'tipo2', 'reviews'=>'rew1', 'screen-size'=>'scree-siz2');
echo json_encode( array('data'=>$datos) );



The problem is on DataViewTransition, line 91:

var el = parentEl.child("#" + this.dataviewID + "-" + calcItem.get('id'));

el becomes null, it does not find the child.
Why does this happen?
How do i make it work with a jsonstore?


Thanks!!

killfill
22 Mar 2010, 6:25 AM
Have anyone use DataViewTransition with jsonstore jet?...

Condor
22 Mar 2010, 6:39 AM
The Ext.ux.DataViewTransition plugin currently doesn't support empty stores (your store is initially empty before the server returns the data).

Would you like me to move this thread to the Bugs section?

killfill
22 Mar 2010, 10:16 AM
sure. thanks!

killfill
1 Apr 2010, 2:27 PM
BTW, the same happends with 3.2.0 release.

Thanks!!

addphil
14 Apr 2010, 5:47 AM
It seems the plugin was made for local Datastores only ?

Stju
3 Sep 2010, 6:28 AM
Half Year ago this was posted to bugs.. Still not fixed! Even no solution ... Looks like this and hundreds other bugs will be left in 3. x branch.. For me looking at SVN repository looks like the most forces are moved to work on new version (4.x and Sencha touch), rather than FIRST FIXING EXISTING BUGS.

Jamie Avins
3 Sep 2010, 8:26 AM
Development effort for ExtJS is currently split between 3.3 and 4.x, and UX code is even a lower priority. That being said, many bugs are due to limitations in the existing design. In order to fix these bugs, an entire class and often many classes have to be rewritten. As the rewriting of these classes often changes the API and we need to do them when a major release is done else it will break existing code.

ttbgwt
10 Feb 2011, 5:37 PM
Is there a fix for this?