I've made a quick start files for the problem. The problem isIf using a ListView to display the tree node value, after I collapse the node, I can never expand it again, and the ListItem becomes null. No problem with a Label.
Could you give me some directions ? Thanks. Sincerely, Isaac Matej Knopp wrote:
hi, this really is weird. Can you post a quick start project that demonstrates the behavior? -Matej On 3/23/07, Isaac Weng <[EMAIL PROTECTED]> wrote:Hi, This is my first time asking questions here. Hope I can make my question clear. I'v tried to extend the ajax tree in the wicket extension. The only modification I made is the output value, which is a customized panel instead of a label. Following are my html and source. MyTree.html : <span wicket:id="indent"></span><a wicket:id="link"><span wicket:id="image"/></a> <a wicket:id="nodeLink"><span class="icon" wicket:id="icon"></span><span wicket:id="myPanel" /> To simplify the problem, I strip most markups of MyPanel.html to what I think causing the problem. MyPanel.html : <span wicket:id="outputList"><span wicket:id="outputName">name</span></span> MyPanel.java : public MyPanel extends Panel { public MyPanel(String id) { super(id); ArrayList<String> list = new ArrayList<String>(); list.add("name1"); add(new ListView("outputList", list) { public void populateItem(final ListItem item) { final String name = (String) item.getModelObject(); item.add(new Label("outputName", name)); } }); } } The problem is while I click the junction link, ListView.renderItem() throws a NullPointerException. After some digging, I found that the ListItem is null. Then I use getList(), and it successfully return the list I passed in and the values in that list are also correct, however the ListItem is null which I don't know why. Thanks for reading my question. I will appreciate any suggestions. Isaac
tree-quickstart.IamAzip
Description: Binary data
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user