How large are the size of your list? Generally you use raw string values
instead of detachablemodels..'
I'd suggest doing it another way, by using a compoundmodel:
protected void populateItem(Item item) {
final CarPart carPart = (CarPart) item.getModelObject();
item.setModelObject(new CompoundModel(carPart));
item.add(price = new Label(PRICE));
item.add(publishDate = new Label(PUBLISHDATE));
etc...
Java Programmer wrote:
On Wed, Apr 2, 2008 at 11:38 AM, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
Are you really sure that your detachablemodels are being used all over?
We create it in CarPartDataProvider from my first post, next we create
DataView based on this provider we implement populate method as:
@Override
protected void populateItem(Item item) {
final CarPart carPart = (CarPart) item.getModelObject();
if (carPart.getCarModel() != null) {
item.add(carModel = new Label(CARMODEL,
carPart.getCarModel().getModelName()));
detachable model not used
} else {
item.add(carModel = new Label(CARMODEL,
getString(ADVERT_LIST_NOMODEL_KEY)));
detachable model not used
}
item.add(price = new Label(PRICE,
carPart.getPrice().toString()));
detachable model not used
item.add(publishDate = new Label(PUBLISHDATE,
carPart.getPublishDate().toString()));
detachable model not used
....
}
Is this the correct way to obtain object from provider ->
item.getModelObject(); is it use LoadableDetachableModel from
provider?
We do not ask for CarParts objects in other places, only these 3
classes (provider, model and webpage view as data view), but still see
large CarPart objects in session.
Any idea?
Best regards,
Adr
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
-Wicket for love
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]