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


I'm working on this now, and have a few questions:

When would you use StringResourceModel instead of getting a string from
Localizer
and creating a model from that?


the two operations are equivalent, however the StringResourceModel pulls the
data, where as if you do new Model(getLocalizer()..) the value will never
change.

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.

there is also ResourceModel which is a simplified version of
StringResourceModel - it doesnt offer things like variable substitution.

What's the attach and detach behavior of the property models?


what do you mean? the default behavior is to simply pass the call  to the
containing models if any.

Why does IModel extend IDetachable? One might expect only
AbstractDetachableModel to do so.


all models are detachable - having IModel extend it makes the api contract
clear. it also eliminates instanceof we would have to do when detaching
components.

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


Why does IDetachable define detach() but not attach()?


attach() would be nothing but bloat. we wish to emphasize the lazy-loading
pattern that models should use, so a model is "attached" whenever its
getobject() is called.


Am I the only one who thinks that a "nested model" should really be called
an
"enclosing model"? In other words, I at first interpreted getNestedModel()
to mean "get models that are nested inside of me", not "get the model that
I'm nested inside of". Then I couldn't understand why it wasn't
getNestedModels().


the nested model means a model that is enclosed inside the current one. it
is really only used/should be used internally. in 2.0 we have removed it.

-igor


igor.vaynberg wrote:
>
> go ahead and edit the page...the wiki is versioned i think so we can
> always
> roll back.
>
> when you are done with the majority let us know and we will review the
> changes.
>
> -igor
>
>
> On 1/15/07, Loren Rosen <[EMAIL PROTECTED]> wrote:
>>
>>
>> When I first started using Wicket I found the information on models a
>> little
>> hard to follow. So now I'd like to revise the "Working with Wicket
>> models"
>> wiki page
>> (
>>
http://cwiki.apache.org/confluence/display/WICKET/Working+with+Wicket+models
>> )
>> to improve this. I'd be happy to outline what I think should be
improved
>> (though this is a little hard to do in detail short of simply
annotating
>> the
>> page) or I can just plunge ahead and draft a revised page. If I do the
>> latter I could potentially post it somewhere else for comment instead
of
>> directly replacing the existing page on the wiki. Perhaps we need a 'in
>> draft' part of the wiki for working on long pages like this one.
>>
>> Actually, another alternative is for me to gradually introduce changes
to
>> the wiki page over a span of days, giving people a chance to comment as
I
>> go.
>> --
>> View this message in context:
>>
http://www.nabble.com/revising-the-%22Working-with-Wicket-models%22-page-tf3016921.html#a8378321
>> 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
>
>

--
View this message in context:
http://www.nabble.com/revising-the-%22Working-with-Wicket-models%22-page-tf3016921.html#a8402226
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