TabbedForm and listener

4 Messages Forum Options Options
Embed this topic
Permalink
Marcelo Grassi Franco Melgaço
TabbedForm and listener
Reply Threaded MoreMore options
Print post
Permalink
I was using click 1.4 and write a page with tabbedPanel.
I need to call a method when the user change the panel(tab).
I used the setTabListener of the tabbedPanel and worked fine.
But with the 1.5-m3 version, this method is deprecated and doesn't work.
I tried the setActionListener and the setListener, but no one work.
What can i do in the 1.5-m3 version?
thanks

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Click-user mailing list
Click-user@...
https://lists.sourceforge.net/lists/listinfo/click-user
sabob
Re: TabbedForm and listener
Reply Threaded MoreMore options
Print post
Permalink
Hi Marcelo,

Marcelo Grassi Franco Melgaço wrote:
> I was using click 1.4 and write a page with tabbedPanel.
> I need to call a method when the user change the panel(tab).
> I used the setTabListener of the tabbedPanel and worked fine.
> But with the 1.5-m3 version, this method is deprecated and doesn't work.
> I tried the setActionListener and the setListener, but no one work.


I can confirm this is not working. There is a bug in TabbedPanel.
Seems TabbedPAnel#onProcess does not register the listeners.

Will have this fixed for RC1.

If you are in dire need of this fix you could try:

MyTabbedPanel extends TabbedPanel {
   public boolean onProcess() {
     super.onProcess();
     registerActionEvent();
     return true;
   }
}

Thanks for your feedback.

kind regards

bob

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Click-user mailing list
Click-user@...
https://lists.sourceforge.net/lists/listinfo/click-user
sabob
Re: TabbedForm and listener
Reply Threaded MoreMore options
Print post
Permalink
Bob Schellink wrote:
> If you are in dire need of this fix you could try:
>
> MyTabbedPanel extends TabbedPanel {
>    public boolean onProcess() {
>      super.onProcess();
>      registerActionEvent();
>      return true;
>    }
> }


Will check in the fix later tonight. Its a bit more involved than the
above since that will trigger the listener even if the tab was not
clicked.

Have also undeprecated setTabListener since that is probably more
intuitive.

bob

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Click-user mailing list
Click-user@...
https://lists.sourceforge.net/lists/listinfo/click-user
Marcelo Grassi Franco Melgaço
Re: TabbedForm and listener
Reply Threaded MoreMore options
Print post
Permalink
In reply to this post by sabob
Thanks man, i will do that.

2008/9/5 Bob Schellink <sabob1@...>
Hi Marcelo,

Marcelo Grassi Franco Melgaço wrote:
> I was using click 1.4 and write a page with tabbedPanel.
> I need to call a method when the user change the panel(tab).
> I used the setTabListener of the tabbedPanel and worked fine.
> But with the 1.5-m3 version, this method is deprecated and doesn't work.
> I tried the setActionListener and the setListener, but no one work.


I can confirm this is not working. There is a bug in TabbedPanel.
Seems TabbedPAnel#onProcess does not register the listeners.

Will have this fixed for RC1.

If you are in dire need of this fix you could try:

MyTabbedPanel extends TabbedPanel {
  public boolean onProcess() {
    super.onProcess();
    registerActionEvent();
    return true;
  }
}

Thanks for your feedback.

kind regards

bob

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Click-user mailing list
Click-user@...
https://lists.sourceforge.net/lists/listinfo/click-user


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Click-user mailing list
Click-user@...
https://lists.sourceforge.net/lists/listinfo/click-user