Yes, the link is a part of the listview.
ListView :
ListView<AstPlans> breadList = new ListView<AstPlans>("breadList",loadModel)
{
private static final long serialVersionUID = 1L;
@Override
protected void populateItem(final ListItem<AstPlans>
item) {
final Link<AstPlans> breadLink = new
Link<AstPlans>("breadLink",
item.getModel()) {
private static final long
serialVersionUID = 1L;
@Override
public void onClick() {
stack.add(item.getModelObject().getAssetCod());
}
};
breadLink.add(new
Label("breadLinkLabel",item.getModelObject().getAssetCode()+"-"+item.getModelObject().getName()));
item.add(breadLink);
}
LoadableDetachable Model :
LoadableDetachableModel<List<AstPlans>> loadModel = new
LoadableDetachableModel<List<AstPlans>>() {
private static final long serialVersionUID = 1L;
@Override
protected List<AstPlans> load() {
List<AstPlans> list = service.findAsset(new
QueryOption(Filter.like("assetCode", stack.get(stack.size() - 1) + "___")));
return list;
}
};
I update stack whick is a list. but the stack is updated after load
method is invoke. So load is give to me a list queried by oll stack. List
also old. I need stack is update first, then load() invoke or any other way
to succeed on this.
How can I over come this.
-----
www.mehmetatas.info
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/LoadableDetachableModel-load-Listview-onclick-tp4042769p4043238.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]