-
20 Feb 2012 5:35 AM #1
Answered: when is deselectAll() no list --> in selectfield ??
Answered: when is deselectAll() no list --> in selectfield ??
If I change the value of the "selectfield" in the list no function "deselectAll ()"
which means that the list is selected pair of values ....
my changes:
fields:
addlisteners on pos_postypePHP Code:{
xtype:'selectfield',
name:'pos_postype',
label:langX.xType,
options:[
{
text:langX.xServices,
value:'1'
},
{
text:langX.xProducts,
value:'2'
}
],
......
{
xtype:'selectfield',
name:'pos_unittype',
label:langX.xUnitType,
valueField:'unittype_id',
displayField:'unittype_name_de',
store:Ext.StoreMgr.get('Unittype'),
defaultPhonePickerConfig:{
doneButton: langX.xDone,
cancelButton: langX.xCancel
}
},
and change valuePHP Code:updateDx:function(newDx) {
var me = this, x = this.down('formpanel'), c = x.getFields();
st = c.pos_unittype.getStore();
c.pos_postype.on({
change:me.typechange,
scope:me
});
st.clearFilter();
if(newDx != null) {
if(newDx.data.pos_postype == 1) {
st.filter('unittype_service', 1);
} else {
st.filter('unittype_product', 1);
}
x.setRecord(Ext.create('SIMOBILE.model.Position', newDx.data));
} else {
st.filter('unittype_service', 1);
x.setRecord(Ext.create('SIMOBILE.model.Position', {
pos_amount:1,
pos_postype:1,
pos_costperunit:0,
pos_vatid:0
}));
}
},
PHP Code:typechange: function(a) {
var me = this, iv = a.getValue(), x = this.down('formpanel'),
c = x.getFields(), st = Ext.StoreMgr.get('Unittype'), contactmerge =[];
st.clearFilter();
c.pos_unittype.reset();
if(iv == 1) {
st.filter('unittype_service', 1);
} else {
st.filter('unittype_product', 1);
}
st.load();
Ext.Object.each(st.getData().items, function(k, v, m) {
contactmerge.push(v.data);
});
c.pos_unittype.setOptions(contactmerge);
/* !!!!!!!!!!!!!!!!!!!!!!! my chane !!!!!!!!!!!!!!!!!!!!!!
*/
if(c.pos_unittype.getUsePicker()) {
var listPanel = c.pos_unittype.getPhonePicker();
} else{
var listPanel = c.pos_unittype.getTabletPicker();
}
list = listPanel.down('list');
list.deselectAll();
}
-
Best Answer Posted by mitchellsimoens
Ok... that is a bug (reported) in Ext.dataview.DataView
-
20 Feb 2012 5:45 AM #2
sorry for the title ... (too many things at once)
where is the function "deselectAll()" in the list in the component "selectfield"
-
20 Feb 2012 6:16 AM #3Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
- Answers
- 3156
If no value is present in the select field, when the list is shown it will automatically select the first option.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
20 Feb 2012 6:17 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
- Answers
- 3156
The tablet picker is just a floating panel with a child list.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
20 Feb 2012 6:43 AM #5
Unfortunately, this does not happen as you describe, if you use setValue () ... I checked on the list of multiple rows that previously pointed out.
so I had to use deselectAll ()
I think this should be corrected
[sorry for my english]
-
20 Feb 2012 6:54 AM #6Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
- Answers
- 3156
I'm not sure I follow. If you have a value, it will check the store to find a record. If one exists then it will select that record in the list. If one is not found, it will select the first record.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
20 Feb 2012 7:10 AM #7
-
20 Feb 2012 7:11 AM #8Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
- Answers
- 3156
Ok... that is a bug (reported) in Ext.dataview.DataView
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.


Reply With Quote