Hybrid View

  1. #1
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default HtmlLayout - Use Ext components in plain HTML

    HtmlLayout - Use Ext components in plain HTML


    HtmlLayout is a small extension of the standard ContainerLayout. It allows you to use components inside plain HTML while still maintaining the container structure. This has the advantage that the components will still be managed (e.g. destroying the container doesn't leak memory for the contained components).

    The extension:
    Code:
    Ext.ns('Ext.ux.layout');
    Ext.ux.layout.HtmlLayout = Ext.extend(Ext.layout.ContainerLayout, {
        renderItem: function(c, position, target){
            if(c.renderTarget){
                target = Ext.DomQuery.selectNode(c.renderTarget, Ext.getDom(target));
            }else if(c.applyTarget){
                var el = Ext.DomQuery.selectNode(c.applyTarget, Ext.getDom(target));;
                if(!c.rendered){
                    c.el = el;
                }
                target = el.parentNode;
            }
            Ext.ux.layout.HtmlLayout.superclass.renderItem.call(this, c, undefined, target);
        }
    });
    Ext.Container.LAYOUTS['ux.html'] = Ext.ux.layout.HtmlLayout;
    Example usage:
    Code:
    Ext.onReady(function() {
        var panel = new Ext.Panel({
            title: 'HtmlLayout test',
            autoHeight: true,
            layout: 'ux.html',
            html: '<table><tr><td>Please enter your name </td><td></td><td> and password </td><td><input type="password" /></td><td>.</td></tr></table>',
            defaultType: 'textfield',
            items: [{
                name: 'username',
                renderTarget: 'td:nth(2)'
            },{
                name: 'password',
                applyTarget: 'input[type=password]'
            }]
        }).render(Ext.getBody());
    });

  2. #2
    Sencha User steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,649
    Vote Rating
    6
    steffenk has a spectacular aura about steffenk has a spectacular aura about steffenk has a spectacular aura about

      0  

    Default


    nice one! It also shows how to integrate a custom layout.

    Do you ever sleep?
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

  3. #3
    Ext User
    Join Date
    Oct 2007
    Posts
    22
    Vote Rating
    0
    deepak is on a distinguished road

      0  

    Default


    Hmm, going to give it a spin

  4. #4
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,882
    Vote Rating
    101
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Nice layout condor
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  5. #5
    Sencha - Community Support Team mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    4
    mystix will become famous soon enough

      0  

    Thumbs up


    neat trick!

  6. #6
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,483
    Vote Rating
    35
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Yes! nice piece of lateral thinking!

  7. #7
    Ext User
    Join Date
    Jan 2009
    Posts
    543
    Vote Rating
    0
    dbassett74 is on a distinguished road

      0  

    Default


    Just what I was looking for, thanks!

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar