Yes Igor,

I am using the Ajax. Here is my partial code. Please suggest me the possible
misses - Raj


protected void onNodeLinkClicked(AjaxRequestTarget target, TreeNode node)
...
        Panel panelOnClick = new DetailTabbedPanel("detailPanel", defNode);
        panelOnClick.setOutputMarkupId(true);
        this.detailPanel.replaceWith(panelOnClick);
        this.detailPanel = panelOnClick;
        target.addComponent(panelOnClick);
....

}


---------------------
public class DetailTabbedPanel extends Panel {


        private  JMXMutableTreeNode nodeDef;
        private AjaxTabbedPanel ajaxTabbedPanel;

        
    public DetailTabbedPanel(String id, JMXMutableTreeNode nodeDef) {
        super(id);   
        this.nodeDef = nodeDef;
        getTabbedPanel("detailTabbedPanel");
        }
    
    public void getTabbedPanel(String tabbedId) {
    
                List <ITab> tabs=new ArrayList<ITab>();
                
/*          tabs.add(new AbstractTab(new StringResourceModel("tab.conprops",
DetailTabbedPanel.this, null)){
                **//**
                         * 
                         *//*
                        private static final long serialVersionUID = 1L;

                        public Panel getPanel(String panelId){
        
                                if(nodeDef.getUserObject() instanceof 
ObjectInstanceNodeInfo){
                                        return new 
SMBeanTabConnectionPanel(panelId, nodeDef);
                                } else {
                                        return new 
SMTabConnectionPanel(panelId, nodeDef);
                                }
                        //return new EmptyPanel(panelId);
                }
            });*/
                
            tabs.add(new PanelCachingTab(new AbstractTab(new
StringResourceModel("tab.smprops", DetailTabbedPanel.this, null)){
                /**
                         * 
                         */
                        private static final long serialVersionUID = 1L;

                        public Panel getPanel(String panelId)
                {
                                SMTabSMPanel panel1 = new SMTabSMPanel(panelId, 
nodeDef);
                                panel1.setOutputMarkupId(true);
                        return panel1; 
                                                        
                }
            }));
            
            tabs.add(new PanelCachingTab(new AbstractTab(new
StringResourceModel("tab.mobiprops", DetailTabbedPanel.this, null)){
                /**
                         * 
                         */
                        private static final long serialVersionUID = 1L;

                        public Panel getPanel(String panelId)
                {
                                SMTabMobiPanel panel2 = new 
SMTabMobiPanel(panelId, nodeDef);
                                panel2.setOutputMarkupId(true);
                        return panel2; 
                                                        
                }
            }));
            
            
            tabs.add(new PanelCachingTab(new AbstractTab(new
StringResourceModel("tab.vcprops", DetailTabbedPanel.this, null)){
                /**
                        * 
                        */
                        private static final long serialVersionUID = 1L;

                        public Panel getPanel(String panelId)
                {
                                SMTabVCPanel panel3 = new SMTabVCPanel(panelId, 
nodeDef);
                                panel3.setOutputMarkupId(true);
                        return panel3; 
                                                        
                }
            }));

            tabs.add(new PanelCachingTab(new AbstractTab(new
StringResourceModel("tab.poolprops", DetailTabbedPanel.this, null)) {
                /**
                         * 
                         */
                        private static final long serialVersionUID = 1L;

                        public Panel getPanel(String panelId) 
                { 
                                SMTabPoolPanel panel4 = new 
SMTabPoolPanel(panelId, nodeDef);
                                panel4.setOutputMarkupId(true);
                        return panel4;  
                }
            }));
            
            tabs.add(new PanelCachingTab(new AbstractTab(new
StringResourceModel("tab.nicprops", DetailTabbedPanel.this, null)) {
                /**
                         * 
                         */
                        private static final long serialVersionUID = 1L;

                        public Panel getPanel(String panelId) { 
                                
                                SMTabNicPanel panel5 = new 
SMTabNicPanel(panelId, nodeDef);
                                panel5.setOutputMarkupId(true);
                        return panel5;  
                        }
            }));
            
            ajaxTabbedPanel = new AjaxTabbedPanel(tabbedId, tabs);
            ajaxTabbedPanel.setOutputMarkupId(true);
            add(ajaxTabbedPanel);
    
    }
  
}

---------------------



igor.vaynberg wrote:
> 
> are you using ajax? cause this sounds very strange.
> 
> -igor
> 
> On Mon, Jul 27, 2009 at 7:02 AM, Raj Kaushik<[email protected]>
> wrote:
>> I am using a wicket tree component in the left column of a table and a
>> panel (here in details are replaced as you select the nodes of the tree)
>> in the right column.
>>
>> One of the displayed panels is the TabbedPanel. In one TabPanel, I have a
>> DropDownChoice box that makes a Form visible on selecting a choice.
>>
>> The problem arises when you select another node of the tree; the Right
>> hand side panel is replaced by the desired panel but some components of
>> the TabPanel (of the previously selected node) remain visible down under,
>> like DropDownChoice box and Form. The undesired components belong to the
>> last selected tab of the TabbedPanel
>>
>> How can I ensure that no components from the previous selected node
>> remain visible pertaining to the last selected Tab of the TabbedPanel.
>>
>> Any suggestions will be highly appreciated.
>>
>> Raj Kaushik
>> [email protected]
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Tree-and-TabbedPanel-components-tp24681775p24704874.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to