In the description of the PropertyModel there is an implicit example, that
might as well be spelled out.

personForm.add(new RequiredTextField("personName", new
PropertyModel(person, "name")));

I also changed the id of the field to personName to distinguish it
from the property: name.



On 1/22/07, Jonathan Locke <[EMAIL PROTECTED]> wrote:



We did already break the model contract with 1.2/1.3... would
get/setObject->get/setValue be a huge hassle?  Or am I spacing something
here?


Jonathan Locke wrote:
>
>
> Made a few more changes.  I think it's getting shorter/better.
>
> My one regret looking at this documentation is that I wish
> IModel.get/setObject were actually IModel.get/setValue.  Or was there
some
> crazy reason we didn't do this?  It would be much easier and more
natural
> to talk about a model's value this way...
>
>
> Jonathan Locke wrote:
>>
>>
>> Nice work.  I made a few small changes and rephrased the first
paragraph
>> to be even more specific.  Maybe it could be tweaked a little more, but
I
>> think this sums it up better now:
>>
>> "In Wicket, a model holds a value for a component to display and/or
edit.
>> How exactly this value is held is determined by a given model's
>> implementation of the wicket.model.IModel interface. This interface
>> decouples a component from the data which forms its value. This in turn
>> decouples the whole Wicket framework from any and all details of model
>> storage, such as the details of a given persistence technology. As far
as
>> Wicket itself is concerned, a model is anything that implements the
>> IModel interface, no matter how it might do that."
>>
>> It does feel like this is the best place to show the IModel interface
>> since readers will be wondering what it looks like already.  It sounds
>> scarier than it is, so why delay?
>>
>>
>> Loren Rosen wrote:
>>>
>>> I've saved my rewritten version. (See
>>>
http://cwiki.apache.org/confluence/display/WICKET/Working+with+Wicket+models
)
>>> Comments by everyone from experts to complete newbies
>>> are most welcome. Doubtless there are things that are confusing or
>>> flat-out wrong.
>>>
>>> In addition to rephrasing or rewriting a lot of material, and adding a
>>> few things, I
>>> excised some details I thought would be distracting for a beginner.
Some
>>> of this
>>> material is, I think, still useful, perhaps in a slightly more
advanced
>>> "More about
>>> Models" page.
>>>
>>>
>>> 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#a8515678
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




--
Scott Swank
reformed mathematician
-------------------------------------------------------------------------
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