Re: Question / Best Practise / (List)Model vs. (List)DataProvider

2014-05-22 Thread Patrick Davids
Hi Colin,
and thanx to all responders...

Ok, I think I got it... somehow... ;-)

Got a new question then...
A RefreshingView, due to its method getItemModels(), also acts as a 
'Model Factory' for me... hmm...

Ähm, so, does anyone ever created a RefreshingView with a default model?
new RefreshingViewCar(id, any_other_model_than_a_car?){
protected IteratorIModelCargetItemModels(){

}
}

Maybe, my first question relates to that.
But I am not sure... the RefreshingView is still a bit confusing to me...

Patrick


Am 19.05.2014 06:51, schrieb Colin Rogers:
 The way I see (right or wrong!) is,

 You create/manage Models for individual components on a case-by-case basis.

 For Repeaters which internal components are dynamically created, you need a 
 DataProvider to create and manage those Models for the components and the 
 Collections that comprise their data.

 DataProvider could be described as a 'Model Factory', and is not a Model in 
 itself.

 Cheers,
 Col.

 -Original Message-
 From: Sven Meier [mailto:s...@meiers.net]
 Sent: Friday, 16 May 2014 6:17 AM
 To: users@wicket.apache.org
 Subject: Re: Question / Best Practise / (List)Model vs. (List)DataProvider

 IDataProvider is all about efficiency, it provides efficient access to a 
 subset of the data.

 Perhaps we can make it even more efficient with the recent proposal on the 
 @dev list.

 Regards
 Sven


 On 05/08/2014 01:37 PM, Patrick Davids wrote:
 Hi all,

 what I often think about, and I cannot really say is; when to use
 Model or DataProvider as data providing object for components they
 repeat some thing?

 Javadoc says, DataProvider are (good) for DataViews.
 Hmm... ok, and they allow easer iterating (first index, count).

 I also can achieve this by using a LoadableDetachableModelList
 combined with a ModelIteratorAdapater.

 Both have detaching logic... both featuring extension, both have a
 sort of load-method (getObject() vs. getData()).

 Sometimes I think, they are so similar to each other... where is the
 key difference?

 Would be cool if some of yours just reply his two cents of daily
 programming experience... so I can get some new point of views.

 When do you use DataProvider or ModelList?
 Did you experienced the same, not to exactly know which one you will
 use for your new page/panel/component?
 And often think about pro and cons using it with RepeatingViews? And
 later on, you see... I could have used both... hmm...

 thanx a lot for feedback and kind regards Patrick
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org

 EMAIL DISCLAIMER This email message and its attachments are confidential and 
 may also contain copyright or privileged material. If you are not the 
 intended recipient, you may not forward the email or disclose or use the 
 information contained in it. If you have received this email message in 
 error, please advise the sender immediately by replying to this email and 
 delete the message and any associated attachments. Any views, opinions, 
 conclusions, advice or statements expressed in this email message are those 
 of the individual sender and should not be relied upon as the considered 
 view, opinion, conclusions, advice or statement of this company except where 
 the sender expressly, and with authority, states them to be the considered 
 view, opinion, conclusions, advice or statement of this company. Every care 
 is taken but we recommend that you scan any attachments for viruses.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Question / Best Practise / (List)Model vs. (List)DataProvider

2014-05-18 Thread Colin Rogers
The way I see (right or wrong!) is,

You create/manage Models for individual components on a case-by-case basis.

For Repeaters which internal components are dynamically created, you need a 
DataProvider to create and manage those Models for the components and the 
Collections that comprise their data.

DataProvider could be described as a 'Model Factory', and is not a Model in 
itself.

Cheers,
Col.

-Original Message-
From: Sven Meier [mailto:s...@meiers.net]
Sent: Friday, 16 May 2014 6:17 AM
To: users@wicket.apache.org
Subject: Re: Question / Best Practise / (List)Model vs. (List)DataProvider

IDataProvider is all about efficiency, it provides efficient access to a subset 
of the data.

Perhaps we can make it even more efficient with the recent proposal on the @dev 
list.

Regards
Sven


On 05/08/2014 01:37 PM, Patrick Davids wrote:
 Hi all,

 what I often think about, and I cannot really say is; when to use
 Model or DataProvider as data providing object for components they
 repeat some thing?

 Javadoc says, DataProvider are (good) for DataViews.
 Hmm... ok, and they allow easer iterating (first index, count).

 I also can achieve this by using a LoadableDetachableModelList
 combined with a ModelIteratorAdapater.

 Both have detaching logic... both featuring extension, both have a
 sort of load-method (getObject() vs. getData()).

 Sometimes I think, they are so similar to each other... where is the
 key difference?

 Would be cool if some of yours just reply his two cents of daily
 programming experience... so I can get some new point of views.

 When do you use DataProvider or ModelList?
 Did you experienced the same, not to exactly know which one you will
 use for your new page/panel/component?
 And often think about pro and cons using it with RepeatingViews? And
 later on, you see... I could have used both... hmm...

 thanx a lot for feedback and kind regards Patrick
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

