My bad... My java code was generic but I started with a copy
of the java code + template from an exiting source which had
constructor code of

    initWidget(uiBinder.createAndBindUi(null));
vs
    initWidget(uiBinder.createAndBindUi(this));

Which works till you bind something :-)

-John G

On 2/1/11 1:22 AM, John Gentilin wrote:
My Java class is just the plain vanilla code when you use the wizard to
create a UIBinder object, I have not added any functionality. The only
changes I have done is to comment out the @UIField definitions that
the WindowsBuilder editor inserted. Including any one of the 6 fields
I defined results in the widget not rendering..

I am running this on GWT 2.1.1 and I also tried 2.1.0 if fails the same
in both modes.

-John G

On 2/1/11 12:34 AM, Jan Mostert wrote:
Maybe post the code that you use to bind the component, problem is most likely there.


--
Jan Vladimir Mostert
BEngSci

Mail: j...@mycee.com <mailto:j...@mycee.com>
MyCee Technologies


On Tue, Feb 1, 2011 at 10:20 AM, John Gentilin <gent...@gmail.com <mailto:gent...@gmail.com>> wrote:

    I have a UIBinder file that specifies a HTMLPanel that contains a mix
    of plain HTML and GWT widgets.
    If I don't bind any of the variables, the Widget will load correctly
    and display. As soon as I bind a UI field
    in my code including the @UIField definition,  @UiField TextBox
    userid; then initializing the Widget fails in a NPE.

    Thanks for any help in advance.
    John Gentilin

    This is the exception
    java.lang.NullPointerException: null  at
    
com.CloudTvApps.PicRollr.client.Modules.Registration.RegistrationController_UIDefaultImpl.createAndBindUi(RegistrationController_UIDefaultImpl.java:
    61) at
    
com.CloudTvApps.PicRollr.client.Modules.Registration.RegistrationController_UIDefaultImpl.createAndBindUi(RegistrationController_UIDefaultImpl.java:
    1) at
    
com.CloudTvApps.PicRollr.client.Modules.Registration.RegistrationController.&lt;init&gt;
    (RegistrationController.java:37)
       at
    
com.CloudTvApps.PicRollr.client.PicRollrEntryPoint.onModuleLoad(PicRollrEntryPoint.java:
    32)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
    39)
       at
    
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
    25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:
    396)
       at
    
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:
    183)
       at
    
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:
    510)
       at
    com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
    352)
       at java.lang.Thread.run(Thread.java:680)


    UIBinder definition

    <!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">

    <ui:style>

    </ui:style>

    <g:HTMLPanel>
    <div class="regform">
    <table cellpadding="2" cellspacing="0" border="0">
    <tr>
    <td width="130">
    <label>User ID:</label>
    </td>
    <td width="140">
    <g:TextBox  maxLength="15" visibleLength="15" ui:field="userid"/
    >
    </td>
    </tr>
    <tr>
    <td>
    <label>Password:</label>
    </td>
    <td>
    <g:PasswordTextBox  maxLength="15" visibleLength="15"
    ui:field="password"/>
    </td>
    </tr>
    <tr>
    <td>
    <label>Confirm Password:</label>
    </td>
    <td>
    <g:PasswordTextBox  maxLength="15" visibleLength="15"
    ui:field="password2"/>
    </td>
    </tr>
    <tr>
    <td>
    <label>Name:</label>
    </td>
    <td>
    <g:TextBox maxLength="15" visibleLength="15" ui:field="name"/>
    </td>
    </tr>
    <tr>
    <td>
    <label>E-mail:</label>
    </td>
    <td>
    <g:TextBox  maxLength="15" visibleLength="15" ui:field="email"/>
    </td>
    </tr>
    <tr>
    <td colspan="2">
    <g:CheckBox  text="" ui:field="agree"/>
    <label>I agree with the terms of service</label>
    </td>
    </tr>
    <tr>
    <td colspan="2">
    <g:Button ui:field="register">Register</g:Button>
    <input type="reset" value="Reset" />
    </td>
    </tr>
    </table>
    </div>


    </g:HTMLPanel>
    </ui:UiBinder>

    --
    You received this message because you are subscribed to the
    Google Groups "Google Web Toolkit" group.
    To post to this group, send email to
    google-web-toolkit@googlegroups.com
    <mailto:google-web-toolkit@googlegroups.com>.
    To unsubscribe from this group, send email to
    google-web-toolkit+unsubscr...@googlegroups.com
    <mailto:google-web-toolkit%2bunsubscr...@googlegroups.com>.
    For more options, visit this group at
    http://groups.google.com/group/google-web-toolkit?hl=en.


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
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.


--
You received this message because you are subscribed to the Google Groups "Google 
Web Toolkit" group.
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.

Reply via email to