>the StringResourceModel pulls the
>data, where as if you do new Model(getLocalizer()..) the value will never
>change.
This reinforces my thinking that the page needs to discuss dynamic vs.
static models.
>StringResourceModel also uses the localizer of the component it is attached
>to, so depends on where it is attached a different component stack is
>searched.
Localizer also takes a component, although to use it here I guess you'd have
to create the component with no model, call Localizer, the setModel on
the component, which is a little awkward.
> 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 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.
>AbstractDetachableModel should be removed/deprecated imho as it provides
>nothing useful
Doesn't it implement the onAttach/onDetach protocol, and add the attached
boolean?
Or is the point that people should subclass LoadableDetachableModel instead?
--
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