[Logo] OLD FORUM - Use new one: https://www.CaptainCasa.online/forum
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Withcloseicon event: Which tab is it?  XML
Forum Index -> Development
Author Message
levy

Power User

Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline

Hi,

I use the withcloseicon attribute for a tabbedpane that is created dynamically. The actionListener is the same for every tabbedpanetab. On the BaseActionEventTabClose event, I must know what pane is going to be deleted. The first try was to check the value attribute of tabbedpane, but this is not the right way, because the pane to be deleted is not necessarily focussed.

One possibility is that the BaseActionEventTabClose event would give the selected tab index as a parameter. Could you provide that?

Regards, Daniel
[WWW]
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5555
Offline

Hi Daniel,

you need to assign an individual action listener to each close icon. Some code like:

Code:
 class XYZ
 {
     class TabInvoker
     {
         public void onAction(ActionEvent event)
         {
             ...
         }
     }
  
     List<TabInvoker> m_tabInvokers = new ArrayList<TabInvoker>();
     public List... getTabInvokers() { return m_tabInvokers; }
 
 }
 


Now yuo can assign:
#{d.XYZ.tabInvokers[0].onInvoke}
#{d.XYZ.tabInvokers[1].onInvoke}

etc.

Regards, Björn

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team