It sounds to me like you might be able to use the Strategy design
pattern here. Your design (mentioned in a previous email) made a lot
more sense to me than Igor's idea of throwing "unsupported" exceptions.
In essense, you could say there are two available navigation strategies
so far: linear and page-oriented. Then you simply allow users to plug
them in and everything should (hopefully) be clean from inheritance
point of view.
Gili
Christian Essl wrote:
On Fri, 02 Sep 2005 18:04:31 -0400, Gili <[EMAIL PROTECTED]> wrote:
What is the reason? The new method sounds very anti-OOP to me.
Usually one layers functionality using interfaces. Stuffing them all
into the base class but having them throw exceptions when "disabled"
sounds a lot like a flat object model to me.
The reason for unifying them in one base class is also to make the
inheritance hierarchy smaller, less deep and more consistent. If you
split DataView and PageableDataView than you also have to make a
GridDataView and a PageableGridDataView. Two classes which are from the
hierarchy total unreleated but are otherwise more or less the same.
Further if you look at the old code of DataView and PagabeableDataView
the PageableDataView is not easy to understand, because you have to
consider two classes with all the protected and overriding co-work. A
general problem with inheritance, which gets worse the deeper the
hierarchy is.
And last but most important the user has to learn two classes where
there always remains some uncertainty wheter the child-class does indeed
behave like the super class, because it could always override some
methods (as it currently does).
So I am realy for merging them in one class.
Christian
Gili
Johan Compagner wrote:
that is something we had.. and want to get rid of i think..
johan
Gili wrote:
Igor Vaynberg wrote:
Yes the support delegate is lazily created. Setcurrentpage() throws
illegalstateexception if paging is disabled.
Sounds like an anti-pattern to me. Why don't you have a base
class without Pagable support and a subclass that is Pagable
(always) with these methods.
Gili
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle
Practices
Agile & Plan-Driven Development * Managing Projects & Teams *
Testing & QA
Security * Process Improvement & Measurement *
http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle
Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing
& QA
Security * Process Improvement & Measurement *
http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
--
http://www.desktopbeautifier.com/
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user