Hi,
I think that the problem is that TabLayoutPanel has to be used woth
LayoutPanels
(http://www.gwtproject.org/doc/latest/DevGuideUiPanels.html#LayoutPanels)
whereas i told you to use RootPanel (that is not a LayoutPanel).

Change
 RootPanel.get.add(helloWorld);
with
 RootLayoutPanel.get.add(helloWorld);

and

public class Hello extends Composite {

with

public class Hello extends ResizeComposite {

(
http://www.gwtproject.org/javadoc/latest/com/google/gwt/user/client/ui/ResizeComposite.html
)

and should work.

Cannot try your code so my respoonse may be incomplete.

Ciao,
   Alberto.





On Tue, Apr 8, 2014 at 12:20 PM, Francesco Viscomi <fvisc...@gmail.com>wrote:

> Thanks Alberto;
> just another thing;
>
> I want to display the names in just one tab so i've changed the file
> Hello.ui.xml as reported below;
>
> But i'm able to view the multitab section but i cannot see the names
> anymore;
> Could you give me help once again?
>
>
> ===================================
> <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent";>
> <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
>     xmlns:g="urn:import:com.google.gwt.user.client.ui">
>     <!--
>     <g:HTMLPanel>
>                     Hello, <g:ListBox ui:field='listBox'
> visibleItemCount='1'/>.
>       </g:HTMLPanel>
>     -->
>     <g:TabLayoutPanel barUnit='EM' barHeight='3'>
>   <g:tab>
>      <g:header size='7'><b>HTML</b> header</g:header>
>     <!-- <g:Label>able</g:Label>
>      -->
>
>      <g:HTMLPanel>
>                     Hello, <g:ListBox ui:field='listBox'
> visibleItemCount='1'/>.
>       </g:HTMLPanel>
>   </g:tab>
>   <g:tab>
>     <g:customHeader size='7'>
>       <g:Label>Custom header</g:Label>
>     </g:customHeader>
>     <g:Label>baker</g:Label>
>   </g:tab>
>  </g:TabLayoutPanel>
>
>
>
> </ui:UiBinder>
> ===================================
>
>
>
>
>
> Il giorno martedì 8 aprile 2014 11:28:05 UTC+2, Francesco Viscomi ha
> scritto:
>
>> Hi all, i'm new on GWT;
>>
>> I followed the example on http://www.gwtproject.org/doc/
>> latest/DevGuideUiBinder.html
>> the one with title Hello Widget World;
>>
>> and everything seems right; My answer is how i can see the word Hello
>> able baker charlie (that is what is printed in Hello.ui.xml);
>>
>>
>>
>>
>> file Hello.ui.xml:
>>
>> ==========================================================
>>
>> <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent";>
>> <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
>>     xmlns:g="urn:import:com.google.gwt.user.client.ui">
>>     <g:HTMLPanel>
>>                     Hello, <g:ListBox ui:field='listBox'
>> visibleItemCount='1'/>.
>>   </g:HTMLPanel>
>> </ui:UiBinder>
>>
>> =====================================================================
>>
>> file Hello.java
>>
>> ======================================================================
>>
>> package com.francesco.client;
>>
>> import com.google.gwt.core.client.GWT;
>> import com.google.gwt.dom.client.SpanElement;
>> import com.google.gwt.uibinder.client.UiBinder;
>> import com.google.gwt.user.client.ui.Composite;
>> import com.google.gwt.user.client.ui.ListBox;
>> import com.google.gwt.user.client.ui.Widget;
>> import com.google.gwt.uibinder.client.UiField;
>>
>>
>>
>>
>> public class Hello extends Composite {
>>
>>     private static HelloUiBinder uiBinder = GWT.create(HelloUiBinder.
>> class);
>>
>>     @UiField ListBox listBox;
>>
>>     interface HelloUiBinder extends UiBinder<Widget, Hello> {
>>     }
>>
>>      public Hello(String... names) {
>>             // sets listBox
>>             initWidget(uiBinder.createAndBindUi(this));
>>             for (String name : names) {
>>               listBox.addItem(name);
>>             }
>>           }
>>
>> }
>>
>> ================================================================
>>
>> file Multitab.java
>>
>> ==============================================================
>>
>> package com.francesco.client;
>>
>> import com.francesco.shared.FieldVerifier;
>> import com.google.gwt.core.client.EntryPoint;
>> import com.google.gwt.core.client.GWT;
>> import com.google.gwt.dom.client.Document;
>> import com.google.gwt.event.dom.client.ClickEvent;
>> import com.google.gwt.event.dom.client.ClickHandler;
>> import com.google.gwt.event.dom.client.KeyCodes;
>> import com.google.gwt.event.dom.client.KeyUpEvent;
>> import com.google.gwt.event.dom.client.KeyUpHandler;
>> import com.google.gwt.user.client.rpc.AsyncCallback;
>> import com.google.gwt.user.client.ui.Button;
>> import com.google.gwt.user.client.ui.DialogBox;
>> import com.google.gwt.user.client.ui.HTML;
>> import com.google.gwt.user.client.ui.Label;
>> import com.google.gwt.user.client.ui.RootPanel;
>> import com.google.gwt.user.client.ui.TextBox;
>> import com.google.gwt.user.client.ui.VerticalPanel;
>>
>> /**
>>  * Entry point classes define <code>onModuleLoad()</code>.
>>  */
>> public class Multitab implements EntryPoint {
>>     /**
>>      * The message displayed to the user when the server cannot be
>> reached or
>>      * returns an error.
>>      */
>>     private static final String SERVER_ERROR = "An error occurred while "
>>             + "attempting to contact the server. Please check your
>> network "
>>             + "connection and try again.";
>>
>>     /**
>>      * Create a remote service proxy to talk to the server-side Greeting
>> service.
>>      */
>>     private final GreetingServiceAsync greetingService = GWT
>>             .create(GreetingService.class);
>>
>>     /**
>>      * This is the entry point method.
>>      */
>>     public void onModuleLoad() {
>>
>>
>>         Hello helloWorld = new Hello("able", "baker", "charlie");
>>
>> }
>>
>> ============================================================
>> ================
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to