The below code worked for me. But I see only bland display. Need to
set good stylesheet to make it look good. Still trying will let you
know if I succeed.
RootPanel rootPanel = RootPanel.get();
TabPanel tp = new TabPanel();
tp.add(new HTML("ONE")," Tab-1 ");
tp.add(new HTML("TWO")," Tab-2 ");
tp.add(new HTML("THREE")," Tab-3 ");
tp.selectTab(0); //default selection of the first tab
RootPanel.get().add(tp);
On Aug 6, 4:39 pm, Charan <[EMAIL PROTECTED]> wrote:
> Hi
>
> i have tabPanel in my class
>
> tabPanel = new TabPanel();
> tabPanel.add(cptTab);
>
> can i know why this is generating exception since i have provision of
> using normal add(widget) exists in TabPanel class.
>
> this is giving generating the following Exception stackTrace:
>
> [ERROR] Uncaught exception escaped
> java.lang.UnsupportedOperationException: A tabText parameter must be
> specified with add().
> at com.google.gwt.user.client.ui.TabPanel.add(TabPanel.java:192)
> at com.capgent.cpt.client.CptFormRenderer.init(CptFormRenderer.java:
> 122)
> at com.capgent.cpt.client.FormScratchpad
> $1.onSuccess(FormScratchpad.java:60)
> at com.capgent.cpt.client.services.ServerService_Proxy
> $1.onCompletionImpl(transient source for
> com.capgent.cpt.client.services.ServerService_Proxy:68)
> at com.capgent.cpt.client.services.ServerService_Proxy
> $1.onCompletionAndCatch(transient source for
> com.capgent.cpt.client.services.ServerService_Proxy:44)
> at com.capgent.cpt.client.services.ServerService_Proxy
> $1.onCompletion(transient source for
> com.capgent.cpt.client.services.ServerService_Proxy:38)
> at
> com.google.gwt.dev.shell.ie.IDispatchImpl.callMethod(IDispatchImpl.java:
> 126)
> at
> com.google.gwt.dev.shell.ie.IDispatchProxy.invoke(IDispatchProxy.java:
> 150)
> at
> com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:
> 293)
> at
> com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:
> 196)
> at
> org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:
> 117)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---