Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    PortalLayout bug ?

    Hi,

    I'm customizing the drag/drop behaviour in a portal layout.
    As suggested in the doc, I sometimes return null in the getDropPortlet() method to cancel the drop operation.

    It seems that this (though working) triggers a JS exception when drag/dropping.

    Here a simple example to reproduce the problem:

    Code:
    PortalLayout portalLayout = new PortalLayout() {
    			@Override
    			public Canvas getDropPortlet(Canvas dragTarget, Integer colNum, Integer rowNum, Integer dropPosition) {
    				return null;
    			}
    		};  
            portalLayout.setWidth100();  
            portalLayout.setHeight100();  
              
            Portlet portlet1 = new Portlet();  
            portlet1.setTitle("Portlet 1");  
            Portlet portlet2 = new Portlet();  
            portlet2.setTitle("Portlet 2");  
            Portlet portlet3 = new Portlet();  
            portlet3.setTitle("Portlet 3");  
            Portlet portlet4 = new Portlet();  
            portlet4.setTitle("Portlet 4");  
              
            portalLayout.addPortlet(portlet1, 0, 0);  
            portalLayout.addPortlet(portlet2, 0, 1, 0);  
            portalLayout.addPortlet(portlet3, 0, 1, 1);  
            portalLayout.addPortlet(portlet4, 1, 0);  
              
            portalLayout.draw();
    Here is the exception

    Code:
    com.google.gwt.core.client.JavaScriptException: (String) : Invoking an instance method on a null instance
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    	at java.lang.reflect.Constructor.newInstance(Unknown Source)
    	at com.google.gwt.dev.shell.ModuleSpace.createJavaScriptException(ModuleSpace.java:80)
    	at com.google.gwt.dev.shell.ModuleSpace.createJavaScriptException(ModuleSpace.java:64)
    	at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:60)
    	at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
    	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
    	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
    	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
    	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
    	at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
    	at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
    	at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:242)
    	at sun.reflect.GeneratedMethodAccessor514.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
    	at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    	at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
    	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
    	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
    	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
    	at java.lang.Thread.run(Unknown Source)
    My SGWT version: SmartClient Version: v9.0p_2013-09-14/PowerEdition Deployment (built 2013-09-14)

    I did not find anything relevant in the dev console...

    Regards,
    Thomas

    #2
    Hi !
    Any news/comment/update about this ?

    Thanks very much in advance,

    Thomas

    Comment


      #3
      This is currently being looked at. We'll follow up when we have more information.

      Regards
      Isomorphic Software

      Comment


        #4
        Hello,
        We've fixed it - please pick up the next nightly or 4.0 build (dated Oct 15 or above) to get this fix.

        Regards
        Isomorphic Software

        Comment


          #5
          Confirmed! Thank you very much for the quick fix!

          Best regards,
          Thomas

          Comment

          Working...
          X