Announcement

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

    Nested Layouts adding table and div elements to html body

    I have nested VLayouts to which I add HLayouts in a loop. Each HLayout has a DynamicForm
    Code:
    final VLayout mainPanel = new VLayout();
    for(...)
    {
    	final VLayout documentPanel = new VLayout();
    	if(index == 0 || index % 2 == 0)
            	documentPanel.setStyleName("documentListFlowAlt");
    	else
    		documentPanel.setStyleName("documentListFlow");
    	
    	for(...)
    	{
    		HLayout documentTitlePanel = new HLayout();
    		...
    		DynamicForm form = new DynamicForm();
    		...
    		...
    		documentTitlePanel.addMember(form);
    		documentPanel.addMember(documentTitlePanel ) ;
    	}
    
    	mainPanel.addMember(documentPanel);
    }
    RootPanel.get(DOCUMENT_SELECTOR_CONTAINER).add(mainPanel);
    The code above adds unwanted table and div element to the html body
    Code:
    <table cellpadding="81" style="position: absolute; left: 0px; top: -300px;">
    	<tbody>
    		<tr>
    			<td id="isc_cellStyleTester" class="documentListFlowAlt">&nbsp;</td>
    		</tr>
    	</tbody>
    </table>
    
    <div style="position: absolute; left: 0px; top: -100px;" id="isc_styleTester" class="documentListFlowAlt">&nbsp;</div>
    The div with id isc_styleTester adds a grey background to half of my screen because I have background set to grey in css class 'documentListFlowAlt'.

    Question 1: Why is SmartGwt adding these table and div elements to the body.
    Question 2: Can we configure the components not to create these unwanted elements?

    SmartGWT version = 2.2
    Browser = Firefox 3.6.10 and IE 6

    Thanks
    Adnan

    #2
    The table and div elements are required by SmartGWT - there is no configuration property to get rid of these elements.

    Having said that, they should never be visible to the end user and shouldn't effect the appearance of the page. We aren't reproducing this in house from your code, and aren't aware of any cases where this would occur.

    If you can show us a standalone test case where this is a problem let us know and we'll take a look.

    Comment


      #3
      Based on this thread Dummy "isc_styleTester" div gets visible when changing styleName, I added a dummy panel with a dummy style after I change the style on the documentPanel to 'documentListFlowAlt'. This fixes my problem. But don't want to be creating creating dummy elements just for a work around.

      Code:
      final Canvas canvas = new Canvas();
      canvas.setStyleName("dummyStyle");
      documentListPanel.addMember(canvas);
      I will post a standalone test case when I get some time.

      Regards, Adnan

      Comment

      Working...
      X