Announcement

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

    DynamicForm containing RadioGroupItem resizes on disable

    I am seeing that when a DynamicForm containing a RadioGroupItem is disabled it increases in width. Its size is restored when the form is enabled again.
    I am running the 3.1d nightly build from earlier this week.

    This code will show the problem.

    Code:
    import com.google.gwt.core.client.EntryPoint;
    import com.smartgwt.client.types.Alignment;
    import com.smartgwt.client.widgets.IButton;
    import com.smartgwt.client.widgets.events.ClickEvent;
    import com.smartgwt.client.widgets.events.ClickHandler;
    import com.smartgwt.client.widgets.form.DynamicForm;
    import com.smartgwt.client.widgets.form.fields.RadioGroupItem;
    
    public class TestRgi implements EntryPoint {  
    
    	public void onModuleLoad() {  
    
    		final DynamicForm form = new DynamicForm();  
    		form.setBackgroundColor("lightblue");
    		form.setWidth(300);
    		form.setTop(200);
    		form.setLeft(200);
    		
    		RadioGroupItem rgi = new RadioGroupItem();
    		rgi.setTitle("Rgi test");
    		rgi.setValueMap("Yes", "No");
    		rgi.setVertical(false);
    		rgi.setAlign(Alignment.LEFT);
    		rgi.setWrap(false);
    
    		form.setItems(rgi);
    		form.draw();
    		
    		IButton ib = new IButton("button");
    		ib.setTop(250);
    		ib.setLeft(300);
    		
    		ib.addClickHandler(new ClickHandler() {
    			@Override
    			public void onClick(ClickEvent event) {
    				if (form.isDisabled()) {
    					form.setDisabled(false);
    				} else {
    					form.setDisabled(true);
    				}
    			}
    		});
    		
    		ib.draw();
    	}
    }
    Last edited by bc; 29 Aug 2012, 15:54.

    #2
    What browser and what doctype are you using?

    Comment


      #3
      Sorry. Firefox13.x and I am not specifying a doctype (quirks mode?).

      Comment


        #4
        Also, what skin?

        If you have any non-SmartGWT CSS styles in your project (see FAQ), be sure they are deleted as well, then re-test.

        Also is this happening for you in any browser other than Firefox? Some Firefox extensions interfere with rendering.

        Comment


          #5
          I do have custom css. But I can't delete that.

          Anyway it does not happen in IE so must be a firefox issue.

          Working around the issue by setting overflow to hidden for the form which prevents the resize. I can live with it for now.

          Comment


            #6
            If you return to this, the first thing to figure out is whether your custom CSS is creating the issue.

            Comment


              #7
              Hello,

              I've got the same problem after upgrading from SmartGWT 3.0 to 3.1. Wherever I've got disabled DynamicForm with RadioGroupItem there are width problems.
              It appears only on Firefox.
              I've checked with Firebug and there is blank image with enormous sizes:
              Code:
              <img border="0" align="TEXTTOP" width="1600" height="100" suppress="TRUE" src="images/blank.gif">
              This element does not appears in Chrome so it's a specific rendering issue.
              Above <img> element <div> element has overflow set to hidden but this element does not have width set so it's only affects height.

              Hope this will help to resolve the problem.

              Comment


                #8
                Be sure to try the most recent version, and remove any custom CSS you have added. If you can still reproduce an issue, please show minimal code that we can run to see the problem.

                Comment


                  #9
                  I've tested this in latest nightly build: SmartGWT-3.1d 2012-09-25 and GWT-2.4.0
                  Here you go the minimal test case:

                  Code:
                  VLayout vLayout = new VLayout(5);
                  vLayout.setWidth100();
                  vLayout.setHeight100();
                  
                  DynamicForm form = new DynamicForm();
                  form.setWidth(200);
                  form.setHeight(100);
                  form.setBorder("1px solid red");
                  form.setDisabled(true);
                  
                  RadioGroupItem item = new RadioGroupItem("test");
                  item.setValueMap("test1", "test2", "test3");
                  
                  form.setFields(item);
                  
                  vLayout.addMember(form);
                  
                  DynamicForm form2 = new DynamicForm();
                  form2.setWidth(200);
                  form2.setHeight(100);
                  form2.setBorder("1px solid red");
                  form2.setDisabled(false);
                  
                  RadioGroupItem item2 = new RadioGroupItem("test");
                  item2.setValueMap("test1", "test2", "test3");
                  		
                  form2.setFields(item2);
                  
                  vLayout.addMember(form2);
                  	
                  this.addChild(vLayout);
                  There is no additional CSS loaded. Test on skins: Enterprise, Enterprise Blue, Graphite.
                  Problem appears only on Firefox. I've tested on 3.6.28 and latest 15.0.1 on Windows and Linux.
                  On Chrome and IE problem not exists.

                  I've also attached a screenshot of above code.

                  Best regards
                  Mariusz Goch
                  Attached Files

                  Comment


                    #10
                    We've made a change to the 3.1d branch which should resolve this issue. The change will show up in the next nightly build

                    Regards
                    Isomorphic Software

                    Comment


                      #11
                      Hello,

                      On latest nightly build(2012-09-27) problem does not appears.

                      Thank you for quick response.

                      Best regards
                      Mariusz Goch

                      Comment


                        #12
                        Same issue came up in version 4.0p. We have tried latest build from 08/04/2015 and we are seeing enormous blank image in Firefox when RadioGroupItem is disabled.

                        Comment


                          #13
                          See previous advice about DOCTYPE and external CSS.

                          Comment

                          Working...
                          X