-
11 Oct 2007 10:24 AM #1
Symfony Extjs2.0a generator
Symfony Extjs2.0a generator
I've created an Extjs plugin for symfony, (still in active development!)
maybe you can use it, maybe you can learn from it, maybe you can improve it.
Take a look at:
http://www.symfony-project.com/forum...283/#msg_37283
and
http://svn.symfony-project.com/plugi...jsThemePlugin/
Cheers
Leon
-
7 Nov 2007 1:36 PM #2
I have put a demo site online:
http://fun4me.demon.nl/test/test_dev.php
(edit screens might be broken at the moment)
Symfony is a PHP-framework with the ability to generate (scafold) list/edit pages. I changed the generator-theme (with the help of the community) to output Extjs powered pages.
You can create this example in symfony with the plugin by defining the data-model:
Code:propel: country: id: name: {type: varchar(255), required: true} abbreviation: {type: varchar(255), required: true} city: id: country_id: name: {type: varchar(255), required: true}
and the page:
Code:generator: class: sfExtjsPropelAdminGenerator param: model_class: City theme: extjs fields: country/name: name: Country name params: editable: true country/abbreviation: name: Abbreviation params: editable: true list: display: [=name, country/name, country/abbreviation]
-
5 Dec 2007 5:44 PM #3
It starts to get functional
It starts to get functional
The live demo starts to work and get functional... (although still very much work in progress...)
If anyone has some tips/questions, please tell me/ask me.
All 3 pages you can see are being generated, by a file similar to the one mentioned before.
-
6 Dec 2007 10:16 AM #4
Looks great, can't wait till this becomes a fully integrated with symfony.
I created a few ExtJS helpers for symfony a few months back that I use to generated components (mainly grids) over and over on a few pages, but it would be great if we could get this to work with the admin generator.
-
6 Dec 2007 2:21 PM #5
I don't know if I understood you completely so just to make sure: my work already works from the admin generator. you can get it from the svn from symfony, for more info see the symfony forum or symfony wiki of how to -get the code and make it work with your applications. Feel also free to contact me if you've got questions, remarks or tips. I would also like to see your work so it can improve this plugin if you agree.
-
11 Dec 2007 7:12 AM #6
you're doing a great job lvanderree, keep it up

-
12 Dec 2007 9:32 AM #7
Hhm, I am working on something similar (connecting symfony and Ext JS)!
But I didn
-
13 Dec 2007 1:59 AM #8
[QUOTE=tidal;98185]Hhm, I am working on something similar (connecting symfony and Ext JS)!
But I didn
-
13 Dec 2007 2:34 AM #9
Hi!
Thanx for the information
!
Our Approach has been not to extend the symfony
admin generator, but to write kind of a proxy for it.
You have one module, where you can fetch all the
information of registered models and get the data
in one place. The original admin-pages are still usable
as a fallback.
I
-
17 Dec 2007 4:07 PM #10
I've just uploaded a new demo at http://test.local/test_dev.php/city
I altered my theme is such a way that you can now also define multiple tab-pages for the edit-view in your generator.
The biggest problem which remains is the event handling of (new values in) drop-down combo-boxes (countries in my live-demo)
If someone can help me with this please contact me.
The problem is that I use the onBlur event to detect when you leave edit-field, and I use the getRawValue property to get the value a user typed in, this is all OK. I can also detect if the value is new, or already existed. BUT when it is new, I open a new window to add the value, however I haven't found a way to cancel the onBlur event so in the grid, the next field gets selected (and in the live-demo brakes because the next field-value can also not be found since the store is empty).
So the main problem is how to cancel a onBlur event.
A second problem is to reload (or at least add a value to the store) when the onFocus event is triggered. But this is probably easier to solve.
(The store does not always contain all data, and in case you enter a new field (with drop-down) you want to have at least have the current data-value in the store).
@tidal, I like to cooperate, please also take a look at the symfony forum: http://www.symfony-project.org/forum...905/#msg_41905 I don't think I have seen you there, but there is also a second plugin not related to themes which makes generating of ExtJs-javascript possible from php-code. (the sfExjs2Plugin)


Reply With Quote