Results 1 to 5 of 5

Thread: How to disable the Labelable-Wrapper

  1. #1
    Sencha User
    Join Date
    Mar 2008
    Posts
    24
    Vote Rating
    0
      0  

    Default How to disable the Labelable-Wrapper

    Hi,

    i'm working on an application with lots of fields (Ext.field.Base) and i don't need most of the labelable features, expect for the display of errors (in a Tooltip).
    So how can I prevent my fields being wrapped by a useless table?

    ExtJS 4.1 beta 3

    thanks in advance

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,857
    Vote Rating
    1323
      0  

    Default

    You can override the base field to not call the labelable mixin but that could (will) cause problems
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Mar 2008
    Posts
    24
    Vote Rating
    0
      0  

    Default

    i tried:
    PHP Code:
      autoEl: {
        
    tag'div'
      
    },
      
      
    labelableRenderTpl: [
        
    '<div id="{id}-inputRow">',
          
    '<div id="{id}-labelCell">',
            
    '<div id="{id}-labelEl"></div>',
          
    '</div>',
          
    '<div class="{baseBodyCls} {fieldBodyCls}" id="{id}-bodyEl" role="presentation">',
            
    '{beforeSubTpl}',
            
    '{[values.$comp.getSubTplMarkup()]}',
            
    '{afterSubTpl}',
          
    '</div>',
          
    '<div id="{id}-errorEl" class="{errorMsgCls}" style="display:none" width="{errorIconWidth}"></div>',
        
    '</div>',
        {
          
    disableFormatstrue
        
    }
      ], 
    in a subclass of Ext.form.field.Base and it seems to work, but there are still many (5) unneeded Elements, but if i remove them i get a load of errors...

    Isn't there a possibility to render only what is needed?
    I understand why there is a 3 column layout for fields and why its inside a table. But outside of a Form-Layout if you set hideLabel=true and use an msgTarget thats not "under" or "side" i see no reason for that.

  4. #4
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Redwood City
    Posts
    30,631
    Vote Rating
    57
      0  

    Default

    Yes, if you don't want labels, or error messages within the Field Component, it could be a lot simpler.

    It generates structure to handle every case.

    We'll have to look into optimizing it when there's time!
    Longtime Sencha geek. Outspoken advocate of pure Javascript Views. Posts my own opinions.

  5. #5
    Sencha User
    Join Date
    Mar 2008
    Posts
    24
    Vote Rating
    0
      0  

    Default

    thanks, i'm looking forward to it!

Posting Permissions

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