-
17 Nov 2011 5:05 AM #1
Unanswered: get value from store
Unanswered: get value from store
hey,
i have a list, and in itemTap, i get values of the store item in my detailCard. In this detailCard, i have a view with some button. i would like to get the data of item tap in the handler of the button for sending after to the action button.
Is it possible ?
thanks
-
17 Nov 2011 12:30 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
- Answers
- 3113
So you have a list and you select one row and you want to get the values of that row via a button?
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.
-
17 Nov 2011 12:34 PM #3
hum, i have a list, when i click on an item, i have a detailcard with some information from the store. in the same panel, i have 3 buttons with differents views. one is a panel where i want to display a map with the longitude and latitude of the item, then of the store.
Can i pass the record from itemtap of the list to the handler of the button. itemtap and handler are in a controller ?
thanks
-
17 Nov 2011 12:57 PM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
- Answers
- 3113
Why not just get the selection on the list when you press the button
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.
-
17 Nov 2011 1:00 PM #5
i can get the data of the good item from the list since the button ?
can i acces to the store since the handler button? but o need the good item taped ...
-
17 Nov 2011 1:09 PM #6Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
- Answers
- 3113
You don't need itemtap listener at all.
If you have a Panel with the List and let's say a bottom docked toolbar with your buttons... in the button handler you can do this:
recs will be an Array of records.Code:var panel = button.up('panel'), list = panel.down('list'), recs = list.getSelectedRecords();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.
-
17 Nov 2011 1:12 PM #7
I need the intermediate panel between the list and the map panel, i display some information from the store in the panel additional the button, and i have already a bottom tabPanel, the button are in the view, with a Vbox.
-
18 Nov 2011 12:13 AM #8
okey, i post some code for understand:
i have in my controller the list item tap:
i open the DirectoryListContainer:Code:App.views.DirectoryListContainer.setActiveItem(App.views.DirectoryDetailContainer, {animation: {type:'flip'}});
and in the handler of buttonViewMap, setActiveItem a view with my Map.Code:App.views.DirectoryDetailPanel = new Ext.Panel({ ........ }, items: [App.views.DirectoryDetailPanelInformations] }, { defaults: { xtype: 'button', margin: 5, flex: 1 }, items: [ { text: 'Map', handler: function() { Ext.dispatch({ controller: App.controllers.Directory, action: 'buttonViewMap', }); } ........
and here ... in longitude and latitude, i would like to get the good longitude - and latitude from the itemTap of the list ...Code:var map = new Ext.Map ({ mapOptions : { center: new google.maps.LatLng(App.config._BaseLatitude, App.config._BaseLongitude), zoom : App.config._BaseMapZoom, mapTypeId: google.maps.MapTypeId.HYBRID, navigationControlOptions: { style: google.maps.NavigationControlStyle.DEFAULT } }, listeners: { beforerender: function() { var latitude = "45.8667"; var longitude = "6.6167"; image = App.config._BaseIconMarker; App.views.DirectoryDetailPanelMap = new Ext.Panel ({ fullscreen: true, dockedItems: [App.views.DirectoryDetailPanelMapToolbar], items: [map], });
Complicated but .. i need this configuration
i don't know how to do simplest...
Do you have a solution ?
thanks


Reply With Quote