PDA

View Full Version : [FIXED-271] Ext.Picker with slots value not working



ankuravlani
8 Sep 2010, 4:43 PM
Hi,

I was working sencha touch 0.93 beta release and my Ext.Picker functionality was working.
Today I downloaded the latest 0.94 release. My Ext.Picker code is as follows:


sqftPicker = new Ext.Picker({
modal:true,
hideOnMaskTap: true,
useTitles: true,
slots:[{
title: 'From',
name: 'from',
align: 'left',
items: [{text:"", value:""}, {text:"No Min", value:"No Min"},{text:"250",value:"250"},{text:"500",value:"500"},
{text:"1000",value:"1000"},{text:"1500",value:"1500"},{text:"2000",value:"2000"},{text:"3000",value:"3000"},{text:"5000",value:"5000"}]
},{
title: 'To',
name: 'to',
align: 'right',
items: [{text:"", value:""}, {text:"No Max", value:"No Max"},{text:"500",value:"500"},{text:"1000",value:"1000"},
{text:"2000",value:"2000"},{text:"3000",value:"3000"},{text:"4000",value:"4000"},{text:"5000",value:"5000"},{text:"7500",value:"7500"},{text:"10000+",value:"10000+"}]
}]
});


Can someone let me know where is the bug?. Generally in 0.93 it used to display the picker with the specificed values in slots array, but now its displaying an empty picker.

Thanks,
Ankur

ankuravlani
8 Sep 2010, 5:49 PM
HI,

I modified my code and its working now:


sqftPicker = new Ext.Picker({
modal:true,
useTitles: true,
showDoneButton: false,
slots:[{
title: 'From',
name: 'from',
align: 'center',
data: [{text:"No Min", value:"No Min"},{text:"250",value:"250"},{text:"500",value:"500"},
{text:"1000",value:"1000"},{text:"1500",value:"1500"},{text:"2000",value:"2000"},{text:"3000",value:"3000"},{text:"5000",value:"5000"}]
},{
title: 'To',
name: 'to',
align: 'center',
data: [{text:"No Max", value:"No Max"},{text:"500",value:"500"},{text:"1000",value:"1000"},
{text:"2000",value:"2000"},{text:"3000",value:"3000"},{text:"4000",value:"4000"},{text:"5000",value:"5000"},{text:"7500",value:"7500"},{text:"10000+",value:"10000+"}]
}],
dockedItems: [{
xtype: 'toolbar',
dock: 'top',
title: 'Sq.Ft.',
// custom alignment of titlebar to left
titleCls: 'x-toolbar-title x-toolbar-left',

// alignment of the button to the right via
// flexed components
items: [{xtype: 'component', flex: 1},{
xtype: 'button',
ui: 'action',
text: 'Done',
handler: function() {
var v = sqftPicker.getValue();
if(v.to != "10000+" && v.to != "No Max" && v.from != "No Min"){
if(parseInt(v.from)> parseInt(v.to)){
isSqFtError=true;
sqftPicker.hide();
showErrorMessage("From cannot be greater than To value.",120);
return;
}
}
Ext.get("filterSqFtID").setHTML(v.from +"-"+v.to);
sqftPicker.hide();
// alert(Ext.encode(v));
}
}]
}]
});

But i dont see the TITLE for any columns, do i need to do anything specific?




Hi,

I was working sencha touch 0.93 beta release and my Ext.Picker functionality was working.
Today I downloaded the latest 0.94 release. My Ext.Picker code is as follows:


sqftPicker = new Ext.Picker({
modal:true,
hideOnMaskTap: true,
useTitles: true,
slots:[{
title: 'From',
name: 'from',
align: 'left',
items: [{text:"", value:""}, {text:"No Min", value:"No Min"},{text:"250",value:"250"},{text:"500",value:"500"},
{text:"1000",value:"1000"},{text:"1500",value:"1500"},{text:"2000",value:"2000"},{text:"3000",value:"3000"},{text:"5000",value:"5000"}]
},{
title: 'To',
name: 'to',
align: 'right',
items: [{text:"", value:""}, {text:"No Max", value:"No Max"},{text:"500",value:"500"},{text:"1000",value:"1000"},
{text:"2000",value:"2000"},{text:"3000",value:"3000"},{text:"4000",value:"4000"},{text:"5000",value:"5000"},{text:"7500",value:"7500"},{text:"10000+",value:"10000+"}]
}]
});


Can someone let me know where is the bug?. Generally in 0.93 it used to display the picker with the specificed values in slots array, but now its displaying an empty picker.

Thanks,
Ankur

Jamie Avins
9 Sep 2010, 9:28 AM
I believe the parameter is 'text' now instead of 'title' for the slot config.

ankuravlani
9 Sep 2010, 11:22 AM
I tried with both text and title, but it doesnt show up. Also on android the picker doesnt show up completely it gets hidden below, not sure why. I havent specified any height for the picker.

ankuravlani
9 Sep 2010, 3:17 PM
I am developing a app for android with sencha touch. I downloaded the latest 0.94 touch release. The picker used to work properly till 0.93 release. Now in 0.94 after making the required modifications to Picker it looks as follows:

22315

The code for the picker is as follows:


sqftPicker = new Ext.Picker({
modal:true,
minHeight:'440',
height:'440',
slots:[{
name: 'Sqft from',
align:'center',
data: [{text:"No Min", value:"No Min"},{text:"250",value:"250"},{text:"500",value:"500"},
{text:"1000",value:"1000"},{text:"1500",value:"1500"},{text:"2000",value:"2000"},{text:"3000",value:"3000"},{text:"5000",value:"5000"}]
},{
name: 'Sqft to',
align:'center',
data: [{text:"No Max", value:"No Max"},{text:"500",value:"500"},{text:"1000",value:"1000"},
{text:"2000",value:"2000"},{text:"3000",value:"3000"},{text:"4000",value:"4000"},{text:"5000",value:"5000"},{text:"7500",value:"7500"},{text:"10000+",value:"10000+"}]
}]
});

What modifications are required to make the picker look good?

Thanks and regards,
Ankur.

aconran
10 Sep 2010, 9:20 AM
What version of Android/what phone are you using?

ankuravlani
10 Sep 2010, 9:30 AM
I am using Motorola Droid, firmware version is 2.1-update1.

mtgr8
10 Sep 2010, 12:53 PM
Looks like more folks are encountering this problem:
http://www.sencha.com/forum/showthread.php?109467-Select-issue-in-version-0.94.

aconran
10 Sep 2010, 1:51 PM
We've done some work for Android 2.1 that could possibly fix your issue. Could you please test Monday's 0.95 release?

TommyMaintz
11 Sep 2010, 7:07 AM
We have added back in support for Picker slots to have titles. Your example should work again with the next release (0.95).

SunboX
1 Jan 2011, 5:50 AM
seems that slot titles are not working in release 1.0.2. Can someone confirm this? Whats the last working release?

babar.sajjad
12 Jul 2011, 8:13 AM
yes its not working, Sunbo did you find any solution for this ?