Re: Issue with TabLayoutPanel in 2.5.0 RC1 & RC2
Looks like it's a regression in 2.5. See http://code.google.com/p/google-web-toolkit/issues/detail?id=7740 On Tuesday, October 16, 2012 6:04:43 PM UTC+2, manoj kumar wrote: > > We have code that uses TabLayoutPanel in UIBinders and selects the tab > programatically. This code was working fine in 2.3, but we are getting > Exceptions since 2.5.0 RC1 (& RC2). > Has anybody seen this before or solved this. > > > Caused by: java.lang.AssertionError: Index out of bounds > at > com.google.gwt.user.client.ui.TabLayoutPanel.checkIndex(TabLayoutPanel.java:720) > at > com.google.gwt.user.client.ui.TabLayoutPanel.selectTab(TabLayoutPanel.java:597) > at > com.google.gwt.user.client.ui.TabLayoutPanel.selectTab(TabLayoutPanel.java:587) > > The following is the code. > UIBinder.ui.xml: > > > Tab1 > Tab1 Contents > > > Tab2 > Tab2 Contents > > > Following is the java code in the widget. > > public class TestPage { > @UiField (provided = true) > protected TabLayoutPanel tabPanel_; > >public TestPage() { > > tabPanel_ = new TabLayoutPanel(); > } > > @Override > public Widget render(Map parameters) { > tabPanel_.selectTab(0); > > } > > } > > > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/WIDLhWiCzM4J. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Issue with TabLayoutPanel in 2.5.0 RC1 & RC2
Hopefully you have called uiBinder.createAndBindUi(this) after instantiating your tabPanel_? If not it won't contain any tabs. How/when do you call your render() method? Maybe you have refactored something while migrating to GWT 2.5? -- J. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/Wl8FhyhJr0QJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Issue with TabLayoutPanel in 2.5.0 RC1 & RC2
I may be one the wrong track here, but why are you providing "tabPanel_"? The error is because the the tab does not exist. I did not try to run your code but maybe providing the TabLayoutPanel is the root of the problem. If you aren't doing anything special to an Object, there is no need to provide the Object. If you add the "-gen foldername" option to the compiler you can look at the compiled java code and see what the actual problem is. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/2l_-edx1EDsJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Issue with TabLayoutPanel in 2.5.0 RC1 & RC2
We have code that uses TabLayoutPanel in UIBinders and selects the tab programatically. This code was working fine in 2.3, but we are getting Exceptions since 2.5.0 RC1 (& RC2). Has anybody seen this before or solved this. Caused by: java.lang.AssertionError: Index out of bounds at com.google.gwt.user.client.ui.TabLayoutPanel.checkIndex(TabLayoutPanel.java:720) at com.google.gwt.user.client.ui.TabLayoutPanel.selectTab(TabLayoutPanel.java:597) at com.google.gwt.user.client.ui.TabLayoutPanel.selectTab(TabLayoutPanel.java:587) The following is the code. UIBinder.ui.xml: Tab1 Tab1 Contents Tab2 Tab2 Contents Following is the java code in the widget. public class TestPage { @UiField (provided = true) protected TabLayoutPanel tabPanel_; public TestPage() { tabPanel_ = new TabLayoutPanel(); } @Override public Widget render(Map parameters) { tabPanel_.selectTab(0); } } -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/57a52tcPIaAJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.