Announcement

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

    Tabset Issue

    Hi everyone,

    A few days ago I wrote a code that worked, to integrate some multpile forms in a tabset. Now I want to reuse it and it does not work anymore (strange, I juste copy paste the code).

    I get this exception :
    Code:
    00:01:07,090 [ERROR] 14:18:47.425:WARN:Canvas:item at: 0,1 has height: 26, item is: [TextItem ID:isc_TextItem_3 name:isc_TextItem_0]
    com.smartgwt.client.core.JsObject$SGWT_WARN: 14:18:47.425:WARN:Canvas:item at: 0,1 has height: 26, item is: [TextItem ID:isc_TextItem_3 name:isc_TextItem_0]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
    at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
    at com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:1713)
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:165)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
    at com.smartgwt.client.widgets.BaseWidget.getInnerHTML(BaseWidget.java)
    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.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:157)
    at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1668)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
    at java.lang.Thread.run(Thread.java:619)
    In the dev console, I get multiple errors just like this one for all the components that have to be displayed. The code I use to create my tabs is for me, very trivial :
    Code:
        	final HLayout topLayout = new HLayout();
        	topLayout.setWidth("98%");
        	final HLayout bodyLayout = new HLayout();
        	bodyLayout.setWidth("98%");
        	final HLayout bottomLayout = new HLayout();
        	bodyLayout.setWidth("98%");
    
        	final TabSet topTabSet = new TabSet(); 
    		final ListGrid listGrid = new ListGrid();
    		final TextBox inputItu = new TextBox();
    		final Button searchItu = new Button("Search");
    		final Button searchDep = new Button("Search");
    		final Button searchDepItu = new Button("Search");
    		final Button xlsExport = new Button("Excell export");
    		final DateItem dateItemTo = new DateItem();
    		final DateItem dateItemFrom = new DateItem();
    		final DateItem depItuDateItemTo = new DateItem();
    		final DateItem depItuDateItemFrom = new DateItem();
    		final TextItem ituTextItem = new TextItem(); 
    		final TransportResultDataSource dataSource = TransportResultDataSource.getInstance();
    
    		// TABS Creation
    		VLayout tabLayout = new VLayout();
    		tabLayout.setWidth("100%");
    		topTabSet.setWidth("100%");
    		topTabSet.setHeight(150);
    		tabLayout.addChild(topTabSet);
    		
    		Tab ituTab = new Tab("Search by itu code");
    		HLayout ituLayout = new HLayout();
    		ituLayout.addMember(new Label("Enter your ituCode : "));
    		ituLayout.addMember(inputItu);
    		ituLayout.addMember(searchItu);
    		ituTab.setPane(ituLayout);
    		
    		Tab depTab = new Tab("Search by departure date");
    		Layout depLayout = new Layout();
    		DynamicForm dateForm = new DynamicForm();
    		dateItemFrom.setTitle("From");  
    		dateItemFrom.setUseTextField(true);
    		dateItemTo.setTitle("To");  
    		dateItemTo.setUseTextField(true);
    		dateForm.setItems(dateItemFrom,dateItemTo);
    		depLayout.addMember(dateForm);
    		depLayout.addMember(searchDep);
    		depTab.setPane(depLayout);
    		
    		Tab depItuTab = new Tab("Search by departure date and ITU code");
    		HLayout depItuLayout = new HLayout();
    		ituTextItem.setTitle("ITU code");
    		depItuDateItemFrom.setTitle("From");  
    		depItuDateItemFrom.setUseTextField(true);
    		depItuDateItemTo.setTitle("To");  
    		depItuDateItemTo.setUseTextField(true);
    		DynamicForm depItuDateForm = new DynamicForm();
    		depItuDateForm.setItems(ituTextItem,depItuDateItemFrom,depItuDateItemTo);
    		depItuLayout.addMember(depItuDateForm);
    		depItuLayout.addMember(searchDepItu);
    		depItuTab.setPane(depItuLayout);
    		
    		topTabSet.setTabs(depTab,depItuTab,ituTab);
    		topLayout.addMember(tabLayout);
    A strange thing is that the first tab is displayed properly and all the other tabs aren't. If I change the tabs order, the first tab is still displyed properly. So I guess it's not a code problem, but I cannot see what the problem really is ...

    If it can help, when I'm running the page in Firefox, I get this message in the Eclipse console : [ERROR] Uncaught JavaScript exception [uncaught exception: java.lang.AssertionError: A widget that has an existing parent widget may not be added to the detach list] in , line 0
    When I'm running the page in Chrome, I get no message in the console ...

    if anyone have an idea ... I'm still searching
    Last edited by romain.vdk; 7 Jul 2010, 05:42.

    #2
    Ok, I've some news, and I think it's an issue for smartgwt.

    When I'm using the debug mode of GWT, the tabs doesn't display properly ( this kinf of URL : http://127.0.0.1:8888/index.jsp?gwt.codesvr=127.0.0.1:9997 ) and when I'm not using the debug mode ( http://127.0.0.1:8888/index.jsp ) it's working fine ...

    Comment

    Working...
    X