Hello again Warren,
Thanks for finding this one, I have committed a fix for it (revision
953).
If you don't want to follow the svn trunk, here is the diff:
--- trunk/turbogears/toolbox/catwalk/static/javascript/catwalk.js
2006-03-15 13:48:24 UTC (rev 952)
+++ trunk/turbogears/toolbox/catwalk/static/javascript/catwalk.js
2006-03-15 14:39:51 UTC (rev 953)
@@ -835,11 +835,11 @@
'sort':'',
'column_management':
{'function':'catwalk.updateColumnsJoinView','params':params},
'select':
{'function':'catwalk.retrieveDisplayObject','params':[results
['objectName']]},
- 'edit':
{'function':'catwalk.retrieveFormEdit','params':[results
['objectName']]},
- 'remove':
{'function':'catwalk.retrieveRemove','params':[results['objectName']]}
+ 'edit':
{'function':'catwalk.retrieveFormEdit','params':[results['objectName']]}
}
};
- if(results['joinType']=='SORelatedJoin') data['actions']['remove']
='';
+ if(results['joinType']!='SORelatedJoin') data['actions']['remove']
= {'function':'catwalk.retrieveRemove','params':[results['objectName']]}
+
var grid = (results['rows'].length >0)? Widget.grid.render(results
['join'],data):'';
var r = results;
if(results['joinType']=='SORelatedJoin')
@@ -848,7 +848,6 @@
}
else
{
- //grid = DIV(null,grid,catwalk.renderAddMultipleJoinsControl(r
['joinObjectName']));
grid = DIV(null,grid,catwalk.renderAddMultipleJoinsControl(r
['hostObject'],r['id'],r['joinObjectName']));
}
replaceChildNodes('grid_'+ results['join'],grid);
Cheers.
Ronald
On Mar 14, 2006, at 11:31 PM, wrb wrote:
>
> I have this model and I'm trying to use Catwalk to handle CRUD. I'm
> currently using TG 0.9a1 with catwalk included at 0.9.4 (I think).
> Browser firefox 1.5.x and Sqlite 3.2.6
>
> class Perftest(SQLObject):
> version = ForeignKey('ProductVersion')
> modules = RelatedJoin('Module')
>
> class ProductVersion(SQLObject):
> name = StringCol(length=20, unique=True)
> description = StringCol(length=80)
>
> class Module(SQLObject):
> name = StringCol(length=20, unique=True)
> description = StringCol(length=80)
> tests = RelatedJoin('Perftest')
>
> .....
>
> tg-admin sql sql yields:
>
> CREATE TABLE module (
> id INTEGER PRIMARY KEY,
> name VARCHAR(20) UNIQUE,
> description VARCHAR(80)
> )
> CREATE TABLE module_perftest (
> module_id INT NOT NULL,
> perftest_id INT NOT NULL
> );
>
> CREATE TABLE perftest (
> id INTEGER PRIMARY KEY,
> version_id INT
> );
>
> CREATE TABLE product_version (
> id INTEGER PRIMARY KEY,
> name VARCHAR(20) UNIQUE,
> description VARCHAR(80)
> );
>
> So far so good (right?)
>
> Anyway, I am able to successfully add models to perftest with CatWalk
> but once they are "added" to the db, the "viewing" or "editing"
> capabilities don't seem to work at all. This problem exists for both
> the perftest or module table. The catwalk demo mov I saw for
> Many-to-Many relations did have this working but I'm not sure how they
> set up their model.
>
> I am I doing something wrong? I searched around and found a ticket or
> two that appear to be a little similar but couldn't find a ticket or
> posting with the exact same problem.
>
> thanks --- Warren.
>
>
>
________________________________
Ronald Jaramillo
mail: ronald AT checkandshare DOT com
blog: http://www.checkandshare.com/blog
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---