1. #1
    Ext User
    Join Date
    Aug 2010
    Posts
    12
    Vote Rating
    0
    gimox is on a distinguished road

      0  

    Default add new panel in kitchen sink demo

    add new panel in kitchen sink demo


    hi this is the 3 o 4 time i ask help about this question, i know is very simple but this is the first time in senca form me, please end me a solution.

    now i try to ask you only 1 think.

    in a list contact i need to display in a new panel some info.
    I search in forum and i try some code and what i do is display in the same panel a info. (add funtion).
    So i need cancel the page and display only the new info.

    this is the code.
    Code:
    <script type="text/javascript">
    Ext.regModel('Contact', {
        fields: ['id_pz','firstName', 'lastName']
    });
    
     
    easyd.ListStore = new Ext.data.Store({
        model: 'Contact',
        sorters: 'firstName',
        getGroupString : function(record) {
            return record.get('firstName')[0];
        },
        data: [
    	
    	<?
    	for ($i = 0; $i < $num; $i++) 
                                   {
    $id= mysql_result($result,$i,"id");
    $nome= stripslashes(mysql_result($result,$i,"nome"));
    $cognome= stripslashes(mysql_result($result,$i,"cognome"));
    if ($i == $num) {$end="";}else{$end=",";}
    echo " {id_pz: '".$id."', firstName: '".$nome."', lastName: '".$cognome."' }".$end;		 
    						 
    							   }
    	 ?>
    	 ]
            });
    
    
    
    easyd.Listpazienti = new Ext.Panel({
        layout: Ext.platform.isPhone ? 'fit' : {
            type: 'vbox',
            align: 'center',
            pack: 'center'
        },
        cls: 'demo-list',
        items: [{       
    	    width: 300,
            height: 500,
            xtype: 'list',
    	
            disclosure: {
                scope: easyd.ListStore,
                handler:  function(record, btn, index) {
    				 var id_pz = record.get('id_pz');
    				 var cardId ="my id is: " + id_pz;
              //   alert(cardId);
    			  card = easyd.Listpazienti.getComponent(cardId);
    			   if(!card){
                            card = easyd.Listpazienti.add({
                                itemId: cardId,
                                html: 'hallo'
                            });
                           easyd.Listpazienti.doLayout();
                        }
    		        easyd.Listpazienti.setCard(card);
    			  
    			  
    			    
    			  
    			  
                }
            },
            store: easyd.ListStore,
            tpl: '<tpl for="."><div class="contact"><strong>{firstName}</strong> {lastName}  </div></tpl>',
            itemSelector: 'div.contact',
            singleSelect: true,
            grouped: true,
            indexBar: true
        }]
    	
    	
    	
    	
    	
    });
    repeat.... what i need is display only the " hall " in the same ext panel, now it add the hallo in the panel with the list contact.

    can anyone post the code (NOT SAY CREATE A NEW PANEL PLEASEEEEEEEEEEEEE)

  2. #2
    Ext User
    Join Date
    Aug 2010
    Posts
    12
    Vote Rating
    0
    gimox is on a distinguished road

      0  

    Default


    heeelp

Similar Threads

  1. Ajax Data Kitchen Sink demo Broken?
    By RobertG in forum Sencha Touch 1.x: Discussion
    Replies: 5
    Last Post: 5 Sep 2010, 10:36 PM
  2. Replies: 4
    Last Post: 13 Aug 2010, 8:07 AM
  3. Question to Cards of Kitchen Sink/ Events Example
    By msinn in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 30 Jul 2010, 12:53 PM
  4. [FIXED-99] Rotating iPhone breaks kitchen sink example.
    By DustinHES in forum Sencha Touch 1.x: Bugs
    Replies: 11
    Last Post: 29 Jul 2010, 9:37 AM
  5. Replies: 2
    Last Post: 28 May 2009, 1:14 PM