1. #11
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,521
    Vote Rating
    378
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Oh, I see, it's not even in 2.0.1, I'm running svn. Replace that line with

    Code:
    if(this.createButtons instanceof Array) {
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  2. #12
    Ext User
    Join Date
    Feb 2008
    Posts
    57
    Vote Rating
    0
    ikk0 is on a distinguished road

      0  

    Default


    Thanks, but it was about this line:

    Code:
            if(Ext.isArray(this.ignoreFields)) {
    Working now. Thanks!

    //Edit:
    Ah, you have to replace this line too:
    Code:
            if(Ext.isArray(this.createButtons)) {
    You should update your code for Ext 2.0.1 users.

  3. #13
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,521
    Vote Rating
    378
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Yes, done.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  4. #14
    Ext User
    Join Date
    Feb 2008
    Posts
    57
    Vote Rating
    0
    ikk0 is on a distinguished road

      0  

    Default


    Question:
    I'm rendering the Metaform into a Ext.Window.
    Is it possible to set the "height of the Window to auto"? I mean, i don't know how many fields are coming with the MetaForm, but i don't want to set a static height for the Window. Is it possible the Window resizes automatically?
    Greetings,
    ikk0.

  5. #15
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,521
    Vote Rating
    378
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    I'd say yes, I'm doing so with some image content, anyway, the best is to try.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  6. #16
    Ext User
    Join Date
    Feb 2008
    Posts
    57
    Vote Rating
    0
    ikk0 is on a distinguished road

      0  

    Default


    I can't seem to find a way to get the real height of the Meta-FormPanel. It has always got the height of it's container, i.e. the Window(Panel). How do you do it with images? Or have you got any idea how to realize this otherwise?

  7. #17
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,521
    Vote Rating
    378
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Simple:

    PHP Code:
            var win = new Ext.Window({
                 
    id:'stat-chart-zoom-win'
                
    ,width:400
                
    ,plain:true
                
    ,border:false
                
    ,shadow:false
                
    ,autoHeight:true 
    The image is in the window body element and I just don't care about its height (it's basically constant aspect ratio image created by server based on width). When the image is received window adjusts its height.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  8. #18
    Ext User
    Join Date
    Feb 2008
    Posts
    57
    Vote Rating
    0
    ikk0 is on a distinguished road

      0  

    Default


    Great, thanks, autoHeight was what I was searching for. But it is a bit tricky, you have to set autoHeight of the FormPanel (MetaForm) AND the Window to true:

    Code:
    var win = new Ext.Window({
       autoHeight: true,
       items:{
          xtype:'metaform',
          autoHeight: true,
          ...
       },
       ...
    });

  9. #19
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,521
    Vote Rating
    378
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Good to know. I'm glad you've got it working.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  10. #20
    Ext User
    Join Date
    Feb 2008
    Posts
    57
    Vote Rating
    0
    ikk0 is on a distinguished road

      0  

    Default


    I have got another question. Could you extend your extension to also deliever the success and failure callback after a successful/failed submit of form data? Or how do I have to do it?

    I tried, but didn't succeed:
    Code:
    var win = new Ext.Window({
       autoHeight: true,
       items:{
          xtype:'metaform',
          autoHeight: true,
          success: function() {   
             Ext.MessageBox.alert('Status','Save done');   
          },   
          ...
       },
       ...
    });
    
    //or:
    //even this won't work: 
    Ext.getCmp('metaform-win').items.get(0).getForm().on('actioncomplete', function(){alert('completed');});