I tried wicket 1.1, with same code fragment, i got RunTimeException:
wicket.WicketRuntimeException: The component(s) below failed to render:
1. [Component id = detailMsg, page = wicket.examples.navtree.ContentPage, path = 1:detailMsg.Label, isVisible = true, isVersioned = true]
at wicket.Page.checkRendering(Page.java:993)
at wicket.Page.doRender(Page.java:257)
at wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:218)
at wicket.RequestCycle.respond(
RequestCycle.java:869)
at wicket.RequestCycle.request(RequestCycle.java:421)
at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:197)
at javax.servlet.http.HttpServlet.service(HttpServlet.java
:697)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
and wicket show me the component tree of the page:
# | Path | Type | Model Object |
---|---|---|---|
1 | _body | wicket.markup.html.BodyOnLoadContainer | |
2 | detailMsg | wicket.markup.html.basic.Label | tree node link was clicked, user object: Node1.1 |
It seems the model of Label detailMsg has been update, but Error occured while redering it.
I cannot find any tips from the exception stack.
I used wicket1.0.2.
In my Application, i want to show a tree as navigator and detail message a=
s
body.It is a parellel layout, left panel is a treeview, right is content
view. What i want is show node name in right panel when i click a tree node=
.
Followed the example(1.0.2) , i used two Border-left and right. In method
nodeLinkClicked i used following code:
protected void nodeLinkClicked(DefaultMutableTreeNode node)
{
super.nodeLinkClicked(node);
Page p =3D this.getPage();
p.replace(new Label("detailMsg","tree node link was clicked, user object: "
+ node.getUserObject()));//NullPointerException
log.info("tree node link was clicked, user object: " + node.getUserObject
());
}
But i cannot replace the content in right border.
Thanks for your advice.