This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » General discussion » Building Own Generator  (4) 7 Vote(s)
Re: Building Own Generator [message #56943 is a reply to message #24107 ] Thu, 24 July 2008 16:08 Go to previous messageGo to next message
andrea.extera  is currently offline andrea.extera
Messages: 9
Registered: July 2008
Location: San Marino
Junior Member
sorry, when i say 'i set to work istantly' i mean 'i start to work on it istantly' !

i installed the missing two plugin, edited dababase.yml, propel.ini and config.php and the system response to the browser, but it give me some javascript errors.

so i turned off the sfcombineplugin and most of the errors go away.

actually the system isn't working at all, because after the login another javascript error show up in login.js line 93, telling me App.onTabChange is not a function, probably something related to extjs.

thank for your help.
Re: Building Own Generator [message #56944 is a reply to message #56943 ] Thu, 24 July 2008 16:11 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
Try replacing app.js with this version:
http://tejohnston.dynora.eu/js/app.js

I probably cleaned up too much


Leon
Re: Building Own Generator [message #56946 is a reply to message #24107 ] Thu, 24 July 2008 16:41 Go to previous messageGo to next message
andrea.extera  is currently offline andrea.extera
Messages: 9
Registered: July 2008
Location: San Marino
Junior Member
thank for your rapid support!

that file isn't sufficient to fix the problem Sad

it generate a new error, because it try to load with ajax the file "/index.php/js/getXtype/mainmenu.js" that isn't present in the sandbox, but I saw that is present in the online demo.

also, i noticed that in the online demo the layout with tabs and column is loaded in background of the login box, instead in the sandbox only the login box is showed, with gray background.

index.php/fa/835/0/

  • Attachment: screen01.jpg
    (Size: 13.46KB, Downloaded 1637 time(s))

Re: Building Own Generator [message #56947 is a reply to message #56946 ] Thu, 24 July 2008 16:46 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
That screenshot is correct, since I removed a lot of stuff from the app-layout you won't have a top-menu in this simple example.

Please find attached a new app.js and tell me if that works.

[Updated on: Thu, 24 July 2008 17:34]


Leon
Re: Building Own Generator [message #56950 is a reply to message #24107 ] Thu, 24 July 2008 17:24 Go to previous messageGo to next message
andrea.extera  is currently offline andrea.extera
Messages: 9
Registered: July 2008
Location: San Marino
Junior Member
with the new file, after the login, it show me a pop up telling "There is no assignment_parcel-panel defined (yet?)!"; when i click ok, the popup close, but after nothing happens.

there is an ajax request to "/index.php/js/getXtype/listassignment_parcelgridpanel.js" that return a 404 error.
Re: Building Own Generator [message #56952 is a reply to message #56950 ] Thu, 24 July 2008 17:40 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
I've attached a new version in the wiki again.

Updated both app.js and login.js

login.js contains a hardcoded value to the front page... That was why it was requesting for assignment_parcel...


Leon
Re: Building Own Generator [message #56957 is a reply to message #24107 ] Thu, 24 July 2008 18:14 Go to previous messageGo to next message
andrea.extera  is currently offline andrea.extera
Messages: 9
Registered: July 2008
Location: San Marino
Junior Member
thank you for now, tomorrow i will give you a feedback!
Re: Building Own Generator [message #56989 is a reply to message #24107 ] Fri, 25 July 2008 10:44 Go to previous messageGo to next message
andrea.extera  is currently offline andrea.extera
Messages: 9
Registered: July 2008
Location: San Marino
Junior Member
i applied the new release of your demo.
now after the login, the pop up continue to show with message "There is no order-panel defined (yet?)!".

an ajax request get "/index.php/js/getXtype/listordergridpanel.js" and this page return some javascript code, but i guess it isn't correct because contains some strange words, like in the following code:

// namespace: Ext.app.sx
Ext.namespace('Ext.app.sx');
// class: Ext.app.sx.ListOrderToolbarTop
Ext.app.sx.ListOrderToolbarTop = Ext.extend(Ext.Toolbar, { 
constructor: Object id #63,
initComponent: Object id #64});
;


i don't know what is the construct "Object id #64"

I encountered a similar situation when I created a clean project with extjstheme.
When I open in the browser the page of a module, 2 javascript error come out in files listAjaxJs.pjs and listAjaxGridPanelJs.pjs

those file contains code similar following:

// class: Ext.app.sx.ListLottoToolbarTop
Ext.app.sx.ListLottoToolbarTop = Ext.extend(Ext.Toolbar, {
constructor: Object id #68,
initComponent: Object id #69});
;
Re: Building Own Generator [message #56991 is a reply to message #56989 ] Fri, 25 July 2008 11:12 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
Are you using PHP 5.2.x or higher?

I guess you probably are not.


Leon
Re: Building Own Generator [message #56998 is a reply to message #24107 ] Fri, 25 July 2008 12:27 Go to previous messageGo to next message
andrea.extera  is currently offline andrea.extera
Messages: 9
Registered: July 2008
Location: San Marino
Junior Member
homer simpson say: "d'oh!"

in fact, i have php 5.1.6 Confused i try to upgrade it and i'll back.
Re: Building Own Generator [message #57020 is a reply to message #24107 ] Fri, 25 July 2008 15:12 Go to previous messageGo to next message
cmelak  is currently offline cmelak
Messages: 4
Registered: July 2008
Junior Member
Hi,
Firstly great job with what you guys are doing!

Well but as for the feedback:
I installed new demoversion and found few problems:
1. I have got trouble with running demo outside dev environment (mainly prod) - seems like problems with css files..? (login page is without shaded rectangle, after login pretty much nothing will show up)

2. Links for editing on datagrid does not work, so once you create something, you cannot edit it

3. With that "<" thingy around sfGuard module - You can solve it by editing " \plugins\sfExtjsThemePlugin\data\generator\sfPropelAdmin\ext js\template\actions\actions.class.php " line 762:

    $last = strrpos($column->key, '/');
    $cname = substr($column->key, $last + 1);

became >
    if(!empty($column->key)) { 
    	$last = strrpos($column->key, '/');
    	$cname = substr($column->key, $last + 1);
    }


4. Although with sfGuardUser - nothing shows at all. On the other hand, sfGuardPermission and sfGuardGroup works fine (though still editing is not working)

5. When I edit "manually" (for example right click + new window) then none of the actions are functional - all are getting error: handler_function is not defined! define the 'handler_function' in your generator.yml file. Note: editing through datagrid (ajax editing cells) works fine. Just links on it are not active.

6. As per request, I've tried linked app.js, however it is not working with demo

That is all for now, if I find something else, I will let you know. Forgive me if I missed some solution/information, however I was reading more than hundred posts on this thread and haven't find anything. Also sorry for my little knowledge of your project, I started with it just yesterday Wink

Keep up the good work!

Edit: forgot to add basics - running symfony 1.0.17, apache 2.2.6, php 5.2.5, MySQL 5.0.45. Plugin versions as downloaded approximately 3-4 hours ago

[Updated on: Fri, 25 July 2008 15:21]

Re: Building Own Generator [message #57029 is a reply to message #57020 ] Fri, 25 July 2008 16:18 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
Ola,

you are right about the broken links, I've constructed that demo very fast since the old demo wasn't very usable anymore, but I haven't got that much time either.

All problems you've encountered are probably due to the demo-app itself. As you can see on http://tejohnston.dynora.eu/ it can all work Wink it should also be possible to define foreign-keys as links, as display: [=product_id/name] so you can edit a product while you are in the order overview but I noticed that wasn't working either in the demo.

production and dev environments should have the same css so don't know what goes wrong there. Try disable the Combine plugin from your settings.yml and see if that fixes it.

I don't understand what you mean with the < thingie for the sfGuardModule

the lastest/most correct app.js is already in the tar.gz the one from tejohnston will not work for the demo.

I will try to ask the moderator to open a new folder specially for the ExtJs plugins. that we we can probably make it easier to talk about different problems.


Leon
Re: Building Own Generator [message #57033 is a reply to message #57029 ] Fri, 25 July 2008 16:51 Go to previous messageGo to next message
cmelak  is currently offline cmelak
Messages: 4
Registered: July 2008
Junior Member
Hi,
thanks for reply, I will keep on trying, I just wrote feedback about demo Smile

That "<" thingy is actually error Undefined property: sfExtjsAdminColumn::$key ... that you got while using sfGuardPlugin modules (/sfGuardUser, /sfGuardGroup etc), which that condition solves (error, which this produces, is included in raw php code in cache, which results in this output).

I will continue on main project, I hope I will get this theme to work Smile (I am still having few problems that I have with demo..)

[Updated on: Fri, 25 July 2008 16:52]

Re: Building Own Generator [message #57165 is a reply to message #24107 ] Mon, 28 July 2008 16:53 Go to previous messageGo to next message
mr.x  is currently offline mr.x
Messages: 56
Registered: August 2007
Member
Hi,

I have some question for the next steps for developing a gui with extjs and symfony together with your plug-in.
I have set up a development server @home and your plug-in up and running. .-)

How do I have to go one?
I want to build an application with the frontend in extjs. Do I have to put my layout in js into layout.php or do I have to create different functions within the generater.yml?
And how do I fit the different hyperlinks together?

BR
Jan
Re: Building Own Generator [message #57169 is a reply to message #57165 ] Mon, 28 July 2008 17:33 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
The ThemePlugin generates two kind of panels, which both are extentions of the ordinary Ext.Panel ( http://extjs.com/deploy/dev/docs/output/Ext.Panel.html )

For every module you will get a gridpanel and an editformpanel, these panels can be used in any way you want, you don't even have to have a full extjs layout (with for example a viewport http://extjs.com/deploy/dev/docs/output/Ext.Viewport.html)

Simply define the xtype-name of your-modules panel when defining the viewport/panel-items and you will see the item on your screen.

You also don't have to include the pjs-source as a javascript-include in your header for your panels, the plugin will find the source automatically for you during runtime (lazy loading).

You can also have a gridpanel as a field your edit-panel, or link an edit-panel to your grid. I would advise you to continue defining the layout in your app.js just like you can see in the demo. So seperate html and js(-layout)

So getting a edit-panel is done like this:
          // json-config
          var editPanel = {
            xtype       : ('Edit' + 'Invoice' + 'FormPanel').toLowerCase(),
            key         : key,

            //depends on your layout if you want these:
            hideBorders : true,
            header      : false,

            width       : 900,
            height      : 700
          };

          if (key) editPanel.title = 'Loading...';
          // create an instance from its xtype
          editPanel = Ext.ComponentMgr.create(editPanel);
          // init items in panel
          editPanel.initItems();

//create a pop-up-window
          var editWindow = new Ext.Window({
            title       :  'Loading...',
            modal       : true,
            items       : editPanel,
            editPanel   : editPanel
          });

          editWindow.on({
            'close' : {
              fn      : function(){
                  this.destroy();
              },
              scope: editWindow
            }
          });


          editPanel.on({
            'afterlayout' : {
              fn : function() {
                  var height = this.editPanel.body.dom.scrollHeight; // + this.body.getFrameWidth('tb');
                  this.editPanel.body.setHeight(height);

                  var width = this.editPanel.body.dom.scrollWidth; // + this.body.getFrameWidth('tb');
                  this.setWidth(width);

                  this.setTitle(this.editPanel.title);
              },
              scope : editWindow
            },

            'titlechange' : {
              fn : function (p, title) {
                this.setTitle(title);
              },
              scope : editWindow
            },

            'close_request' : {
              fn      : function(){

                editWindow.close();
              },
              scope   : this
            },
            'saved' : {
              fn      : function(){
                editWindow.close();
                this.store.reload();
              },
              scope   : this
            },
            'deleted' : {
              fn      : function(){
                editWindow.close();
                this.store.reload();
              },
              scope   : this
            }

          });

//show the pop-up window
          editWindow.show();


key is used to pass the primary-key, if undefined you will get a create panel.

To get the item which you requested by url (so index.php/module/action ) you can use the App.RequestedModulePanel (which simply contains an instance of the panel with its xtype (and key when it is an edit-action) set.

Like this:
      // content
      if (typeof App.RequestedModulePanel == 'undefined') {
        App.RequestedModulePanel = new Ext.Panel({html: 'Please login'});
      }
      this.content_panel = Ext.ComponentMgr.create({
        region:     'center',
        xtype:      'contentpanel',
        activeItem: 0,
        border:     false,
        defaults: {
          border:     false,
          autoScroll: true
        },
        items:      [App.RequestedModulePanel]
      });


To see if you are dealing with a grid or a list you can ask the object by something like this:
            if (i.getPanelType() == 'list') {
              i.getStore().reload();
            }

instead of list we also have edit,
testing for key will getKey() you can see if you are dealing with edit or create, modulename will return the module name
(typeof i.getKey === 'function') && (i.getKey() == key)
(i.getModulename() == modulename)


Ps.
at the moment you will also get a editpanel (without form) which is a wrapper around the formpanel, this will probable become obsolete. Also at the moment there isn't yet a panel for filtering, this should be defined in the future as well, but this is still a todo. If anyone can make one I will merge it with the plugin. This filter-panel can be based on the source for grid and form-panels (gridpanel source is somewhat nicer, edit-panel with its form-layout is what you want for filter-panels.


Leon
Re: Building Own Generator [message #57172 is a reply to message #24107 ] Mon, 28 July 2008 17:49 Go to previous messageGo to next message
mr.x  is currently offline mr.x
Messages: 56
Registered: August 2007
Member
Hi Leon,

thanks for your fast and long answer!
But were do I have to put you code?
I have no app.js in my project yet.

BR
Jan
Re: Building Own Generator [message #57173 is a reply to message #57172 ] Mon, 28 July 2008 17:55 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
See the demo http://trac.symfony-project.org/attachment/wiki/sfExtjsTheme Plugin/sfExtjsThemeExample.tgz

Add a app.js -file to your web/js folder and add an object with an init-function to it.

in you application/templates/layout.php folder call the init-method
Ext.onReady(function() {App.init('<?php echo $this->getContext()->getRequest()->getScriptName() ?>');}, App);


and finally don't forget to include the app.js file to your header scripts (this isn't done automatically), for example with you application/config/view.yml file, or with a partial (as done in the example in the templates folder)

Please provide feedback about how to improve the wiki on this: http://trac.symfony-project.org/wiki/sfExtjsThemePlugin#Appl icationLayout

If you cannot edit the wiki yourself you can provide me some texts.


Leon
Re: Building Own Generator [message #57175 is a reply to message #24107 ] Mon, 28 July 2008 18:06 Go to previous messageGo to next message
mr.x  is currently offline mr.x
Messages: 56
Registered: August 2007
Member
Hi Leon,

I will do so tonight .-)

BR
Jan
Re: Building Own Generator [message #57236 is a reply to message #52861 ] Tue, 29 July 2008 12:36 Go to previous messageGo to next message
iJot@1  is currently offline iJot@1
Messages: 2
Registered: July 2008
Junior Member
hey,
can u provide some sample code for combo box.
Actually i am new to EXTJS & trying to show dynamic combo box in simple form.
im trying this using js & php.
Please help..

Re: Building Own Generator [message #57237 is a reply to message #57175 ] Tue, 29 July 2008 12:45 Go to previous messageGo to next message
mr.x  is currently offline mr.x
Messages: 56
Registered: August 2007
Member
Hi Leon,

some more steps needed to use your demo.

After download I have to create two more files (cache and logs). And chmod 777 to them.
After that I have to download
- sfExtjsThemePlugin
- sfExtjs2Plugin
- sfPJSPlugin
And create the symlinks to the web folder.
Symfony cc and all works fine for me.

Should I put this in the wiki or will do it?

BR
Jan
Re: Building Own Generator [message #57244 is a reply to message #57237 ] Tue, 29 July 2008 13:46 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
Hi mr.x,

I think it was already in the wiki: http://trac.symfony-project.org/wiki/sfExtjsThemePlugin#DEMO except for adding cache and logs and call "symfony fix" (chmod 777)

Maybe you missed this?

sfPJSPlugin is already included in the example


Leon
Re: Building Own Generator [message #57246 is a reply to message #24107 ] Tue, 29 July 2008 14:01 Go to previous messageGo to next message
mr.x  is currently offline mr.x
Messages: 56
Registered: August 2007
Member
Hi Leon,

yes, some part are already in place, but you will find this informations all over the site instead on one place.

BR
Jan
Re: Building Own Generator [message #57248 is a reply to message #24107 ] Tue, 29 July 2008 14:01 Go to previous messageGo to next message
mr.x  is currently offline mr.x
Messages: 56
Registered: August 2007
Member
Hi Leon,

yes, some part are already in place, but you will find this informations all over the site instead on one place.

BR
Jan
Re: Building Own Generator [message #57250 is a reply to message #57248 ] Tue, 29 July 2008 14:06 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
ah OK, feel free to restructure the wiki if you have an idea about how to improve this.

I am simply writing anything I encounter/add, I don't use the wiki as reference. Since you probably do, you probably have a better idea about what could be improved...


Leon
Re: Building Own Generator [message #57278 is a reply to message #24107 ] Tue, 29 July 2008 17:06 Go to previous messageGo to next message
mr.x  is currently offline mr.x
Messages: 56
Registered: August 2007
Member
Hi,

one more question to build an application with sfExtjsTheme.
I thought that i can write the appliacation (JS parts) inside symfony in the generator.yml.
But in the demo I have to edit the code in app.js.
Is this right or did I made a mistake?

Jan
Re: Building Own Generator [message #57281 is a reply to message #57278 ] Tue, 29 July 2008 17:28 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
Could you provide examples of what you mean?

you can setup/configure your edit(form)/list(grid)-panels inside the generator.yml. With the params keywords (list/edit/pages/fields) you can define json-config options from the extjs-api

To make an entire application which links all your module-panels, you have to define an app.js (or whatever you like to call your application, maybe you named it layout.js). You can also make this dynamic by using your layout.php and use the sfExtjs2Plugin (or write extjs/javascript manually)

in this application-javascript you can re-configure your module-panels. so calling
var edit_panel_config = {xtype: 'editmodule_nameeditpanel'};
var edit_panel = Ext.ComponentMgr.create(edit_panel_config);

// which is the same as 
edit_panel = new Ext.app.sx.EditModuleNameEditPanel();
//or 
edit_panel = new Ext.app.sx.EditModuleNameEditPanel(edit_panel_config);

is enough,

but if you don't like some settings for a particular situation, you can simply reconfigure them by providing more parameters.
var edit_panel_config = {
  xtype: 'editmodule_nameeditpanel',
  title: 'something different, which you cannot see anyway, because I turn the header off',
  header: false
};
var edit_panel = Ext.ComponentMgr.create(edit_panel_config);

// which is the same as 
edit_panel = new Ext.app.sx.EditModuleNameEditPanel(edit_panel_config);


Leon
Re: Building Own Generator [message #57340 is a reply to message #24107 ] Wed, 30 July 2008 15:38 Go to previous messageGo to next message
cmelak  is currently offline cmelak
Messages: 4
Registered: July 2008
Junior Member
Hi again,
I have few questions, if I may:

About demo:
1) sfGuardUser module does not appear by default, however it will start showing list of users once I delete partials from display... is there a way to fix this? As I have similar problem with partials on a main project
2) Clicking on an item on the list of orders does not make anything (so you cannot edit a thing), any clue? Again similar to a problem with my main project.

General:
1) on main project I have trouble with problem, where nothing gets listed even though I have data in DB(I mean in list action, it does display empty list, though columns and buttons are present.
2) I have trouble running combos, I followed all possible instructions on wiki, however no success (I need to make fixed associative array for a integer type). Example for "foreignfieldcolumn" makes error, where clicking a create button, does not show anything.
3) I have a question about licensing of this product, as extjs itself is not free for commercial purposes (I want to use it for pretty simple site).

Thanks in advance and keep up the good work!
Re: Building Own Generator [message #57719 is a reply to message #24107 ] Sun, 03 August 2008 20:56 Go to previous messageGo to next message
cmelak  is currently offline cmelak
Messages: 4
Registered: July 2008
Junior Member
I tried new plugin version and it now finally starts to work instantly, only basic installation of plugins is required now. Great job!

However partials are somewhat still a problem, do you have any tip to make them working? I have implemented a swfUpload partial in the "old" basic admin generator, but I am not able to make it work under extjstheme.
Re: Building Own Generator [message #57723 is a reply to message #57719 ] Sun, 03 August 2008 21:32 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
the use of partials is completely different for the extjs-theme, this is not backwards compatible.

in symfony-default you would write html in your partials, with the extjs-theme you write javascript.

Field-partials for grids/lists but also for edit/form-panels are probably obsolete.
You simply use (foreign)field-names (or custom method-names from your lib/object.php file) and if you need a custom editor (also for editable-grids), or your grid needs a custom renderer simple define it under fields.params in your generator.yml

you write the xtype in some javascript you have included in your html-head (or which already exists in ext). You can also include a grid as a field in your form (although at the moment with some wrapper javascript-object).

If you want to combine multiple data-fields in your form-field, simmply provide some datafields in your list/edit.display preceded with a +


Examples are for example the voyage/assignment/parcel-name combined in one column of my grid.

I defined it like this:
list.display: [=subject, +assignment_id/subject, +assignment_id/voyage_id/title]


the field definition
      subject:
        name:     File
        params:
          editable: false
          renderer: this.renderLinkFile


the renderer definition
    renderer:
      method:
        partials:     [_renderer_linkFile]


and the renderer for this subject-column, defined in a partial:
<?php ob_start() ?>
    //convert keys (replace minus (-) by two underscores (__))
    var data = Array();
    for (var key in record.data) {
      var new_key = key.replace(/-/g, '__');
      data[new_key] = record.data[key];
    }

    var tpl = new Ext.XTemplate(
      '<p class=\'fileLink\'>',

      // parcels
      '<tpl if="assignment_parcel_id != \'\'">',
        'Parcel: <a class=\'gridlink\' sf_ns:modulename=\'assignment_parcel\' sf_ns:key=\'{assignment_parcel_id}\' sf_ns:assignmentid=\'{assignment_id}\' href=\'<?php echo $this->getContext()->getRequest()->getScriptName() ?>/assignment_parcel/edit/assignment_parcel_id/{assignment_parcel_id}\'>{subject}</a>',
      '</tpl>',

      //assignments or voyages
      '<tpl if="assignment_parcel_id == \'\'">',

        //assignment
        '<tpl if="assignment_id != \'\'">',
        'Assignment: <a class=\'gridlink\' sf_ns:modulename=\'assignment\' sf_ns:key=\'{assignment_id}\' href=\'<?php echo $this->getContext()->getRequest()->getScriptName() ?>/assignment/edit/assignment_id/{assignment_id}\'>{assignment_id__subject}</a>',
        '</tpl>',

        //voyage
        '<tpl if="assignment_id == \'\'">',
        'Voyage: <a class=\'gridlink\' sf_ns:modulename=\'voyage\' sf_ns:key=\'{assignment_id__voyage_id}\' href=\'<?php echo $this->getContext()->getRequest()->getScriptName() ?>/voyage/edit/voyage_id/{assignment_id__voyage_id}\'>{assignment_id__voyage_id__title}</a>',
        '</tpl>',
      '</tpl>',

      '</p>'
    );

    return tpl.apply(data);
<?php
$source = ob_get_clean();

$renderLinkFile = $sfExtjs2Plugin->asMethod(array(
  'parameters' => 'value, params, record, rowIndex, colIndex, store',
  'source' => $source
));

 $renderer->attributes['renderLinkFile'] = $renderLinkFile;
 ?>


Leon
Re: Building Own Generator [message #57910 is a reply to message #57723 ] Tue, 05 August 2008 12:24 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
extjs2plugin contains Ext2.2 in svn


Leon
Re: Building Own Generator [message #58194 is a reply to message #24107 ] Thu, 07 August 2008 16:25 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
trak wrote on Thu, 07 August 2008 16:10

I would love to use the ExtTheme, but right now is somehow unstable for us. I've tried several times and ran into problems. Now I see that it doesn't work with symfony 1.1. What I think would be awesome is to integrate it with the Form system, that way we could render all the widgets (and the form) with Ext, that would be even more useful since the future admin generator will use the new Form system, therefore one can do any kind of form using Ext. Currently we're developing an sport event management system and all our form and grids are written using Ext. This plugin could really help us in the future or in other projects, but the 1.0 requirement it's very tough right now.

Ivan


At the moment there is a Sf1.1 branch in the svn repository by Eric.Fredj

I don't know about its current state, since KRavEN and me are still using sf1.0 and have very little time at the moment to upgrade to 1.1.

The plans about supporting sf1.1 are still vague, for now it depends on the work of Eric.Fredj

I first need to graduate before I can dedicate more time again on development.

Sf1.2 will also be released soon and I try to support that release, maybe skipping sf1.1 although our improvements on 1.0 can be merged with the work of Eric.

Improvements made last week on 1.0 by KRavEN are an added filter-panel, credential checking (for grids) and an improved-code-style.

If you want to support in improving code for 1.1 subscribe as a developer or get into contact with Eric.


Leon
Re: Building Own Generator [message #58206 is a reply to message #58194 ] Thu, 07 August 2008 18:04 Go to previous messageGo to next message
KRavEN  is currently offline KRavEN
Messages: 213
Registered: May 2007
Faithful Member
I don't plan on upgrading my projects to 1.1. I will wait until 1.2 goes into feature freeze and then I will begin updating all the plugins I contribute on to 1.2

Until then we will continue getting the 1.0 plugins feature complete, stable, and well documented.
Re: Building Own Generator [message #61846 is a reply to message #58206 ] Thu, 25 September 2008 18:55 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
Hi People,

I finally have finished my thesis report about usable and adaptable business software, the reason why I've started the implementation of this sfExtjsThemePlugin.

You can find all about it at:
http://www.symfony-project.org/forum/index.php/m/61844/#msg_ 61844


Leon
Re: Building Own Generator [message #64571 is a reply to message #37256 ] Wed, 05 November 2008 13:03 Go to previous messageGo to next message
dkurman  is currently offline dkurman
Messages: 10
Registered: October 2008
Location: Beccar - Buenos Aires - A...
Junior Member
Hi, it is possible to do all this using symfony 1.1?

I tried with every sample and tutorial posted here with no success at all. I also tried to repair all the errors editing the php files with same result, more and more error messages.

I need to do something simple like using master-detail and there is no documentation about this.

Thanks in advance

Daniel
Re: Building Own Generator [message #64578 is a reply to message #64571 ] Wed, 05 November 2008 14:22 Go to previous messageGo to next message
KRavEN  is currently offline KRavEN
Messages: 213
Registered: May 2007
Faithful Member
The current version is not 1.1 compatible.

You can try the Extjs2DBFGeneratorThemePlugin branch in the symfony svn. We are moving everything to support DbFinder and that will give us all ORM and symfony version support. Most everything except the edit panels is complete on the branch now.

All further development on the theme plugin will be on the DbFinder branch. Once the branch is closer to release quality we will create a new plugin page and wiki for it.
Re: Building Own Generator [message #64583 is a reply to message #64578 ] Wed, 05 November 2008 15:43 Go to previous messageGo to next message
dkurman  is currently offline dkurman
Messages: 10
Registered: October 2008
Location: Beccar - Buenos Aires - A...
Junior Member
Thanks for your answer. I have tried with this, with same result, no success. I don´t want to use extjs at all, it´s not necessary, i did it because was the only sample I found.

I´ll continue looking for a solution

Regards
Re: Building Own Generator [message #67067 is a reply to message #24107 ] Mon, 08 December 2008 09:55 Go to previous messageGo to next message
dl28  is currently offline dl28
Messages: 12
Registered: December 2008
Location: Chartres - France
Junior Member
Hi,

I'm a new user of symfony and extjs.
I saw in this post that sfExtjsThemePlugin is not compatible with symfony 1.1 nor 1.2 due to the new form system.
But what about if i want to use only sfExtjs2Plugin to have a treeview in my frontend for example ?
I try it with 1.2 but i had a lot of error, Is this due to the symfony version or due to a misuse of my hand ?
Thanks in advance

[Updated on: Mon, 08 December 2008 09:56]

Re: Building Own Generator [message #67075 is a reply to message #24107 ] Mon, 08 December 2008 10:50 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
sfExtjsThemePlugin only runs on 1.0 for now. There are plans for rewriting it to sf1.2, but not in the very near future...

The sfExtjs2Plugin should be able to run in 1.2 I think (not tested it though), but as always without error messages it is hard to tell what the problem is...


Leon
Re: Building Own Generator [message #67078 is a reply to message #24107 ] Mon, 08 December 2008 10:57 Go to previous messageGo to next message
dl28  is currently offline dl28
Messages: 12
Registered: December 2008
Location: Chartres - France
Junior Member
Thanks for your answer, i'll test more and i'll tell you after
Re: Building Own Generator [message #67117 is a reply to message #24107 ] Mon, 08 December 2008 18:20 Go to previous messageGo to previous message
dl28  is currently offline dl28
Messages: 12
Registered: December 2008
Location: Chartres - France
Junior Member
I install sfExtjs2Plugin (revision 13840) with symfony 1.2 and i try small application with an example of treepanel in the indexSuccess template :
<div id="content_main">
<h1>Accueil</h1>
<?php

$sfExtjs2Plugin = new sfExtjs2Plugin(array('theme'=>'blue'));

$private = array();
$public = array();
$sfExtjs2Plugin->load();
$sfExtjs2Plugin->begin();

// **************************************

// Application

// **************************************

$private['tree']=$sfExtjs2Plugin->TreePanel(array(
           'id'=> 'tree-panel',
    	   'title'=> 'Sample Layouts',
           'region'=>'north',
           'split'=> true,
           'height'=> 300,
           'root'=> $sfExtjs2Plugin->TreeNode(array(
	           'draggable'=>false,
	           'text'=>'the root',
         	   'expanded'=> true,
           ))
        ));
$private['detail']=$sfExtjs2Plugin->Panel(array (
           'region'=>'center',
	   'title'=>'Dettagli',
	));


$private['main']=$sfExtjs2Plugin->Panel(array
    (
      'items' => array('tree','detail'),
            'height' =>350,
            'layout' => 'border',
    ));

$public['init'] = $sfExtjs2Plugin->asMethod("
  Ext.QuickTips.init();
  main.render('main');
");
$sfExtjs2Plugin->beginApplication(
  array(
    'name'    => 'Tree',

    'private' => $private,
    'public'  => $public
  )
);
$sfExtjs2Plugin->endApplication();
$sfExtjs2Plugin->initApplication('Tree');
$sfExtjs2Plugin->end();

?>
</div>


and i have this error :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="title" content="MediaCoffre" />
<meta name="description" content="Projet MediaCoffre" />
<meta name="keywords" content="MediaCoffre" />
<meta name="language" content="fr" />
<meta name="robots" content="index, follow" />
    <title>MediaCoffre</title>
    <link rel="shortcut icon" href="/favicon.ico" />

  <script type="text/javascript" src="/sfExtjs2Plugin/extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="/sfExtjs2Plugin/extjs/ext-all-debug.js"></script>
<link rel="stylesheet" type="text/css" media="screen" href="/sfExtjs2Plugin/extjs/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/sfExtjs2Plugin/patches/fixes.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/css/main.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/css/layout.css" />
<style type="text/css">#sfWebDebug {   padding: 0;   margin: 0;   font-family: Arial, sans-serif;   font-size: 12px;   color: #333;   text-align: left;   line-height: 12px; }  #sfWebDebug a, #sfWebDebug a:hover {   text-decoration: none;   border: none;   background-color: transparent;   color: #000; }  #sfWebDebug img {   border: 0; }  #sfWebDebugBar {   position: absolute;   margin: 0;   padding: 1px 0;   right: 0px;   top: 0px;   opacity: 0.80;   filter: alpha(opacity:80);   z-index: 10000;   white-space: nowrap; }  #sfWebDebugBar[id] {   position: fixed; }  #sfWebDebugBar img {   vertical-align: middle; }  #sfWebDebugBar .menu {   padding: 5px;   padding-left: 0;   display: inline;   margin: 0; }  #sfWebDebugBar .menu li {   display: inline;   list-style: none;   margin: 0;   padding: 0 6px; }  #sfWebDebugBar .menu li.last {   margin: 0;   padding: 0;   border: 0; }  #sfWebDebugDatabaseDetails li {   margin: 0;   margin-left: 30px;   padding: 5px 0; }  #sfWebDebugShortMessages li {   margin-bottom: 10px;   padding: 5px;   background-color: #ddd; }  #sfWebDebugShortMessages li {   list-style: none; }  #sfWebDebugDetails {   margin-right: 7px; }  #sfWebDebug pre {   line-height: 1.3;   margin-bottom: 10px; }  #sfWebDebug h1 {   font-size: 16px;   font-weight: bold;   margin-bottom: 20px;   padding: 0;   border: 0px;   background-color: #eee; }  #sfWebDebug h2 {   font-size: 14px;   font-weight: bold;   margin: 10px 0;   padding: 0;   border: 0px;   background: none; }  #sfWebDebug .sfWebDebugTop {   position: absolute;   left: 0px;   top: 0px;   width: 98%;   padding: 0 1%;   margin: 0;   z-index: 9999;   background-color: #efefef;   border-bottom: 1px solid #aaa; }  #sfWebDebugLog {   margin: 0;   padding: 3px;   font-size: 11px; }  #sfWebDebugLogMenu li {   display: inline;   list-style: none;   margin: 0;   padding: 0 5px;   border-right: 1px solid #aaa; }  #sfWebDebugConfigSummary {   display: inline;   padding: 5px;   background-color: #ddd;   border: 1px solid #aaa;   margin: 20px 0; }  #sfWebDebugConfigSummary li {   list-style: none;   display: inline;   margin: 0;   padding: 0 5px; }  #sfWebDebugConfigSummary li.last {   border: 0; }  .sfWebDebugInfo, .sfWebDebugInfo td {   background-color: #ddd; }  .sfWebDebugWarning, .sfWebDebugWarning td {   background-color: orange; }  .sfWebDebugError, .sfWebDebugError td {   background-color: #f99; }  .sfWebDebugLogNumber {   width: 1%; }  .sfWebDebugLogType {   width: 1%;   white-space: nowrap;   color: darkgreen; }  .sfWebDebugLogInfo {   color: blue; }  .ison {   color: #3f3;   margin-right: 5px; }  .isoff {   color: #f33;   margin-right: 5px;   text-decoration: line-through; }  .sfWebDebugLogs {   padding: 0;   margin: 0;   border: 1px solid #999;   font-family: Arial;   font-size: 11px; }  .sfWebDebugLogs tr {   padding: 0;   margin: 0;   border: 0; }  .sfWebDebugLogs td {   margin: 0;   border: 0;   padding: 1px 3px;   vertical-align: top; }  .sfWebDebugLogs th {   margin: 0;   border: 0;   padding: 3px 5px;   vertical-align: top;   background-color: #999;   color: #eee;   white-space: nowrap; }  .sfWebDebugDebugInfo {   margin-left: 10px;   padding-left: 5px;   border-left: 1px solid #aaa; }  .sfWebDebugCache {   padding: 0;   margin: 0;   font-family: Arial;   position: absolute;   overflow: hidden;   z-index: 995;   font-size: 9px;   padding: 2px;   filter:alpha(opacity=85);   -moz-opacity:0.85;   opacity: 0.85; }  #sfWebDebugSymfonyVersion {   margin-left: 0;   padding: 1px 4px;   background-color: #666;   color: #fff; }</style></head>
  <body>
 	<div id="header">
    	<ul>

      		<li><a href="/frontend_dev.php/">MediaCoffre</a></li>
	  		    			<li><a href="/frontend_dev.php/login">Connexion</a></li>
	  		      		<li> </li>
      		<li></li>
    	</ul>
	</div>
 	<div id="content">

		<div id="content_main">
<h1>Accueil</h1>

<script type='text/javascript'>

// sfExtjs2Helper: v0.60
Ext.BLANK_IMAGE_URL = '/sfExtjs2Plugin/extjs/resources/images/default/s.gif';
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>C:\wamp\www\sfprojects\mediacoffre\plugins\sfExtjs2Plugin\lib\helper\sfExtjs2Helper.php</b> on line <b>788</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>C:\wamp\www\sfprojects\mediacoffre\plugins\sfExtjs2Plugin\lib\helper\sfExtjs2Helper.php</b> on line <b>788</b><br />



Do you have an idea for this error ?
Previous Topic:i18n form question
Next Topic:German symfony workshops/trainings
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software