Configuring & Extending D2WList
Configuring & Extending D2WList
- Subject: Configuring & Extending D2WList
- From: Steve Sharman <email@hidden>
- Date: Fri, 16 Nov 2007 01:21:43 +0000
Dear all,
I'm using instances of D2WList within an application on a number of pages - purely because it gives me a quick and simple one line way of displaying particular large data sets from my model, without having to manually put together things like display groups. However I now find myself needing to do a couple of things.
Firstly I want to be able to hide the standard "delete" and "edit" buttons on the list component under certain circumstances. I guess that might be something that I can configure with a particular set of D2W rules, but I'm not sure I can see what the rule should contain - something about making the entity read-only for this instance of the D2WList? Secondly I want to be able to invoke custom actions rather than the default when the user clicks Edit and Delete - e.g. I would like to be able to delete a selected object from a relationship, rather than actually deleting that object. I'm guessing that the way to be going here is to create a custom subclass of D2WList (or ERD2WList, I guess) and override the edit/delete action methods - but I'm not clear on what those methods actually are! I can see that D2WListPage has action methods that can be used for add edit and delete (e.g. editObjectAction), but D2WList doesn't seem to implement then. If subclassing is the way to go, is it easy to do - it's not not something I've done before. I understand what needs to be done from the Java perspective, but for the WOComponent piece, do I grab the D2WList or ERD2WList component and just copy it in to my application/framework under a new name?
Thanks to anyone who is able to share their insights...
Best regards,
-- Steve |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden