On 1/16/07, Loren Rosen <[EMAIL PROTECTED]> wrote:

> all models are detachable.

This is true in the sense that they all implement IDetachable. But some
models
don't do anything interesting when detached. It would be nice to be able
to
give some simple direction to developers who have a large model object,
for
example.


it seems quiet simple to me. if you need to deatch then implement the
method, if not then leave it as a noop. i would venture and guess that 90%
of models out there are detachable and we tend to cater to the 90% usecase.




>it also eliminates instanceof we would have to do when detaching
>components.

right but presumably you still have to do the instanceof on attach. But it
doesn't
really matter so far as the 'working with models' page goes.


there is no onattach(). take a look at the abstractdetachablemodel,
onattach() is merely emulated via getobject().



>AbstractDetachableModel should be removed/deprecated imho as it provides
>nothing useful

Doesn't it implement the onAttach/onDetach protocol, and add the attached
boolean?


there is no protocol, it simply provides those methods - but imho those
methods add nothing useful.



Or is the point that people should subclass LoadableDetachableModel
instead?


you subclass whatever model best fits your usecase :)

-igor




--
View this message in context:
http://www.nabble.com/revising-the-%22Working-with-Wicket-models%22-page-tf3016921.html#a8402873
Sent from the Wicket - User mailing list archive at Nabble.com.





-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to