EMAIL DISCLAIMER This email message and its attachments are confidential and 
may also contain copyright or privileged material. If you are not the intended 
recipient, you may not forward the email or disclose or use the information 
contained in it. If you have received this email message in error, please 
advise the sender immediately by replying to this email and delete the message 
and any associated attachments. Any views, opinions, conclusions, advice or 
statements expressed in this email message are those of the individual sender 
and should not be relied upon as the considered view, opinion, conclusions, 
advice or statement of this company except where the sender expressly, and with 
authority, states them to be the considered view, opinion, conclusions, advice 
or statement of this company. Every care is taken but we recommend that you 
scan any attachments for viruses.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Question / Best Practise / (List)Model vs. (List)DataProvider

2014-05-16 Thread Paul Bors
Models:
http://wicket.apache.org/guide/guide/modelsforms.html

Data Providers (ie: Repeaters):
http://wicket.apache.org/guide/guide/repeaters.html

Long story short, a repeater's DataProvider gives you a single items model.
A model who wraps a collection, gives you a collection of items for a
single component.

On Thursday, May 8, 2014, Patrick Davids patrick.dav...@nubologic.com
wrote:

 Hi all,

 what I often think about, and I cannot really say is; when to use Model
 or DataProvider as data providing object for components they repeat some
 thing?

 Javadoc says, DataProvider are (good) for DataViews.
 Hmm... ok, and they allow easer iterating (first index, count).

 I also can achieve this by using a LoadableDetachableModelList
 combined with a ModelIteratorAdapater.

 Both have detaching logic... both featuring extension, both have a sort
 of load-method (getObject() vs. getData()).

 Sometimes I think, they are so similar to each other... where is the key
 difference?

 Would be cool if some of yours just reply his two cents of daily
 programming experience... so I can get some new point of views.

 When do you use DataProvider or ModelList?
 Did you experienced the same, not to exactly know which one you will use
 for your new page/panel/component?
 And often think about pro and cons using it with RepeatingViews? And
 later on, you see... I could have used both... hmm...

 thanx a lot for feedback and kind regards
 Patrick
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org javascript:;
 For additional commands, e-mail: users-h...@wicket.apache.orgjavascript:;




Re: Question / Best Practise / (List)Model vs. (List)DataProvider

2014-05-16 Thread Sven Meier
IDataProvider is all about efficiency, it provides efficient access to a 
subset of the data.


Perhaps we can make it even more efficient with the recent proposal on 
the @dev list.


Regards
Sven


On 05/08/2014 01:37 PM, Patrick Davids wrote:

Hi all,

what I often think about, and I cannot really say is; when to use Model
or DataProvider as data providing object for components they repeat some
thing?

Javadoc says, DataProvider are (good) for DataViews.
Hmm... ok, and they allow easer iterating (first index, count).

I also can achieve this by using a LoadableDetachableModelList
combined with a ModelIteratorAdapater.

Both have detaching logic... both featuring extension, both have a sort
of load-method (getObject() vs. getData()).

Sometimes I think, they are so similar to each other... where is the key
difference?

Would be cool if some of yours just reply his two cents of daily
programming experience... so I can get some new point of views.

When do you use DataProvider or ModelList?
Did you experienced the same, not to exactly know which one you will use
for your new page/panel/component?
And often think about pro and cons using it with RepeatingViews? And
later on, you see... I could have used both... hmm...

thanx a lot for feedback and kind regards
Patrick
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Question / Best Practise / (List)Model vs. (List)DataProvider

2014-05-16 Thread Patrick Davids
Hi all,

what I often think about, and I cannot really say is; when to use Model 
or DataProvider as data providing object for components they repeat some 
thing?

Javadoc says, DataProvider are (good) for DataViews.
Hmm... ok, and they allow easer iterating (first index, count).

I also can achieve this by using a LoadableDetachableModelList 
combined with a ModelIteratorAdapater.

Both have detaching logic... both featuring extension, both have a sort 
of load-method (getObject() vs. getData()).

Sometimes I think, they are so similar to each other... where is the key 
difference?

Would be cool if some of yours just reply his two cents of daily 
programming experience... so I can get some new point of views.

When do you use DataProvider or ModelList?
Did you experienced the same, not to exactly know which one you will use 
for your new page/panel/component?
And often think about pro and cons using it with RepeatingViews? And 
later on, you see... I could have used both... hmm...

thanx a lot for feedback and kind regards
Patrick
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org