Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium Member
    Join Date
    Oct 2011
    Posts
    139
    Vote Rating
    4
    jvahabzadeh is on a distinguished road

      0  

    Default [FNR] Bug in BorderLayoutContainer.setXXXWidget(Widget w)?

    [FNR] Bug in BorderLayoutContainer.setXXXWidget(Widget w)?


    I *think* I have encountered a bug. Or I'm doing something terribly wrong. This is with BorderLayoutContainer in GXT 3.0

    When I have a BorderLayoutContainer, I can't necessarily set the widgets in the directional locations to any type of Widget.

    This is the shortest bit of code I have that duplicates it:

    PHP Code:
    public class Bug implements EntryPoint {

      @
    Override
      
    public void onModuleLoad() {
        
    BorderLayoutContainer container = new BorderLayoutContainer();
        
    container.setNorthWidget(new TextButton("Button"));
        
    RootPanel.get().clear();
        
    RootPanel.get().add(container);
      }

    The second line in the method throws a NullPointerException. (it is referred to as "Bug.java:17" in the exception trace provided below)

    I have only tried to do a setNorthWidget (or South, East, West) with Label, VerticalPanel, TextButton, and VerticalLayoutContainer.

    With Label and VerticalPanel, it works fine. With TextButton and VerticalLayoutContainer, the exception is thrown.

    Is it that it will only work with standard GWT Widget subclasses, and not GXT Widget subclasses?

    The exception I get from the above code is as follows:
    Code:
    13:21:36.580 [ERROR] [bug] Unable to load module entry point class com.test.bug.client.Bug (see associated exception for details)
    
    java.lang.NullPointerException: null
        at com.sencha.gxt.widget.core.client.container.BorderLayoutContainer.onInsert(BorderLayoutContainer.java:693)
        at com.sencha.gxt.widget.core.client.container.Container.insert(Container.java:380)
        at com.sencha.gxt.widget.core.client.container.BorderLayoutContainer.setNorthWidget(BorderLayoutContainer.java:332)
        at com.test.bug.client.Bug.onModuleLoad(Bug.java:17)
        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:200)
        at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:525)
        at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
        at java.lang.Thread.run(Thread.java:662)
    So, is it a bug, or am I using BorderLayoutContainer in some inappropriate way?

    (line 17 in Bug.java corresponds to the se

    (PS: I used the PHP tags to show my Java code - is there some sort of java-specific tag that will allow better color coding of code snippets?)

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,966
    Vote Rating
    130
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    This is fixed in SVN now.

    You are not specifying any layoutData. Simple use a BorderLayoutData as a workaround for now.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar