From: Patrice G. <pa...@ma...> - 2002-12-17 23:11:39
|
Hi Anjo, Here is the way it's set up right now: in ERD2WListPage, we test to see if the context can provide an editConfigurationName. If not, we call super, and this eventually calls D2W.factory().inspectPageForEntityNamed(object().entityName(),session()) which should do the right thing in an inheritance situation. So I am assuming you have rule that looks like pageName='MyListPage' --> editConfigurationName='MyEditConfiguration' Couple of things you can do: 1/ as you suggested, write rules like: pageName='MyListPage' and object.entityName='Asset' --> editConfigurationName='EditAsset' this will cause object.entityName (not just object) to become a significant key for editConfigurationName, which is fine 2/ you could also write a custom delayed assignment to compute the name of the configuration you want.. I guess the decision depends on how often you are going to do this. If it's often, 2/ might make more sense.. Hope this helps, -P On Tuesday, December 17, 2002, at 02:24 PM, Anjo Krank wrote: > Sorry to be a bit persintant here, but I need to fix to this > bug...does anyone have a better idea than the ones I outlined? And if > not, which one is preferred? > > Cheers, Anjo > > Am Donnerstag, 12.12.02 um 17:39 Uhr schrieb Anjo Krank: > >> All, >> >> the ERD2WListPage doesn't work correctly when you show items in >> abstract entities: I have Assets (consisting of Images and Documents) >> when the user selects the first item to edit it, it picks up the >> correct follow page configuration (EditDocument, for example). If the >> second one is not of the same type, then he gets the EditDocument >> page with an Image and of course gets an Exception. >> >> I see two ways to work around this: one is to add the >> object.entityName = "Image" to the rule that resolved the follow >> page, but this would make the object(?) a significant key. The second >> would be more complex as to create a "ERDEditButton" that creates a >> new context, pushes the object's entityName and current PC into it >> and resolves the follow page form there. >> >> Any other ideas welcome:) >> >> Cheers, Anjo >> >> >> >> ------------------------------------------------------- >> This sf.net email is sponsored by: >> With Great Power, Comes Great Responsibility Learn to use your power >> at OSDN's High Performance Computing Channel >> http://hpc.devchannel.org/ >> _______________________________________________ >> Wonder-disc mailing list >> Won...@li... >> https://lists.sourceforge.net/lists/listinfo/wonder-disc >> >> > > > > ------------------------------------------------------- > This sf.net email is sponsored by: > With Great Power, Comes Great Responsibility Learn to use your power > at OSDN's High Performance Computing Channel > http://hpc.devchannel.org/ > _______________________________________________ > Wonder-disc mailing list > Won...@li... > https://lists.sourceforge.net/lists/listinfo/wonder-disc |