1. #31
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,561
    Vote Rating
    384
    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


    Re MetaForm: If example works and application not, there must be some difference. Just to find and fix it...

    Re Grid: Best would be to post it in Help forum - I don't know answer from the top of my head and there are another people that could...
    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. #32
    Ext User
    Join Date
    Mar 2008
    Posts
    4
    Vote Rating
    0
    rewind is on a distinguished road

      0  

    Default


    First of all my compliments!

    With the following code i always get a failure even though firebug says the response =
    {success:true}

    Code:
    var win;
                if(!win) {
                    win = new Ext.Window({
                         id:'metaform-win'
                        ,width:400
                        ,autoHeight:true
                        ,title:'Ext.ux.MetaForm'
                        ,items:{
                             id: 'meta'
                            ,xtype:'metaform'
                            ,autoHeight: true
                            ,url:'metatest.php?node='+node.id
                            ,buttons:[{
                                         text:'Load'
                                        ,handler:function() {
                                            Ext.getCmp('metaform-win').items.get(0).getForm().load();
                                        }
                                    },{
                                         text:'Submit'
                                        ,formBind: true
                                        ,handler:function() {
                                            Ext.getCmp('metaform-win').items.get(0).getForm().submit({
                                                method:'POST', 
                                                waitTitle:'Connecting', 
                                                waitMsg:'Sending data...',
                                                success:function(form, action){
                                                    Ext.MessageBox.alert('Succes!', 'Succes'); 
                                                },
                                                failure:function(form, action){
                                                    Ext.MessageBox.alert('Failed!', 'Failed');
                                                } 
                                                                                    
                                            });
                                        }
                                    }]
                        }
                    });
                }
                win.show();

  3. #33
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,561
    Vote Rating
    384
    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


    There is no apparent error in the code; it looks good. You need to track down the error with Firebug. Data coming from server is most likely wrong format. Should you need more help on this, prepare please functional example html+js+php that I can copy somewhere to ext tree and that would run so I can debug locally.
    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. #34
    Ext User
    Join Date
    Mar 2008
    Posts
    4
    Vote Rating
    0
    rewind is on a distinguished road

      0  

    Default


    i created a small testcase!
    Attached Files

  5. #35
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,561
    Vote Rating
    384
    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


    Check you includes; you're trying to include ext-base.js and ext-all.js from resources directory. They have never been there. Also, you php returns only success. It has to return metadata, otherwise form stays empty.
    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. #36
    Ext User
    Join Date
    Mar 2008
    Posts
    4
    Vote Rating
    0
    rewind is on a distinguished road

      0  

    Default


    i use the forms in a new application i am writing, the js files are included correctly en in my original implementation i generate the json form with php. the form works perfectly e get the requested form with the right data and i can submit the changes. These changes are also correctly submitted to the mysql database. The only thing that is not working is the succes part. The form keeps giving me the failure message while it isn't failing!

    I try'd all type of different json returns like:

    echo '{success:true}';
    echo '{"success":true}';
    echo '{ success:true}';

    etc..

    Firebug also confirms the expected response from php

  7. #37
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,561
    Vote Rating
    384
    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


    echo '{"success":true}';

    This one is correct. Anyway, if you post meta:true MetaForm expects it will receive metadata, not only success:true.
    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. #38
    Ext User
    Join Date
    Mar 2008
    Posts
    4
    Vote Rating
    0
    rewind is on a distinguished road

      0  

    Default


    ha thnx alot i didn't realize i needed to give the whole new object back to the form now it works

  9. #39
    Sencha User chalu's Avatar
    Join Date
    Feb 2008
    Location
    Benin City, Nigeria
    Posts
    480
    Vote Rating
    1
    chalu is on a distinguished road

      0  

    Exclamation Now I Get : l.fireFn is undefined

    Now I Get : l.fireFn is undefined


    Hello Saki, compliments for your good works, got an issue though.
    I have re-downloaded the code from your first post and fixed the isArray errors, now I am stuck at l.fireFn is undefined, but I am not using renderTo as jamesfarrer did but I still get the stopper, any suggestions for my case while I still try to figure it out?
    Here is my call :
    Code:
     if(!Ext.get('metaform-win')){
        var win = new Ext.Window({
             id:'metaform-win'
            ,layout:'fit'
            ,width:370
           ,autoHeight:true
            ,title:'Configure User Column Action Settings'
    	,items:{
    		xtype:'metaform'
    		,autoHeight:true
    		,url:'formconfig.php'
    		,buttons:[{
    			 text:'Cancle'
    			 ,handler:function() {
    			     Ext.getCmp('metaform-win').close();
    		         }
    		},{
    			text:'Submit'
    			,handler:function() {			                     Ext.getCmp('metaform-win').items.get(0).getForm().submit();
    			}
    		}]
    	}
      });
    			
      win.show();
    }
    This seems to be the culprit line, it's in the removeAll() method call
    Code:
             // remove form panel items
            this.items.each(this.remove, this);

  10. #40
    Ext User
    Join Date
    Jun 2007
    Posts
    8
    Vote Rating
    0
    hendra1 is on a distinguished road

      0  

    Default Could make a metaform

    Could make a metaform


    i had try it to my app, but i still found error like this:

    types[config.xtype || defaultType] is not a constructor
    [Break on this error] return new types[config.xtype || defaultType](config)

    NB: i had change the Ext.isArray into this.createButtons instanceof Array

    does anyone could help me..?
    Thanks in advance