Re: Is there a way to be notified when a tab in a TabbedPanel is selected?

2011-11-03 Thread armandoxxx
Just a question ... 

what happens with other instances ? are they forgotten (null-ed) ? 

My problem is that I'm trying to put a PDFObject (displays PDF file in a div
in a browser ) panel and JWPlayer (flash video player) into tab panel. So I
have to know if older versions of these panels are destroyed (nulled) when
I switch the tab or whenever i reload my wrapping  panel (meaning panel
containing these panels). 

Kind regards

Armando



Martin Makundi wrote:
 
 Yes, simply every time your panel is instantiated, it means someone
 navigated to the particular tab. You can monitor this also in your
 panel class.
 
 **
 Martin
 
 


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Is-there-a-way-to-be-notified-when-a-tab-in-a-TabbedPanel-is-selected-tp1877249p3986163.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Is there a way to be notified when a tab in a TabbedPanel is selected?

2009-01-29 Thread Erik van Oosten

Hi Zhubin,

Everytime there is a tab switch, method getPanel from the ITab instance 
is called.


Regards,
   Erik.


Zhubin Salehi wrote:

Hi all,

How can I be notified when one of the tabs in a TabbedPanel is selected?
Where is no onSelect() method in ITab interface, is there a way to achieve
this?

Thanks,
Zhubin
  


--
Erik van Oosten
http://day-to-day-stuff.blogspot.com/



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



Re: Is there a way to be notified when a tab in a TabbedPanel is selected?

2009-01-29 Thread Zhubin Salehi

So every time a tab is selected, a new instance of that panel will be
created?


Erik van Oosten wrote:
 
 Hi Zhubin,
 
 Everytime there is a tab switch, method getPanel from the ITab instance 
 is called.
 
 Regards,
 Erik.
 
 
 Zhubin Salehi wrote:
 Hi all,

 How can I be notified when one of the tabs in a TabbedPanel is selected?
 Where is no onSelect() method in ITab interface, is there a way to
 achieve
 this?

 Thanks,
 Zhubin
   
 
 -- 
 Erik van Oosten
 http://day-to-day-stuff.blogspot.com/
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Is-there-a-way-to-be-notified-when-a-tab-in-a-TabbedPanel-is-selected--tp21713724p21728222.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Is there a way to be notified when a tab in a TabbedPanel is selected?

2009-01-29 Thread Martin Makundi
Yes, simply every time your panel is instantiated, it means someone
navigated to the particular tab. You can monitor this also in your
panel class.

**
Martin

2009/1/29 Zhubin Salehi zhooz...@yahoo.com:

 So every time a tab is selected, a new instance of that panel will be
 created?


 Erik van Oosten wrote:

 Hi Zhubin,

 Everytime there is a tab switch, method getPanel from the ITab instance
 is called.

 Regards,
 Erik.


 Zhubin Salehi wrote:
 Hi all,

 How can I be notified when one of the tabs in a TabbedPanel is selected?
 Where is no onSelect() method in ITab interface, is there a way to
 achieve
 this?

 Thanks,
 Zhubin


 --
 Erik van Oosten
 http://day-to-day-stuff.blogspot.com/



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




 --
 View this message in context: 
 http://www.nabble.com/Is-there-a-way-to-be-notified-when-a-tab-in-a-TabbedPanel-is-selected--tp21713724p21728222.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Is there a way to be notified when a tab in a TabbedPanel is selected?

2009-01-29 Thread Erik van Oosten

Yes, unless you use the PanelCachingTab decorator.

   Erik.

Zhubin Salehi wrote:

So every time a tab is selected, a new instance of that panel will be
created?
  


--
Erik van Oosten
http://day-to-day-stuff.blogspot.com/



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



Re: Is there a way to be notified when a tab in a TabbedPanel is selected?

2009-01-29 Thread Zhubin Salehi

So which Panel method is a best to monitor when that panel is selected? I
need to set a model property for each of my tabs.

Also I tried to stop Wicket from instantiating a new Panel every time a tab
is selected, here is the code:

/* advanced search check box */
add(new AjaxCheckBox(advancedSearch, new
PropertyModelBoolean(FindUserAccount.this, advancedSearch)) {

private static final long serialVersionUID = 
-4363834871762525665L;

@Override
protected void onUpdate(AjaxRequestTarget target) {
target.addComponent(findUserAcountForm);
}
});

/* advanced search container */
final WebMarkupContainer advancedSearchContainer;
add(advancedSearchContainer = new
WebMarkupContainer(advancedSearchContainer) {

private static final long serialVersionUID = 
-6418171712342793920L;

@Override
public boolean isVisible() {
return advancedSearch;
}
});

Is that how PanelCachingTab is supposed to be used?

Thanks,
Zhubin

Martin Makundi wrote:
 
 Yes, simply every time your panel is instantiated, it means someone
 navigated to the particular tab. You can monitor this also in your
 panel class.
 
 **
 Martin
 

-- 
View this message in context: 
http://www.nabble.com/Is-there-a-way-to-be-notified-when-a-tab-in-a-TabbedPanel-is-selected--tp21713724p21728481.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Is there a way to be notified when a tab in a TabbedPanel is selected?

2009-01-29 Thread Zhubin Salehi

Sorry wrong code fragment! Here is the right one:

/* 'search by MobiNET ID tab */
tabs.add(new PanelCachingTab(new AbstractTab(new
StringResourceModel(title.byMobinetId,
FindUserAccount.this, null)) {

private static final long serialVersionUID = 
5564837747113048306L;

public Panel getPanel(String panelId) {
return new MobinetTab(panelId);
}
}));

/* 'search by person's details tab */
tabs.add(new PanelCachingTab(new AbstractTab(new
StringResourceModel(title.byPersonDetails,
FindUserAccount.this, null)) {

private static final long serialVersionUID = 
211211104202913141L;

public Panel getPanel(String panelId) {
return new PersonDetailTab(panelId);
}
}));

-- 
View this message in context: 
http://www.nabble.com/Is-there-a-way-to-be-notified-when-a-tab-in-a-TabbedPanel-is-selected--tp21713724p21728517.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Is there a way to be notified when a tab in a TabbedPanel is selected?

2009-01-29 Thread Erik van Oosten

How about this:

tabs.add(new PanelCachingTab(new AbstractTab(new
StringResourceModel(title.byMobinetId,
FindUserAccount.this, null)) {

private static final long serialVersionUID = 
5564837747113048306L;

public Panel getPanel(String panelId) {
return new MobinetTab(panelId);
}
}) {

   @Override
   public Panel getPanel(final String panelId) {

   // ... DO SOMETHING UPON TAB SELECTION ...

   return super.getPanel(panelId);
   }

   });

This override getPanel from PanelCachingTab. But you could also 
implement your own ITab.


Regards,
   Erik.


Zhubin Salehi wrote:

Sorry wrong code fragment! Here is the right one:

/* 'search by MobiNET ID tab */
tabs.add(new PanelCachingTab(new AbstractTab(new
StringResourceModel(title.byMobinetId,
FindUserAccount.this, null)) {

private static final long serialVersionUID = 
5564837747113048306L;

public Panel getPanel(String panelId) {
return new MobinetTab(panelId);
}
}));

/* 'search by person's details tab */
tabs.add(new PanelCachingTab(new AbstractTab(new
StringResourceModel(title.byPersonDetails,
FindUserAccount.this, null)) {

private static final long serialVersionUID = 
211211104202913141L;

public Panel getPanel(String panelId) {
return new PersonDetailTab(panelId);
}
}));

  


--

Erik van Oosten
http://day-to-day-stuff.blogspot.com/



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



Re: Is there a way to be notified when a tab in a TabbedPanel is selected?

2009-01-29 Thread Zhubin Salehi

This code looks cool, thanks a lot!


Erik van Oosten wrote:
 
 How about this:
 
   tabs.add(new PanelCachingTab(new AbstractTab(new
 StringResourceModel(title.byMobinetId,
   FindUserAccount.this, null)) {
 
   private static final long serialVersionUID = 
 5564837747113048306L;
 
   public Panel getPanel(String panelId) {
   return new MobinetTab(panelId);
   }
   }) {
 
 @Override
 public Panel getPanel(final String panelId) {
 
 // ... DO SOMETHING UPON TAB SELECTION ...
 
 return super.getPanel(panelId);
 }
 
 });
 
 This override getPanel from PanelCachingTab. But you could also 
 implement your own ITab.
 
 Regards,
 Erik.
 

-- 
View this message in context: 
http://www.nabble.com/Is-there-a-way-to-be-notified-when-a-tab-in-a-TabbedPanel-is-selected--tp21713724p21728759.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Is there a way to be notified when a tab in a TabbedPanel is selected?

2009-01-28 Thread Zhubin Salehi

Hi all,

How can I be notified when one of the tabs in a TabbedPanel is selected?
Where is no onSelect() method in ITab interface, is there a way to achieve
this?

Thanks,
Zhubin
-- 
View this message in context: 
http://www.nabble.com/Is-there-a-way-to-be-notified-when-a-tab-in-a-TabbedPanel-is-selected--tp21713724p21713724.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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