-
17 Mar 2008 8:20 AM #31
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
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
18 Mar 2008 5:32 AM #32
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();
-
18 Mar 2008 6:00 AM #33
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
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
18 Mar 2008 6:12 AM #34
-
18 Mar 2008 7:38 AM #35
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
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
18 Mar 2008 7:47 AM #36
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
-
18 Mar 2008 8:09 AM #37
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
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
18 Mar 2008 11:12 AM #38
ha thnx alot i didn't realize i needed to give the whole new object back to the form now it works

-
18 Mar 2008 8:41 PM #39
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 :
This seems to be the culprit line, it's in the removeAll() method callCode: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(); }
Code:// remove form panel items this.items.each(this.remove, this);Odili Charles Opute
Proudly Nigerian
Blog
Cotributions
Ext.ux.Image
Ext.ux.Wizard
Ext.plugin.ModalNotice
Ext.plugin.ComboLoader
Ext.ux.form.ScreenshotField
-
18 Mar 2008 9:40 PM #40
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


Reply With Quote