Results 1 to 5 of 5

Thread: [2.1.0 RC2] How can I nest a custom Component into List?

  1. #1
    Sencha User Frank's Avatar
    Join Date
    Mar 2007
    Posts
    186
    Vote Rating
    1
      0  

    Default Answered: [2.1.0 RC2] How can I nest a custom Component into List?

    In ST 2.0, I can nest a custom Component into the List as a ListItem. Like this, the up and down are all in one List:
    1.jpg
    However, in st 2.1 rc2, the custom Component hidden! Only listitem is shown. How can I show the custom Component?
    Thanks everybody!
    Ext Every Day!
    ajaxjs.com

  2. Code:
    items:[{scrollDock:'bottom',html:'xxxxxx'}]
    ???????2.1-rc2?????....

  3. #2
    Sencha User
    Join Date
    Apr 2010
    Location
    China
    Posts
    227
    Answers
    64
    Vote Rating
    20
      1  

    Default

    List is container,you can add your custom component via items config or list.add()
    If you mean a custom DataItem,read document
    http://localhost/sencha-touch-2.1.0-...view-section-4
    I write English by translator.

  4. #3
    Sencha User Frank's Avatar
    Join Date
    Mar 2007
    Posts
    186
    Vote Rating
    1
      0  

    Default

    Code:
    /**
     * @class   SMC_yitv.view.VOD.topicDetail
     * @extends Ext.dataview.List
     * @xtype	vodTopicDetail
     * @todo ??
     * ?? ???
     */
    Ext.define('SMC_yitv.view.VOD.topicDetail', {
      	 extend	: 'Ext.dataview.List'
    	,xtype	: 'vodTopicDetail'
    	,config : {
    		 itemCls: 'vodList' 
    	    ,store	 : { 
    	    	...	
    		}
            ,itemTpl: '<img src="{logo_s}" />' +
            		  '<h2>{name}</h2>' + 
        				// ?????
    			  	  '{[values.vlong ? "<p>???" + values.vlong + "</p>":""]}' +
    			  	  '<p>{description}</p>' +
    			  	  '<div class="playBtn"></div>'
    		,items : [
    			{
    				 xtype  : 'retrunBar'
    				,data	: {
    					 title	: '??'/* ????????? '#vod/function'*/
    				}
    			}
    			// ?????? component????????
    			,{
    				html :   
    						 ('<div class="detailBanner">')
    							+('	<img width="100%" />')
    						+("<\/div>")
    						+("<div class=\"topicDescription\">")
    							+'<p class="text"></p>' 
    							+'<button class="showMore opened"></button>'
    //							+"<div class=\"x-contMask x-contMask_bg\"></div>"
    						+"<\/div>" +
    						'<div class="title">? ? ? ?</div>'
    				,xtype : 'component'
    			}
    		]
    	}
    });
    ?? custom component ??? list ??????????? list ??????
    Ext Every Day!
    ajaxjs.com

  5. #4
    Sencha User
    Join Date
    Apr 2010
    Location
    China
    Posts
    227
    Answers
    64
    Vote Rating
    20
      0  

    Default

    Code:
    items:[{scrollDock:'bottom',html:'xxxxxx'}]
    ???????2.1-rc2?????....
    I write English by translator.

  6. #5
    Sencha User Frank's Avatar
    Join Date
    Mar 2007
    Posts
    186
    Vote Rating
    1
      0  

    Default

    Quote Originally Posted by haduki View Post
    Code:
    items:[{scrollDock:'bottom',html:'xxxxxx'}]
    ???????2.1-rc2?????....
    Got it!????
    Ext Every Day!
    ajaxjs.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •