Re: TabbedPanel making AJAX?

2008-01-04 Thread Igor Vaynberg
why exactly isnt ajaxtabbedpanel the way to go?

-igor

On Jan 4, 2008 7:48 AM, Beyonder Unknown [EMAIL PROTECTED] wrote:

 Hi Guys,

 I was wondering if there's a way to implement TabbedPanel that when you click 
 the tab, it will do an ajax call to the backend, and update the body of the 
 tab. I looked at AjaxTabbedPanel, but it seems like its not the way to go.

 Any help will be gladly appreciated.

 Thanks,
 Wen Tong

 --
 The only constant in life is change.




   
 
 Be a better friend, newshound, and
 know-it-all with Yahoo! Mobile.  Try it now.  
 http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


 -
 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]



Re: TabbedPanel making AJAX?

2008-01-04 Thread Igor Vaynberg
this has nothing to do with ajax. you should not store the hibernate
object itself in the model, you should use a model that can load the
object during next request - that way it is attached to the current
session and doesnt have lazy loading problems. see
LoadableDetachableModel, and maybe read up on detachable models.

-igor

On Jan 4, 2008 8:48 AM, Beyonder Unknown [EMAIL PROTECTED] wrote:

 Hi Igor,

 How are you? The AbstractTab  returns a Panel that  calls a backend object 
 using hibernate Lazy Loading.  (We have a session filter that closes the 
 hibernate session after the page is loaded ). So when you click the tab, it 
 throws a  Lazy Loading exception, because the session is already close.

 When I tried to use AjaxTabbedPanel and  implement  onAjaxUpdate, it already 
 throws the exception prior to reaching the function.

 Do I have to override and customize some method in AjaxTabbedPanel to achieve 
 this? Like finding the title link and change it to ajax link? I'm looking for 
 a solution that when you click the tab, it does an ajax call in the backend 
 and update the tab content. So I thought I'd email this problem to the group, 
 thinking somebody have encountered this problem before.

 thanks,
 Wen Tong

 --
 The only constant in life is change.

 - Original Message 
 From: Igor Vaynberg [EMAIL PROTECTED]
 To: users@wicket.apache.org
 Sent: Friday, January 4, 2008 8:25:26 AM
 Subject: Re: TabbedPanel making AJAX?


 why exactly isnt ajaxtabbedpanel the way to go?

 -igor

 On Jan 4, 2008 7:48 AM, Beyonder Unknown [EMAIL PROTECTED] wrote:
 
  Hi Guys,
 
  I was wondering if there's a way to implement TabbedPanel that when
  you click the tab, it will do an ajax call to the backend, and update
  the body of the tab. I looked at AjaxTabbedPanel, but it seems like its
  not the way to go.
 
  Any help will be gladly appreciated.
 
  Thanks,
  Wen Tong
 
  --
  The only constant in life is change.
 
 
 
 
 
  
 
  Be a better friend, newshound, and
  know-it-all with Yahoo! Mobile.  Try it now.
   http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
 
 
  -
  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]






   
 
 Never miss a thing.  Make Yahoo your home page.
 http://www.yahoo.com/r/hs


 -
 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]



Re: TabbedPanel making AJAX?

2008-01-04 Thread Beyonder Unknown

Hi Igor,

How are you? The AbstractTab  returns a Panel that  calls a backend object 
using hibernate Lazy Loading.  (We have a session filter that closes the 
hibernate session after the page is loaded ). So when you click the tab, it 
throws a  Lazy Loading exception, because the session is already close.

When I tried to use AjaxTabbedPanel and  implement  onAjaxUpdate, it already 
throws the exception prior to reaching the function.

Do I have to override and customize some method in AjaxTabbedPanel to achieve 
this? Like finding the title link and change it to ajax link? I'm looking for a 
solution that when you click the tab, it does an ajax call in the backend and 
update the tab content. So I thought I'd email this problem to the group, 
thinking somebody have encountered this problem before.

thanks, 
Wen Tong
 
--
The only constant in life is change.

- Original Message 
From: Igor Vaynberg [EMAIL PROTECTED]
To: users@wicket.apache.org
Sent: Friday, January 4, 2008 8:25:26 AM
Subject: Re: TabbedPanel making AJAX?


why exactly isnt ajaxtabbedpanel the way to go?

-igor

On Jan 4, 2008 7:48 AM, Beyonder Unknown [EMAIL PROTECTED] wrote:

 Hi Guys,

 I was wondering if there's a way to implement TabbedPanel that when
 you click the tab, it will do an ajax call to the backend, and update
 the body of the tab. I looked at AjaxTabbedPanel, but it seems like its
 not the way to go.

 Any help will be gladly appreciated.

 Thanks,
 Wen Tong

 --
 The only constant in life is change.




  
 

 Be a better friend, newshound, and
 know-it-all with Yahoo! Mobile.  Try it now.
  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


 -
 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]






  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel making AJAX?

2008-01-04 Thread Beyonder Unknown

Thanks Igor,

Let me try that.

Wen T.
 
--
The only constant in life is change.

- Original Message 
From: Igor Vaynberg [EMAIL PROTECTED]
To: users@wicket.apache.org
Sent: Friday, January 4, 2008 8:53:36 AM
Subject: Re: TabbedPanel making AJAX?


this has nothing to do with ajax. you should not store the hibernate
object itself in the model, you should use a model that can load the
object during next request - that way it is attached to the current
session and doesnt have lazy loading problems. see
LoadableDetachableModel, and maybe read up on detachable models.

-igor

On Jan 4, 2008 8:48 AM, Beyonder Unknown [EMAIL PROTECTED] wrote:

 Hi Igor,

 How are you? The AbstractTab  returns a Panel that  calls a backend
 object using hibernate Lazy Loading.  (We have a session filter that
 closes the hibernate session after the page is loaded ). So when you click
 the tab, it throws a  Lazy Loading exception, because the session is
 already close.

 When I tried to use AjaxTabbedPanel and  implement  onAjaxUpdate, it
 already throws the exception prior to reaching the function.

 Do I have to override and customize some method in AjaxTabbedPanel to
 achieve this? Like finding the title link and change it to ajax link?
 I'm looking for a solution that when you click the tab, it does an ajax
 call in the backend and update the tab content. So I thought I'd email
 this problem to the group, thinking somebody have encountered this
 problem before.

 thanks,
 Wen Tong

 --
 The only constant in life is change.

 - Original Message 
 From: Igor Vaynberg [EMAIL PROTECTED]
 To: users@wicket.apache.org
 Sent: Friday, January 4, 2008 8:25:26 AM
 Subject: Re: TabbedPanel making AJAX?


 why exactly isnt ajaxtabbedpanel the way to go?

 -igor

 On Jan 4, 2008 7:48 AM, Beyonder Unknown [EMAIL PROTECTED]
 wrote:
 
  Hi Guys,
 
  I was wondering if there's a way to implement TabbedPanel that when
  you click the tab, it will do an ajax call to the backend, and
 update
  the body of the tab. I looked at AjaxTabbedPanel, but it seems like
 its
  not the way to go.
 
  Any help will be gladly appreciated.
 
  Thanks,
  Wen Tong
 
  --
  The only constant in life is change.
 
 
 
 
 

  

  Be a better friend, newshound, and
  know-it-all with Yahoo! Mobile.  Try it now.
   http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
 
 
 
 -
  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]






  
 

 Never miss a thing.  Make Yahoo your home page.
 http://www.yahoo.com/r/hs


 -
 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]






  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



TabbedPanel making AJAX?

2008-01-04 Thread Beyonder Unknown

Hi Guys,

I was wondering if there's a way to implement TabbedPanel that when you click 
the tab, it will do an ajax call to the backend, and update the body of the 
tab. I looked at AjaxTabbedPanel, but it seems like its not the way to go.

Any help will be gladly appreciated.

Thanks,
Wen Tong
 
--
The only constant in life is change.




  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AW: TabbedPanel making AJAX?

2008-01-04 Thread Beyonder Unknown
Hi Stefan, 

I already tried this, but onAjaxUpdate() is not even executed. Anyways, I have 
to take  look and see if theres another way to implement hibernate with wicket.

Thank you very much!

Best,
Wen Tong
 
--
The only constant in life is change.

- Original Message 
From: Stefan Lindner [EMAIL PROTECTED]
To: users@wicket.apache.org
Sent: Friday, January 4, 2008 8:45:33 AM
Subject: AW: TabbedPanel making AJAX?


Wen Tong,

I think the following code does what you want:

new AjaxTabbedPanel(..) {
private static final long serialVersionUID = 1L;
@Override
protected void onAjaxUpdate(AjaxRequestTarget target) {
System.out.println(OnAjaxUpdate aufgerufen);
if (target != null) {
int selectedTab = getSelectedTab(); 
// Do whatever you want with the now selected tab und
 use the target variable for AJAX-actions

Stefan

-Ursprüngliche Nachricht-
Von: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 4. Januar 2008 17:25
An: users@wicket.apache.org
Betreff: Re: TabbedPanel making AJAX?

why exactly isnt ajaxtabbedpanel the way to go?

-igor

On Jan 4, 2008 7:48 AM, Beyonder Unknown [EMAIL PROTECTED] wrote:

 Hi Guys,

 I was wondering if there's a way to implement TabbedPanel that when
 you click the tab, it will do an ajax call to the backend, and update
 the body of the tab. I looked at AjaxTabbedPanel, but it seems like its
 not the way to go.

 Any help will be gladly appreciated.

 Thanks,
 Wen Tong

 --
 The only constant in life is change.




   

 __
 __
 Be a better friend, newshound, and
 know-it-all with Yahoo! Mobile.  Try it now.  
 http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


 -
 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]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: TabbedPanel making AJAX?

2008-01-04 Thread Stefan Lindner
Wen Tong,

I think the following code does what you want:

new AjaxTabbedPanel(..) {
private static final long serialVersionUID = 1L;
@Override
protected void onAjaxUpdate(AjaxRequestTarget target) {
System.out.println(OnAjaxUpdate aufgerufen);
if (target != null) {
int selectedTab = getSelectedTab(); 
// Do whatever you want with the now selected 
tab und use the target variable for AJAX-actions

Stefan

-Ursprüngliche Nachricht-
Von: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 4. Januar 2008 17:25
An: users@wicket.apache.org
Betreff: Re: TabbedPanel making AJAX?

why exactly isnt ajaxtabbedpanel the way to go?

-igor

On Jan 4, 2008 7:48 AM, Beyonder Unknown [EMAIL PROTECTED] wrote:

 Hi Guys,

 I was wondering if there's a way to implement TabbedPanel that when you click 
 the tab, it will do an ajax call to the backend, and update the body of the 
 tab. I looked at AjaxTabbedPanel, but it seems like its not the way to go.

 Any help will be gladly appreciated.

 Thanks,
 Wen Tong

 --
 The only constant in life is change.




   
 __
 __
 Be a better friend, newshound, and
 know-it-all with Yahoo! Mobile.  Try it now.  
 http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


 -
 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]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]