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 #40644 is a reply to message #40642 ] Fri, 30 November 2007 10:01 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
I think I now fixed all problems with links in grouped-column headers.

I also added a new function getSubGroupedColumns($relatedTableName, $groupedColumns) which returns a subset of the groupedColumns hierarchy, based on the given relatedTable


Leon
Re: Building Own Generator [message #40681 is a reply to message #40644 ] Fri, 30 November 2007 17:32 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
I fixed sorting, with respect to grouped grids. We should add an option to provide the sort-direction and field.

from line 76 in action.class.php


Leon
Re: Building Own Generator [message #40707 is a reply to message #24107 ] Sat, 01 December 2007 20:47 Go to previous messageGo to next message
mattlody
Messages: 22
Registered: September 2007
Location: Wales, UK
Junior Member
Leon,

This plugin looks fantastic. I can't wait to start using it!

Just installed it now and I'm being told

Unable to parse query string "=".

I notice it says that on your demo as well. Maybe a recent commit? Any ideas on how it might fix it?

Keep up the good work Leon, it's looking fab.
Re: Building Own Generator [message #40711 is a reply to message #40707 ] Sun, 02 December 2007 00:45 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
Hi and thanks mattlody,

I am aware of the problem, but didn't had time to take a look at it yet. It is because the major changes from last week, I think I have time to fix them tomorow but I was also waiting for the patches from Jérome.

Jérome are there problems? And do you need help?

Keep you all posted.


Leon
Re: Building Own Generator [message #40721 is a reply to message #40711 ] Sun, 02 December 2007 15:15 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
Hello mattlody,

the bug has been fixed, so if you do an svn-update the list should work.

I will again continue working on the drop-down-combobox functionality in lists.

Edit pages are probably broken...(not worked on yet...)


Leon
Re: Building Own Generator [message #40722 is a reply to message #40721 ] Sun, 02 December 2007 18:33 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
I fixed the limitation of not being able to show fields more than once in a list and the problem with fields being order alphabetically.

I added two new properties to the grouped-columms:
- key: the location in the hierarchy (so E.G. city/country/name) This was stored in the array-key, but now it is a property. (Since this was the cause of the limitation fields could only be shown once)
- index: the location the column should have in the table (or at least a correct indication of the order)

I already use this functionality in _list_ajax_columnmodel

I am aware of some problems, but first I am going to eat, I've committed because it introduces some design changes which are probably already useful.


Leon
Re: Building Own Generator [message #40729 is a reply to message #24107 ] Sun, 02 December 2007 23:32 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
The columns in lists should now show up correctly.

There is only one problem remaining, if you have set the list.grouping.field and a list.grouping.display (E.G. country/name and country/abbreviation in the group-header of country/name) and you also want to show the list.grouping.field (country/name) in the grid as a column (you defined it in the list.display array) you will see this column has the same renderer as the grouping-header. This can be fixed but does not have my priority.

I hope I will now finally can work on the return of the drop-down combo boxes and don't find other more important problems.

Ps. I am aware of the ugly js-code which is produced, in which columns are sometimes defined multiple times (E.G. in the datastores), this is a todo for later...

[Updated on: Sun, 02 December 2007 23:48]


Leon
Re: Building Own Generator [message #40731 is a reply to message #24107 ] Mon, 03 December 2007 02:47 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
Drop down comboBoxes start working again.

it for now only works in plain grids, when you also have grouping, things get broken, I will take a look at it tomorrow...


Leon
Re: Building Own Generator [message #40776 is a reply to message #40731 ] Mon, 03 December 2007 15:01 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
Drop-down combo-boxes are improved,
autocompletion works again.

todo's/problems remaining concerning grids:
1. as said before, you cannot use a field both as group-by-field and column in your grid. This will make drop-down comboboxes not working (see city/country-name)
2. Saving you changes from the grid.

Other todo's:
1. Fix edit-pages
2. probably filter-pages are broken as well, since we use other field-names

Other-other todo's: (less important)
1. We sometimes use the old way of retreiving columns (not with the new methods:
$groupedColumns = $this->getColumnsGrouped($for, true);
$columns = $this->getListColumns($groupedColumns, false);
2. datastores need a check to filter double fieldnames (easy)

I will concentrate on getting the edit-pages (with fieldsets) to work

[Updated on: Mon, 03 December 2007 15:19]


Leon
Re: Building Own Generator [message #40795 is a reply to message #24107 ] Mon, 03 December 2007 21:49 Go to previous messageGo to next message
mattlody
Messages: 22
Registered: September 2007
Location: Wales, UK
Junior Member
Leon,

Thanks for all the hard work you've put in and are continuing to do.

I've had a couple of little things the last few days - as of the current revision (6307) nothing appears (not even a grid, just the grey box with the page title). Prior to this, I was getting a lot of columns with '.name' as the heading, and the grid wasn't fillig with content. Are there some settings to be set in app.yml?

You're putting a lot of work in Leon - I'm so impressed - I'd like to donate if I can. Where can I do this?

Thanks again
Matt
Re: Building Own Generator [message #40797 is a reply to message #40795 ] Mon, 03 December 2007 22:00 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
You can currently donate by testing and maybe writing documentation (readme/howtos) Wink

There are also some todo's regarding to extjs features which have to be figured out. The most important one which I like to know is how to use the autocompleting drop-down combo-boxes in such a way that they can be used to add new data.

At the moment you can type in a text in a drop-down combo-box and it will autocomplete with the values which are already known (E.G. country names in (more than 3 letters) in http://fun4me.demon.nl/test/test_dev.php/city ) But What I want to know is how to trigger an event when you press enter which send along the value you just typed (The main problem I think is, that the value-fields are IDs not display-values...).

If someone can do some Extjs testing and find an answer to this I would greatly appreciate it.

I've commited a new version which makes edit-pages somewhat work (But to be honest I mainly committed to get my work from my laptop to my desktop Wink) I will continue working on this.

the problems with columns with ".name" in it should be solved since the update of this morning I think. If not please give me examples of when things are broken.


Leon
Re: Building Own Generator [message #40804 is a reply to message #24107 ] Tue, 04 December 2007 01:43 Go to previous messageGo to next message
mattlody
Messages: 22
Registered: September 2007
Location: Wales, UK
Junior Member
Quote:

You can currently donate by testing and maybe writing documentation (readme/howtos)


Testing and relaying problems seems a little unfair - if I get some time, I'd be happy to write some docs though - though I'm pretty new to this plugin and need to learn the ropes a little.

_edit_form_ajax.php has stopped having the [? and ?] php sections parsed since revision 6308. It's just being output to the browser as text, starting from line 21:

// provide attractive and customizable tooltips for any element, once we use it ;) Ext.QuickTips.init(); // turn on validation errors beside the field globally Ext.form.Field.prototype.msgTarget= 'under'; [?php include_partial('related_ajax_stores') ?] var Edit = function(){ // define private variables var formArea[?php echo $sf_request->getParameter('id', 0) ?] = null; // return a public interface return { /* ************************************* * init ************************************* */ init : function() { // TODO etc....


Strangely, this doesn't apply to all modules, only some - I'm trying to get to the bottom of why this is.

On the modules that render, the grid isn't displayed, just the grey box with the title.

Going to go away and play with app.yml - think the answer lies there?

Thanks Leon
Matt
Re: Building Own Generator [message #40805 is a reply to message #40804 ] Tue, 04 December 2007 01:50 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
mattlody wrote on Tue, 04 December 2007 01:43

Quote:

You can currently donate by testing and maybe writing documentation (readme/howtos)


Testing and relaying problems seems a little unfair - if I get some time, I'd be happy to write some docs though - though I'm pretty new to this plugin and need to learn the ropes a little.


feel free to ask if something is unclear
mattlody wrote on Tue, 04 December 2007 01:43


_edit_form_ajax.php has stopped having the [? and ?] php sections parsed since revision 6308. It's just being output to the browser as text, starting from line 21:


this is under heavy development... I am working on it while we "speak".
mattlody wrote on Tue, 04 December 2007 01:43


// provide attractive and customizable tooltips for any element, once we use it ;) Ext.QuickTips.init(); // turn on validation errors beside the field globally Ext.form.Field.prototype.msgTarget= 'under'; [?php include_partial('related_ajax_stores') ?] var Edit = function(){ // define private variables var formArea[?php echo $sf_request->getParameter('id', 0) ?] = null; // return a public interface return { /* ************************************* * init ************************************* */ init : function() { // TODO etc....


Strangely, this doesn't apply to all modules, only some - I'm trying to get to the bottom of why this is.


I noticed this as well, you can also see it in the live demo, the normal does not work (if I recall correctly) while the master-detail does. Really strange, but as said I am working on it. I expect to fix some things this night.
mattlody wrote on Tue, 04 December 2007 01:43


On the modules that render, the grid isn't displayed, just the grey box with the title.

Going to go away and play with app.yml - think the answer lies there?


I don't think so... I don't know what causes the problem, but I am not really looking for the cause, since I am currently rewritting a lot (which probably fixes the problem automatically)
mattlody wrote on Tue, 04 December 2007 01:43


Thanks Leon
Matt


Leon
Re: Building Own Generator [message #40806 is a reply to message #40805 ] Tue, 04 December 2007 02:32 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
I think I found the cause. It hasn't been completely fixed but things should be better now. Drop-down comboboxes also don't work, but they do show up.

The edit page currently does not work, if you don't define edit.display in your generator.yml file...

I think it is now time to sleep...


Leon
Re: Building Own Generator [message #40853 is a reply to message #24107 ] Tue, 04 December 2007 14:15 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
ExtJS2.0-final is released, I've upgraded the svn with this new release, although I think it still contains bugs.

For example keyboard navigation in grids isn't perfect (shift-tab does not reverse the order in which you go through the fields) and when you use keyboard navigation no (blur/change) events are triggered...


Leon
Re: Building Own Generator [message #40860 is a reply to message #24107 ] Tue, 04 December 2007 14:46 Go to previous messageGo to next message
gouiggou  is currently offline gouiggou
Messages: 44
Registered: October 2005
Location: Paris
Member
Hi Leon,

Sorry I have not many time to work on the plugin at the moment.

I fix some other bug.
I send you a new patch (contain my old patches updated for the new version).

I see two things not work correctly:
- I have to define the related primary key of use related field in my generator.yml (ie: "client/nom" => I have to add in display section "client_id" wich is the foreign key for "client" table.
- Imagine one table where we have 2 foreign key on a same related table (ie: client1_id and client2_id for table client), the getForeignKeyToTable function does not work...

Your method for grouped column is very nice, I could see it in detail during the debug!
I can now continue with you, for optimisation or features addition.


Jérôme M.
Re: Building Own Generator [message #40878 is a reply to message #40860 ] Tue, 04 December 2007 16:32 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
Hi Jérome, great to hear from you again Wink

I applied your patches, which look great again as usual. I now understand the sfInflector method Wink

I committed but didn't test it well, I will do that in the train...


Leon
Re: Building Own Generator [message #40970 is a reply to message #40878 ] Wed, 05 December 2007 16:41 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
Merry Sinterklaas everyone (http://en.wikipedia.org/wiki/Sinterklaas)

As a present I've got a nice update today:

List and Edit-pages start to work again, with drop-down combo-boxes.

There are of course enough todo's remaining:
1. (pre-)loading of combo-box-data is broken (which you'll see when you drop box down)
2. most important: SAVING! I am going to work on this.
3. filtering (it needs to be altered to the new data stucture)

[Updated on: Wed, 05 December 2007 16:41]


Leon
Re: Building Own Generator [message #40997 is a reply to message #24107 ] Thu, 06 December 2007 02:30 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
Creating, editing and saving (from edit and list pages) now also works.

Although at the moment restricted to only being able to save local fields.
So from a city you can save both its name as well as the country it is in, but you cannot change the country-name. This is not possible in the interface at the moment, but this will be the next step: Being able to provide a new country name as well, if I get to hear/find out how to capture the name a user has typed from the drop-down combo-box. (I can capture it for autocompletion, but using it to create a new country seems to be harder...)


Leon
Re: Building Own Generator [message #41138 is a reply to message #24107 ] Fri, 07 December 2007 18:08 Go to previous messageGo to next message
snk00sj  is currently offline snk00sj
Messages: 71
Registered: July 2006
Member
First of all let me start by thanking you all for your great work & commitment to this plugins, it is working great. It took my some time to go through this thread Smile

I just changed a few things on the theme page (wiki), and in the next days i'll go through some more of the documentation to see if it's still reflecting the latest revision.


Digital Base Webagency
Re: Building Own Generator [message #41151 is a reply to message #41138 ] Fri, 07 December 2007 20:11 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
Hi snk00sj,

Thanks for updating the wiki.

If you've got questions, you know where to find me Wink

I think the current code is getting stable enough to not requiring the documentation to change every time, so perfect timing.

Today I fixed some small bugs related through preloaded values for drop-down combo-boxes. At the moment I am working on improving the edit-pages, but you can already see the effect on the list-pages.

Regarding the documentation, I took a look at the wiki and thanks for the tip about svn:externals (I didn't knew that yet).

- Sort on foreign- and composite-columns, this will be done differently. Foreign tables probably don't require this at all, since the information can be now be found in the field-name already. For partials a sort-property will be nice, but the fields can be defined in the same way as for display-fields (so country/name) and I now know how to resolve the foreign-keys so join_fields will be obsolete.

- Master detail is done completely different (see example about city-master detail (you need to define a peer_method, and the rest is grouping) ).


Leon
Re: Building Own Generator [message #41164 is a reply to message #24107 ] Fri, 07 December 2007 22:39 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
drop-down combo-boxes behave normal now in edit-pages as well!

I am going to work on loading the edit-pages in a tab-page, and if this works make it possible to define in where to load the edit-pages (maybe you don't want to load the detail-pages in this tab, but in another tab, or in a new page, or in a region).

I will also take a look at filtering and there are some 'comma'-problems, I will fix those as well, so things will work in both Opera and IE. (Do you know this already works on a Nokia E90 Surprised)

If someone can take a look at how to add new values from the drop-down combo-boxes (so to add a new country name, from the drop-down combo-boxes) I would greatly appreciate it.


Leon
Re: Building Own Generator [message #41171 is a reply to message #24107 ] Fri, 07 December 2007 23:55 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
Never mind the request, I am now able to detect new values! it need some polishing and a correct action which adds the new value (or ask if you would like to add a new value and optionally show a new-object edit-page (an add country page in the example case)).

But the beginning is there...

the code is:
                   'onBlur' => 'function(){
                           if ('.$store.'.find(\''.str_replace('/', $tableDelimiter, $checkName).'\', this.getRawValue() ) == -1) {
                             alert(\'NEW VALUE: \'+this.getRawValue())
                           }
                         }'


Leon
Re: Building Own Generator [message #41270 is a reply to message #24107 ] Mon, 10 December 2007 02:46 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
Hello KRavEN and Kubens

how is your work going?

I was trying out your work and I think I hit on a limitation at the moment. I want to define the autoLoad property of a Panel by providing it an Array, but this seems not to be possible. If I define:

<?php
$sfExtjs2Plugin
->Panel(array(
                    
'autoLoad' => array(
                      
'url' => 'city_grouped',
                      
'scripts' => 'true',
                    ),
                    
'title' => 'Grouped Grids',
                    
'autoScroll' => 'true'
                  
))
?>


I get
new Ext.Panel ({autoLoad:Array,title:'Grouped Grids',autoScroll:true})


instead of the desired
new Ext.Panel ({autoLoad:[url:'city_grouped',scripts:true],title:'Grouped Grids',autoScroll:true})


Is that correct and should I do this someway else or can you solve this? I haven't searched for a solution yet, since you probable already where aware of this problem, and maybe no a way to work around it... And it is time to sleep...


Leon
Re: Building Own Generator [message #41350 is a reply to message #41270 ] Tue, 11 December 2007 01:54 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
I found the problem,

it is in _build_attributes at line +/- 435, which says:

$attributes .= sprintf('%s%s:%s', ($attributes === '' ? '' : ','), $key, $value);

which is very nice, except for sprintf-ing $value, without testing if it is an array...

I added this function to recursively handle arrays, although it probable can use something like the quote_except function Wink

  private static function _process_value($value = '')
  {
    if (is_array($value)) 
    {
      $array_value = $value;
      $value = '{';
      
      foreach ($array_value as $key => $v)
      {
        if (!is_array($v) && ($v != 'true') && ($v != 'false'))
        {
          $value .= sprintf('%s%s:\'%s\'', ($value === '{' ? '' : ','), $key, sfExtjs2Plugin::_process_value($v));
        }
        else
        {
          $value .= sprintf('%s%s:%s', ($value === '{' ? '' : ','), $key, sfExtjs2Plugin::_process_value($v));
        }
      }
       
      $value .= '}';
    }
    
    return $value;
  }


It is in the svn.

I have also updated the live demo. To see the new functionality, change the name of a country, to a non-existing country-name and leave the field.... (it is not finished, but I assume you get the idea Wink ) (I will fix the layout later, the accordion layout isn't very appropriate is it Razz)


Leon
Re: Building Own Generator [message #41375 is a reply to message #41350 ] Tue, 11 December 2007 10:20 Go to previous messageGo to next message
snk00sj  is currently offline snk00sj
Messages: 71
Registered: July 2006
Member
Leon,

After your last update i get the following error :

// ------------------------ // SETUP THE GRID COLUMNMODEL // ------------------------
Fatal error: Class 'sfExtjs2Plugin' not found in /path/webroot/plugins/sfExtjsThemePlugin/lib/sfExtjsPropelAdminGenerator.php on line 885


Looking at your changesets i think this is the problem :

http://trac.symfony-project.com/changeset/6437


Line 885-887
$sfExtjs2Plugin = new sfExtjs2Plugin(array('theme'=>'gray')); 
//$sfExtjs2Plugin->load(); 
//$sfExtjs2Plugin->beg


I see more lines using $sfExtjs2Plugin are commented, when following this thread i had the idea the Ext framework wasn't extracted from this plugin just yet, right ?


In case i was mistaking I tried loading the http://trac.symfony-project.com/wiki/sfExtJSPlugin plugin, but still no luck there. Is there anything i am overlooking ?

[Updated on: Tue, 11 December 2007 10:22]


Digital Base Webagency
Re: Building Own Generator [message #41376 is a reply to message #41375 ] Tue, 11 December 2007 10:23 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
Ah sorry,

you now also have to checkout the sfExtjs2Plugin in your plugin folder, that should be all.

svn co http://svn.symfony-project.com/plugins/sfExtjs2Plugin/trunk


Leon
Re: Building Own Generator [message #41378 is a reply to message #24107 ] Tue, 11 December 2007 10:55 Go to previous messageGo to next message
snk00sj  is currently offline snk00sj
Messages: 71
Registered: July 2006
Member
ok that works, i updated the documentation, and created a page for the sfExtjs2Plugin

http://trac.symfony-project.com/wiki/sfExtjs2Plugin


Digital Base Webagency
Re: Building Own Generator [message #41382 is a reply to message #41378 ] Tue, 11 December 2007 11:05 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
Great.

Can it be that you have a small type in the section "Single Checkout"? It looks like it is pointing to the extjs "1" plugin. (probably a copy-paste error)


Leon
Re: Building Own Generator [message #41383 is a reply to message #24107 ] Tue, 11 December 2007 11:08 Go to previous messageGo to next message
snk00sj  is currently offline snk00sj
Messages: 71
Registered: July 2006
Member
yes, fixed

Something else, i was looking how to include actions in the grid. (for example approve/decline, edit icon, etc). A nice start would be to include partials in the grid itself.

Is this supported at this time ? I tried using _partial in the generator.yml (like it works in normal admin generator), but as soon as i do this, the resultset is empty.

    list:
      max_per_page:   10
      title:          Postal Code
      display:        [postalcode, name, country/name]
      filters:        [postalcode, name, country/name]
      peer_method:    doSelectJoinCountry




The partial i am using is just a file with a string in it (no code, yet Smile )

[Updated on: Tue, 11 December 2007 11:29]


Digital Base Webagency
Re: Building Own Generator [message #41390 is a reply to message #41383 ] Tue, 11 December 2007 12:31 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
I haven't worked on partials yet, and didn't tested it either, I will take a look at it later today. It should be available eventually...

I can remember Jérôme already implemented something for actions per row. You could define actions in the generator.yml file and a context-menu would appear if you right-clicked in a row. I don't know if this still works, you could define it by defining the list.object_actions property in the generator.yml file. I will take a look at that later as well. I am not a fan of right-clicking for important actions, but this should be available eventually as well...


Leon
Re: Building Own Generator [message #41399 is a reply to message #41390 ] Tue, 11 December 2007 13:16 Go to previous messageGo to next message
snk00sj  is currently offline snk00sj
Messages: 71
Registered: July 2006
Member
thanks for that.

Another thing, i wanted to work with multiple relations on a single object (company-country, company-postalcode), and i am trying to defined multiple joins in the generator.yml. For that it would be handy i could see the query being executed.

The symfony toolbar isn't showing the query on page load (only this one :
[0.47 ms] SELECT COUNT(company.ID) FROM company)

So i am guessing a javascript/ajax caller does that.

There is a way to update the toolbar when using ajax calls (see : http://trac.symfony-project.com/wiki/sfAjaxWebDebugPlugin). One downside though :

From the plugin wiki :
Quote:


After completing the AJAX request you should call the javascript function getAjaxWebDebug() to update the toolbar.


Where should i put this function to make sure it is updated each extjs background action ? It would be nice to integrate this in the plugin, just an idea :

1/ the plugin detects if you have sfAjaxWebDebugPlugin enabled
2/ if so it always (when debugbar is enabled) calls the getAjaxWebDebug() javascript function

This way we make sure people can see wat is happening in the background (using the toolbar).

[Updated on: Tue, 11 December 2007 13:17]


Digital Base Webagency
Re: Building Own Generator [message #41419 is a reply to message #24107 ] Tue, 11 December 2007 16:05 Go to previous messageGo to next message
excessivedemon  is currently offline excessivedemon
Messages: 49
Registered: March 2007
Member
Hi guys.. This plugin looks very promising.. how I wish I could make this work.. I've been trying all day to make this work to no avail.. I'm lost.. any help would be greatly appreciated.. please check my post: http://www.symfony-project.org/forum/index.php/m/41418/#msg_ 41418

Any ideas on why I can't make this work on my end? Thanks in advance...
Re: Building Own Generator [message #41435 is a reply to message #41399 ] Tue, 11 December 2007 17:05 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
Hi snk00sj thanks for your message at the Extjs forum Wink

regarding looking at the query, I am aware of the plugin you mentioned, but didn't have time yet to integrate it with this plugin. If you have a patch which accomplish this please send it to me.

What I currently do is altering the (template of the) actions.class.php commenting out the last two lines of the executeJsonList method:

like
//    $this->setLayout(false);
//    sfConfig::set('sf_web_debug', false);


And then browse to my json data directly like:
http://fun4me.demon.nl/test/test_dev.php/city/jsonList?limit =20&start=0

(with firebug you can copy the url WITH the parameters...)

This way you should see your json-data with SF-toolbar in which you can see the query.

You should disable the comments to improve performance..

[Updated on: Tue, 11 December 2007 17:06]


Leon
Re: Building Own Generator [message #41441 is a reply to message #41435 ] Tue, 11 December 2007 18:25 Go to previous messageGo to next message
excessivedemon  is currently offline excessivedemon
Messages: 49
Registered: March 2007
Member
thanks for your reply.. yes.. json appears correct.. here it is:

{totalCount:"7", data:[ { "parcel-id": "1", "parcel-assignment_id": "1", "parcel-name": "Parcel 1 for Assignment 1", "parcel-assignment-name": "Assignment 1" }, { "parcel-id": "2", "parcel-assignment_id": "1", "parcel-name": "Parcel 2 for Assignment 1", "parcel-assignment-name": "Assignment 1" }, { "parcel-id": "3", "parcel-assignment_id": "2", "parcel-name": "Parcel 1 for Assignment 2", "parcel-assignment-name": "Assignment 2" }, { "parcel-id": "4", "parcel-assignment_id": "2", "parcel-name": "Parcel 2 for Assignment 2", "parcel-assignment-name": "Assignment 2" }, { "parcel-id": "5", "parcel-assignment_id": "3", "parcel-name": "Parcel 1 for Assignment 3", "parcel-assignment-name": "Assignment 3" }, { "parcel-id": "6", "parcel-assignment_id": "3", "parcel-name": "Parcel 2 for Assignment 3", "parcel-assignment-name": "Assignment 3" }, { "parcel-id": "7", "parcel-assignment_id": "3", "parcel-name": "Parcel 3 for Assignment 3", "parcel-assignment-name": "Assignment 3" }]}

any more things i could try? By the way.. I noticed no city/country is returned when browsing to:

http://fun4me.demon.nl/test/index.php/city

but there are cities/countires when browsing:

http://fun4me.demon.nl/test/test_dev.php/city

anyway.. any other things i can try? thanks again..
Re: Building Own Generator [message #41445 is a reply to message #41441 ] Tue, 11 December 2007 18:42 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
excessivedemon wrote on Tue, 11 December 2007 18:25


I noticed no city/country is returned when browsing to:

http://fun4me.demon.nl/test/index.php/city

but there are cities/countires when browsing:

http://fun4me.demon.nl/test/test_dev.php/city





Yes I know about that, it is because of my (mis)configuration of apache. So That's why I always mention the dev version.

Ps. would you be so kind to mention your bugs in one forum-post at a time Wink This is a little confusing. I prefere this post, since I get mail updates from this one, and I don't often check the all the posts in the general symfony forum, since I don't have the time...


Leon
Re: Building Own Generator [message #41453 is a reply to message #41445 ] Tue, 11 December 2007 19:38 Go to previous messageGo to next message
excessivedemon  is currently offline excessivedemon
Messages: 49
Registered: March 2007
Member
Thanks for your reply. Here is a recap of the issue I am having:

"when using relationships (e.g. assignment/name) on my generator.yml, I just get the title of my module (e.g. parcel list) and the rest of the page is blank.. everything works fine when i am not using relationships.." (see sfExtjsThemePlugin.JPG) in the attached .rar file.

Here are the exact steps to replicate the issue:

1. Create a new project

2. Modify databases.yml and propel.ini to connect to any database


example: (databases.yml)

all:
propel:
class: sfPropelDatabase
param:
dsn: mysql://root:p455w0rd@localhost/symfony_test


example: (propel.ini - modified lines 5, 6, and 7)

propel.database.createUrl = mysql://root:p455w0rd@localhost/symfony_test
propel.database.url = mysql://root:p455w0rd@localhost/symfony_test
propel.mysql.tableType = InnoDB


3. Install sfExtjsThemePlugin and sfExtjs2Plugin

4. Extract the .rar file and copy over the contents to the newly created project directory (this should overwrite existing config, data, and apps folders)

5. Do a "symfony-propel-build-all-load frontend" command

*** the rar files contain my schema.yml and generator.yml for my assignments and parcels

Again, everything works fine if there are no relationships used.. thanks so much in advance..

Re: Building Own Generator [message #41461 is a reply to message #41453 ] Tue, 11 December 2007 21:55 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
I think there is a problem at your site somewhere, since I re-created your demo and it simply works, see screenshot.

http://fun4me.demon.nl/~leon/demon.png

I set firebug to the location of your problem.

Did you notice there is php in your error message at firebug Confused This obviously should not be there! it should all be html/javascript ofcourse.

I don't know how to solve this for you...


Leon
Re: Building Own Generator [message #41465 is a reply to message #41383 ] Tue, 11 December 2007 22:58 Go to previous messageGo to next message
lvanderree  is currently offline lvanderree
Messages: 652
Registered: June 2007
Location: Netherlands
Faithful Member
partials are working, check it out...


Leon
Re: Building Own Generator [message #41466 is a reply to message #41465 ] Tue, 11 December 2007 23:27 Go to previous messageGo to previous message
excessivedemon  is currently offline excessivedemon
Messages: 49
Registered: March 2007
Member
That's very odd.. I can replicate the same issue on a number of machines.. what exact version of symfony are you running on? I'm running on symfony 1.0.9 - PHP 5.2.3. Would it be possible for you to perhaps .rar the entire application (which is running on your end) and upload it here? I'll try to use your exact copy and see the issue persists. Thanks!
Previous Topic:i18n form question
Next Topic:German symfony workshops/trainings
Goto Forum:
  

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