Hi
Recently, on the mailing list, I read quite some people saying basically
than using models all over the place was a bad idea. Can someone explain
it a bit more ?
Indeed, I was kind of agreeing until recently, when I had an issue with
a (self made) Behavior taking a string.
I needed this string to be refresh on each page display... So what to do
then ? Introduce a model to be able to use LoadableDetachableModel if
needed (and maybe still providing a convenience method from string to
model<String>).
So, since, I'm kind of thinking that as soon that you do a reusable
component, you should use models if data is needed. The only "proper"
use case I could think of for not using a model is through a convenience
method or for a local only component. And even that is doubtful, I've
already rewritten some locally used component then to a Model (instead
of the initial string)...
As such, in the end, using a model looks like a warranty against future
changes.
Do I miss some use cases ?
thanks in advance
joseph
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org