Dan Syrstad-2 wrote:
>
> Your page code is almost exactly the same as mine. However, your HTML does
> not look correct - it has no tag with a wicket:id in it. So maybe your
> component never rendered.
>
No, your mail client has stripped the code. Let me show you the code again:
<html>
<body>
<span wicket:id=\"listView\"><span
wicket:id=\"labelWithDetachableModel\">test</span></span>
</body>
</html>
public class Test extends WebPage {
public Test() {
ListView listView = new ListView("listView", Arrays
.asList(new String[] { "a", "b" })) {
protected void populateItem(final ListItem item) {
item.add(new Label("labelWithDetachableModel",
new
LoadableDetachableModel() {
protected Object load() {
return item.getModelObject();
}
}));
}
};
add(listView);
}
}
Run the test case and it will pass (although for the wrong reason).
--
View this message in context:
http://www.nabble.com/Page.detachModels%28%29-not-working-like-it-used-to-tf4549247.html#a13063392
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]