1. #1
    Sencha User
    Join Date
    Dec 2012
    Location
    Odense, Denmark
    Posts
    2
    Vote Rating
    0
    swarco_jesper is on a distinguished road

      0  

    Default TypeError when using CompositeField

    TypeError when using CompositeField


    Hi,
    I am working on a frontend for a system at my job - using ExtJS 3.4. It is basically a tabpanel with a table layout. In my table I have 5 "subpanels" with different colspans.

    One of the "subpanels" is a form panel... so far so good - this works fine... In the form I have a number of checkbox groups and textfields and one of these textfields needs a button next to it.

    After some searching I found the compositefield and realized this would solve my problem. I do however get this error when using a compositefield:
    Code:
    Uncaught TypeError: undefined is not a function
    The compositefield is setup like this:
    Code:
                                   {
                                        xtype: 'compositefield',
                                        defaults:
                                        {
                                            flex: 1
                                        },
                                        items: [
                                        {
                                            xtype:"numberfield",
                                            fieldLabel:"Set PIN",
                                            id:"pin_value",
                                            name: 'pin_value'
                                        },
                                        {
                                            xtype: 'button',
                                            text: 'Remove PIN',
                                            name: 'remove_pinBtn',
                                            handler: function() {/* submit code */ }
                                        }]
                                    }
    The code snippet is an item in a form panel - didn't think it was necessary to post the entire form as this works fine without the compositefield (i.e I comment out the compositefield item).
    Last edited by swarco_jesper; 4 Apr 2013 at 3:54 AM. Reason: clarification

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,791
    Vote Rating
    833
    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


    That error is usually from using an xtype that is not registered.
    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
    Dec 2012
    Location
    Odense, Denmark
    Posts
    2
    Vote Rating
    0
    swarco_jesper is on a distinguished road

      0  

    Default


    Quote Originally Posted by mitchellsimoens View Post
    That error is usually from using an xtype that is not registered.
    Thanks for the input but I must admit I am not following... The xtype is defined in accordance with ExtJS 3.4 documentation

  4. #4
    Sencha User
    Join Date
    Feb 2014
    Location
    Oklahoma, USA
    Posts
    2
    Vote Rating
    0
    amandaharlin is on a distinguished road

      0  

    Default


    I could be wrong, but I think he means you have to check to see if the xtype has been registered with the component manager.

    Code:
    <!--this is how i've handled checking to see if the xtype is registered with the componentMgr-->
     <listeners
                cr:primaryType="nt:unstructured"
                add="function() { if(!CQ.Ext.ComponentMgr.isRegistered('multiImageUploaderField')){location.reload();}}"/>
                
                
                
                
                
    <!--that example comes from my src below. hope it gives you a better idea.-->            
      <items jcr:primaryType="cq:WidgetCollection">
                <slideshow
                    jcr:primaryType="cq:Widget"
                    title="Slideshow"
                    width="629"
                    xtype="panel">
                    <items jcr:primaryType="cq:WidgetCollection">
                        <gallery
                            jcr:primaryType="cq:Widget"
                            fieldLabel="Set Images"
                            hideLabel="{Boolean}true"
                            name="./gallery"
                            title="Gallery"
                            xtype="multifield">
                            <fieldConfig
                                jcr:primaryType="nt:unstructured"
                                xtype="multiImageUploaderField"/>
                            <listeners
                                jcr:primaryType="nt:unstructured"
                                add="function() { if(!CQ.Ext.ComponentMgr.isRegistered('multiImageUploaderField')){location.reload();}}"/>
                        </gallery>
    </items>
    

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