ok... maybe i m new to wicket. Some of the example i cant really get what it
means. Anyway, for temporary, i had solved my problem (think is not so
practical :p) . hard code for the node link..


protected void onNodeLinkClicked(AjaxRequestTarget ajaxRequestTarget,
TreeNode node)
                {
                        treeNode = (DefaultMutableTreeNode)node;
                        String treeNodeIndex = 
tree.getNodeComponent(node).getId();
                     System.out.println(" treeNodeIndex = "+treeNodeIndex);
                        if(buildTreeList.size()>0){                             
                                // tree- root
                                
if(tree.getNodeComponent(node).getId().equals("0")){
                                        ReportsPortalPage page = new 
ReportsPortalPage();
                                        setResponsePage(page);
                                }
                                // request module
                                else if( 
tree.getNodeComponent(node).getId().equals("1")){
                                        RequestReportsPortalPage page = new
RequestReportsPortalPage();
                                        setResponsePage(page);
                                }
                                //hardware module
                                else if( 
tree.getNodeComponent(node).getId().equals("5")){
                                        HardwareReportsPortalPage page = new
HardwareReportsPortalPage();
                                        setResponsePage(page);
                                }                               
                                //software module
                                else if( 
tree.getNodeComponent(node).getId().equals("9")){
                                        SoftwareReportsPortalPage page = new
SoftwareReportsPortalPage();
                                        setResponsePage(page);
                                }
                        
                                //admin module 
                                else if( 
tree.getNodeComponent(node).getId().equals("13")){
                                        AdminReportsPortalPage page = new 
AdminReportsPortalPage();
                                        setResponsePage(page);
                                }
                                
                                
                        }
             }

At the moment, it works. But in future , i will study and amend it. Thanks
for everybody :)


Here, i got another question... is there any place to enlarge the tree
border size ? Caused by some of the node link name is long (eg: Workstation
Network Card Details Report (PDF) ) , when the tree was expand, i cant see
the whole name ...

thanks  


Matej Knopp-2 wrote:
> 
> I believe, that what you want, is not to set response page, but rather
> to switch panel components. At least that sounds much more reasonable
> to me.
> 
> -Matej
> 
> On 7/4/07, kenixwong <[EMAIL PROTECTED]> wrote:
>>
>> the reason i using the tree is my menu will be cover a lot of reports ( i
>> m
>> develop the report module). So if using the tree style, the interface
>> will
>> be look more nicer and structure. Plus the dynamic feel to the user :p
>> (more
>> attractive). is that the wicket - tree is hard to maintain? Actually i
>> had
>> build the tree, sub tree and report name. All i listed in array and then
>> called up the array to execute became a tree.
>>
>> Anyway, i found that the wicket example did not show the use of the node
>> link. Any place can help ? As i went through this forum but still cant
>> get
>> any idea to solve it .. :( how ar??
>>
>>
>>
>> Eelco Hillenius wrote:
>> >
>> >> sorry for understood.. i m not just play around. i wish to build a new
>> >> module for my current project. And i wish to manage all the menus in a
>> >> tree
>> >> style outlook. So, can i get some guide frou u , Eelco ..
>> >
>> > If you are looking for menus, why not use something like this:
>> > http://developer.yahoo.com/yui/menu/? That will be much easier to set
>> > up than bending the Tree component into something it is not meant for.
>> >
>> > Eelco
>> >
>> >
>> -------------------------------------------------------------------------
>> > This SF.net email is sponsored by DB2 Express
>> > Download DB2 Express C - the FREE version of DB2 express and take
>> > control of your XML. No limits. Just data. Click to get it now.
>> > http://sourceforge.net/powerbar/db2/
>> > _______________________________________________
>> > Wicket-user mailing list
>> > Wicket-user@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Tree---override-onNodeLinkClicked%28...%29--tf4010264.html#a11426246
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> _______________________________________________
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Tree---override-onNodeLinkClicked%28...%29--tf4010264.html#a11458616
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to