1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    4
    Vote Rating
    0
    senchadriver is on a distinguished road

      0  

    Default How do I access panel data from a button on a navigationvew bar?

    How do I access panel data from a button on a navigationvew bar?


    I'm new to Sencha Touch coming from native obj-c. In my controller, I have the following code below. My panel currently has data set to it from a previous list that's been pushed to the navigationview.<br>
    <br>
    onRecordingAction: function() {<br>
    &nbsp;&nbsp;&nbsp;&nbsp;var actionButton = this.getActionButton();<br>
    <br>
    &nbsp;&nbsp;&nbsp;&nbsp;var overlay = new Ext.Panel({<br>
    &nbsp;&nbsp;&nbsp;&nbsp;left: 0,<br>
    &nbsp;&nbsp;&nbsp;&nbsp;modal: true,<br>
    &nbsp;&nbsp;&nbsp;&nbsp;scroll: false,<br>
    &nbsp;&nbsp;&nbsp;&nbsp;padding: 10,<br>
    &nbsp;&nbsp;&nbsp;&nbsp;id:'actionPanel',<br>
    &nbsp;&nbsp;&nbsp;&nbsp;layout: {<br>
    &nbsp;&nbsp;&nbsp;&nbsp; type: 'vbox',<br>
    &nbsp;&nbsp;&nbsp;&nbsp; align:'center',<br>
    &nbsp;&nbsp;&nbsp;&nbsp; pack:'center'<br>
    &nbsp;&nbsp;&nbsp;&nbsp;},<br>
    &nbsp;&nbsp;&nbsp;&nbsp;items:[<br>
    &nbsp;&nbsp;&nbsp;&nbsp; {xtype: 'spacer'},<br>
    &nbsp;&nbsp;&nbsp;&nbsp; {<br>
    &nbsp;&nbsp;&nbsp;&nbsp; xtype: 'button',<br>
    &nbsp;&nbsp;&nbsp;&nbsp; ui:'action',<br>
    &nbsp;&nbsp;&nbsp;&nbsp; id: 'startRecording',<br>
    &nbsp;&nbsp;&nbsp;&nbsp; text: 'Start Recording',<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;listeners: {<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tap: function() {<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var pnl = Ext.getCmp('actionPanel');<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//**** I need to access panel data here<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>
    &nbsp;&nbsp;&nbsp;&nbsp; },<br>
    &nbsp;&nbsp;&nbsp;&nbsp; {xtype: 'spacer'}<br>
    &nbsp;&nbsp;&nbsp;&nbsp;]}).showBy(actionButton);<br>
    },<br>
    <br>
    Any help appreciated.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,754
    Vote Rating
    828
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    I cannot read your code.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Oct 2012
    Posts
    4
    Vote Rating
    0
    senchadriver is on a distinguished road

      0  

    Default Sorry about that. Reposting code.

    Sorry about that. Reposting code.


    Code:
    showRecordingPanel: function() {
    	var recordingButton = this.getRecordingButton();
    
    
    	var overlay = new Ext.Panel({
    	left: 0,
    	modal: true,
    	scroll: false,
    	padding: 10,
    	id:'actionPanel',
    	layout: {
    	    type: 'vbox',
    	    align:'center',
    	    pack:'center'
    	},
    	items:[
    	    {xtype: 'spacer'},
    	    {
    	        xtype: 'button',
    	        ui:'action',
    	        id: 'startRecording',
    	        text: 'Start Recording',
    			listeners: {
    				tap: function() {
    					var pnl = Ext.getCmp('actionPanel');
    					
    					// How do you access data from panel here??
    					
    				}
    			}
    	    },
    	    {xtype: 'spacer'}
    	]}).showBy(recordingButton);
    	
    },

  4. #4
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Berne, Switzerland
    Posts
    714
    Vote Rating
    42
    ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about

      0  

    Default


    It may be clearer if you could provide your panel code / definition as well... At least the part you want to access. Also which version of the SDK are you using?

  5. #5
    Sencha User
    Join Date
    Oct 2012
    Posts
    4
    Vote Rating
    0
    senchadriver is on a distinguished road

      0  

    Default Controller and panel code

    Controller and panel code


    Code:
    
    In Controller:
    
    
    showDetail: function(list, record) {
    	this.showActionButton();
    				
    	this.getMain().push({
    		xtype: 'recordingdetail',
    		data: record.getData()
    	})
    
    
    
    
    In another file:
    
    
    Ext.define('MyRecording.view.RecordingDetail', {
        extend: 'Ext.Panel',
        xtype: 'recordingdetail',
    
    
        config: {
            title: 'Recording Detail',
            styleHtmlContent: true,
            scrollable: 'vertical',
            tpl: [
                '<p>{recordingNo} {category} </p> <p>Recording started: {recDate}'
            ]
        }
    });

  6. #6
    Sencha User
    Join Date
    Oct 2012
    Posts
    4
    Vote Rating
    0
    senchadriver is on a distinguished road

      0  

    Default Sencha Touch Version

    Sencha Touch Version


    2.0.1.1

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi