can anybody help me? thanks.

On Wed, Aug 19, 2009 at 11:15 PM, Haulyn R. Jason <[email protected]>wrote:

> Hi, all
> I refactor my pages from inheritance to panel swapping with a tree for
> navigation. But I can not make the tree work.
>
> I add some links like this:
>         add(new Link("settingPageLink") {
>             @Override
>             public void onClick() {
>                 currentPanel.replaceWith(settingPanel);
>                 currentPanel = settingPanel;
>             }
>         });
> these links works well, but the following code does not work:
>      Tree tree = new Tree("tree", treeModel) {
>             @Override
>             protected void onNodeLinkClicked(AjaxRequestTarget target,
> TreeNode node) {
>                 DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode)
> node;
>                 NavigationTreeNode navigationTreeNode =
> (NavigationTreeNode) treeNode.getUserObject();
>                 if (navigationTreeNode.isURL) {
>                     Panel clickedPanel =
> navigationTreeNode.getClickedPanel();
>                     currentPanel.replaceWith(clickedPanel);
>                     currentPanel = clickedPanel;
>                 } else {
>                     super.onNodeLinkClicked(target, node);
>                 }
>             }
>         };
>
> I do not know how to make this tree work. Do I  lose something?
>
> --
> ------------------
> Enjoy. Thanks!
>
> Haulyn Microproduction
>
> Mobile: +086-15864011231
> email: [email protected],
>          [email protected]
> website: http://haulynjason.net
> gtalk: [email protected]
> yahoo: [email protected]
> msn: [email protected]
> skype: saharabear
> QQ: 378606292
>
> Haulyn Jason
>
>
>


-- 
------------------
Enjoy. Thanks!

Haulyn Microproduction

Mobile: +086-15864011231
email: [email protected],
         [email protected]
website: http://haulynjason.net
gtalk: [email protected]
yahoo: [email protected]
msn: [email protected]
skype: saharabear
QQ: 378606292

Haulyn Jason

Reply via email to