Announcement

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

    [Issue] ScreenSpan & ZIndex

    Hey Isomorphic,

    I've just ran into an issue here.

    Some months ago, I've read a thread here about including SmartGWT applications in Portlets.

    I was told to use the setZIndex(0) method on my outmermost layout to solve some problems concerning overlapping menus.

    It did the trick, but now I have some problem with the ScreenSpan.

    Here's a standalone test case, run it and try to select Pamela's age in the expansion component. As you can see, the screen span have a higher index than the selectItem causing this behavior.

    Thanks in advance for your help.

    Cheers.

    Code:
    final ListGrid myGrid = new ListGrid()
    		{
    			@Override
    			protected Canvas getExpansionComponent(ListGridRecord record)
    			{
    				VLayout layout = new VLayout();
    				ListGrid nestedGrid = new ListGrid();
    				nestedGrid.setWidth(250);
    				nestedGrid.setHeight(150);
    
    				ListGridField name = new ListGridField("name", "Name");
    				ListGridField age = new ListGridField("age", "Age");
    				age.setCanEdit(true);
    				age.setValueMap("1", "2", "3");
    
    				ListGridRecord testRecord = new ListGridRecord();
    				testRecord.setAttribute("name", "Pamela");
    				nestedGrid.setFields(name, age);
    
    				nestedGrid.addData(testRecord);
    
    				layout.addMember(nestedGrid);
    
    				return layout;
    			};
    		};
    		myGrid.setWidth(300);
    		myGrid.setHeight(200);
    		myGrid.setCanExpandRecords(true);
    
    		ListGridField person = new ListGridField("person", "Persons");
    		ListGridRecord Joseph = new ListGridRecord();
    		Joseph.setAttribute("person", "Joseph");
    
    		myGrid.setFields(person);
    		myGrid.addData(Joseph);
    
    		myGrid.addDrawHandler(new DrawHandler()
    		{
    
    			@Override
    			public void onDraw(DrawEvent event)
    			{
    				[B]myGrid.setZIndex(0);[/B]
    
    			}
    		});
    
    		myGrid.draw();
    Using Firefox 5 & SmartGWT 2.5 & GWT 2.3
    Windows XP

    #2
    anyone have an idea or workaround?

    thks

    Comment


      #3
      You can call 'setModalEditing(false)' as a workaround. Our engineering team will look into whether there's framework bug here to consider.

      Comment


        #4
        Hey Isomorphic,

        Do you guys have a bug tracker system like Mantis or something else where people could follow what are the related issues state ?

        This to ask, if the issue mentioned in this post was corrected in SGWT 3.0

        Thanks.

        Comment


          #5
          Probably too late to help you, but for others who made find this through Google like I did, I found a solution to this problem. The root element that your UI is in, the element whose parent is the body element, has to have a z-index that's greater than the z-index of the screenspan element. In my case the screenspan element had a z-index of 199xxx, so I set the z-index of my UI's root element (a GWT-Ext viewport div) to 200000 (and set position:absolute, to activate the z-index). That did the trick for me :)

          Comment

          Working...
          X