-
31 Mar 2012 5:02 AM #41
m using Ext 4.1 and stuck in form submitting using model api: create
can anyone show a small example how to get the data out of form and after passing it to a model, save it in database(Mysql)
-
12 Apr 2012 7:14 AM #42
Another Solution to make a form fields use the model validators
Another Solution to make a form fields use the model validators
Another Solution see in:
http://www.sencha.com/forum/showthre...233#post778233
-
20 Jul 2012 9:22 AM #43
Great Thread but wen't off topic
Great Thread but wen't off topic
Hey Mitch,
this is a really great thread about bidirectional model binding.
The central question htammen asked was about:
How to bind complex objects (like the model) to a form.
The load record function is not sufficient
Well if there is a solution I would really look forward to see it solved.It does not work for complex data 1:1 and 1:n associations.
So bringing back the Thread on track;
My question here is:
How can I load my complex data to the from? In a simple manner?
If I have a form containing fields like this:
How would i load it from my store (beloning to a model having the same structure) into the form ?Code:username address.zip address.phone.mobile
Kind Regards
Sim
-
27 Jan 2013 8:56 AM #44
Sorry for the necro, but I felt it was important to point out that we still don't have automatic bidirectional model binding. This is one of the things I miss from Silverlight and XAML programming: it was very easy to bind a UI (any control really -- not just a form) to a model and have it all just work automatically. Put another way: this code is something that your customers write all the time so it's an ideal job that the framework could handle. KnockoutJS does this very nicely as well.
-
29 Jan 2013 3:02 PM #45
Agreed mpost. I'm astounded that proper form to model binding is not provided. Bidirectional form to model binding seems like it would be at the top of expectations for such a framework.
I'm actually a bit disappointed.
-
30 Jan 2013 1:19 AM #46Ext JS Premium Member
- Join Date
- Nov 2010
- Location
- Dillenburg, Hessen, Germany
- Posts
- 33
- Vote Rating
- 0
well we don't use sencha command and the mvc (because in the time we started our application that didn't exist), so we had to build our own application structure with front- and backend and database connection.
for backend communication we use propel and generate php model classes for easy use.
and by porting our software to ext js 4... we came to the point that we enhanced our database schema xml with some more flag like (generate frontend model, generate frontend model relations, user visible names for columns,...) and we wrote a php script that generates us the ext js models.
the clou: we generate a UserBase and a User model the user model extends the UserBase, the base class will be overwritten every time we generate models, and on the script where we generate the models we don't just generate a fields list we also generate a getFormItems method on our models that returns a config object for a form to this model (depending on our schema enhancements)
with such generated models you can generate your own methods for things you have to do often (like writing a form config, grid column definitions maybe if you want, ...)
maybe this gives you an idea for your application to generate code you often need.
-
30 Jan 2013 8:15 AM #47
-
30 Jan 2013 10:27 AM #48Ext JS Premium Member
- Join Date
- Nov 2010
- Location
- Dillenburg, Hessen, Germany
- Posts
- 33
- Vote Rating
- 0
well yes and no...
1. i don't know exactly what is possible with sencha complete etc...
2. well extjs is just a frontend and not a backend with database access... so you have to write/generate your models u use as you need them... js can't make models by it self depending on a database
3. if you compare extjs with jquery you should better compare it with jqueryUI but even then ext brings you a lot more standards and components for doing a web-app
but hey, both are js libs - sure u can also use jquery(UI) but in my opinion extjs code looks more clean and readable and the framework brings you a lot more help by building an nativ-app like web-app.
well sure i would be nice to have more things here and there, but i think for big applications it's a lot better then jquery.
if you just need it to build a simple online adress book that also should not look like a desktop app, then maybe jquery is the better option.
it all depends on the requirements for me.
Similar Threads
-
[FIXED] Selection Model Binding Problem When Using Multiple Grids
By j-joey in forum Ext Designer: BugsReplies: 5Last Post: 15 May 2012, 8:06 PM -
Form Binding to BeanModel
By zathril in forum Ext GWT: DiscussionReplies: 0Last Post: 28 Mar 2010, 1:08 PM -
Form binding / update model
By tsegismont in forum Ext GWT: Help & Discussion (1.x)Replies: 0Last Post: 2 Apr 2009, 1:22 AM -
Form binding
By exo in forum Ext 1.x: Help & DiscussionReplies: 1Last Post: 16 Apr 2007, 4:20 AM


Reply With Quote