File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes GWT and the fly likes TabLayoutPanel.selectedTab error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "TabLayoutPanel.selectedTab error" Watch "TabLayoutPanel.selectedTab error" New topic

TabLayoutPanel.selectedTab error

peter tong
Ranch Hand

Joined: Mar 15, 2008
Posts: 245
there is a TablayoutPanel tabLayoutPanel, and FocusPanel SSearchDetailResult

there is a button in the first tab of tabLayoutPanel and when press that button, I want the focuspanel tab is selected, so I write

the result is the sSearchDetailResult can be selected, but there is error in eclipse development tab as follow:

JavascriptException: (Error): Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus.

what is the problem come from?!!
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10836

Try removing the call to setVisible. I suspect that is causing the conflict.

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
peter tong
Ranch Hand

Joined: Mar 15, 2008
Posts: 245
finally I create a ScheduledCommand for tayLayoutPanel.selectTab(1);

Although in java,

the sSearchDetailResult should already be created before selectTab is run, but after compile to javascript, seems not the case (just I guess), after I use ScheduledCommand, the problem is solved.
I agree. Here's the link:
subject: TabLayoutPanel.selectedTab error
It's not a secret anymore!