I solved it.

new PropertyTreeColumn(new ColumnLocation(Alignment.MIDDLE, 8, Unit.PROPORTIONAL),
                        "", "userObject.name") {
                    @Override
                    public IRenderable newCell(TreeNode node, int level)
                    {
if (getTreeTable().getTreeState().isNodeSelected(node)) { File f = new PropertyModel<File>(node, "userObject.file").getObject(); ResourceStreamRequestTarget res = new ResourceStreamRequestTarget(
                                new FileResourceStream(f), f.getName());
                            getRequestCycle().setRequestTarget(res);
                            return null;
                        } else {
                            return super.newCell(node, level);
                        }
                    }
                }

and

TreeTable tree = new TreeTable("treeTable", createTreeModel(), columns);
tree.setLinkType(TreeTable.LinkType.REGULAR);

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to