1. #1
    Sencha User mysticav's Avatar
    Join Date
    Mar 2007
    Location
    Mexico
    Posts
    474
    Vote Rating
    5
    mysticav is on a distinguished road

      0  

    Default Access the window content Dinamically

    Access the window content Dinamically


    After I create the window object:

    win = new Ext.Window({
    el:'hello-win',
    layout:'fit',
    width:498,
    height:406,
    closeAction:'hide',
    resizable:false,
    plain: true
    });
    }

    I want to add html like this:
    win.add({title: 'Hello 1', html:'Content here!'});
    win.add({title: 'Hello 2', html:'New Content here!'}); <!-- doesn't do nothing -->

    The window just execute the first call.


    How can I modify the content after using the add method ?
    The window content is going to be modified. I don't need Ajax calls. just simple javascript functions to modify the content.

    Any Idea ?

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,798
    Vote Rating
    603
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Try:

    Code:
    window.body.update('foo');

  3. #3
    Sencha User mysticav's Avatar
    Join Date
    Mar 2007
    Location
    Mexico
    Posts
    474
    Vote Rating
    5
    mysticav is on a distinguished road

      0  

    Default


    oh. I saw the body property in the API as "read-only". I was confused. I will try that.

  4. #4
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,798
    Vote Rating
    603
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    By read only, it means you can't replace the body element with another element. It is kind of confusing though.

  5. #5
    Sencha User mysticav's Avatar
    Join Date
    Mar 2007
    Location
    Mexico
    Posts
    474
    Vote Rating
    5
    mysticav is on a distinguished road

      0  

    Default


    Well, Actually there's no body property in the window object.

    Also,
    if I call win.getUpdater();

    I get an error:
    "this.body is null or not an object"

    So seems the body is not there.

    Here is the entire list of my window object, all the properties and methods I get with a
    "for(a in win)" loop:

    http://dpaste.com/35551/

  6. #6
    Sencha User mysticav's Avatar
    Join Date
    Mar 2007
    Location
    Mexico
    Posts
    474
    Vote Rating
    5
    mysticav is on a distinguished road

      0  

    Default


    The solution:
    Creating the window object after document ready.

    Ext.EventManager.onDocumentReady(Window.init, Window, true);

Thread Participants: 1

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