Announcement

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

    Possible IE 7 & 8 smartgwt 2.0 + Gwt 2.0 devmode issue

    Hello,

    I updated my smartgwt power project to gwt 2.0 and I started running into random application reloads. I have tracked down the issue to a combination of smartGwt ComboBoxItem with a standard gwt item (in our case Image) and history. Basically when you click on the drop down arrow of the combo box the application reloads.
    Note: this does not happen in chrome or ff dev mode and works if the code is compiled.

    Here's a code sample: (I just modified the hello world 2.0 sample). To recreate the problem start dev mode and click on the drop down box.

    Code:
    	public void onModuleLoad() {
    
    		History.newItem("test");
    		
    		Image printButton = new Image("skins/Enterprise/images/blank.gif");
    		printButton.getElement().getStyle().setProperty("margin", "3");
    		printButton.setWidth("16px");
    		printButton.setHeight("16px");
    		printButton.setTitle("test");
    
    		RootPanel.get().add(printButton);
    		
    		final DynamicForm form = new DynamicForm();
    		form.setWidth(250);
    
    		ComboBoxItem cbItem = new ComboBoxItem();
    		cbItem.setTitle("Select");
    		cbItem.setHint("<nobr>A simple ComboBoxItem</nobr>");
    		cbItem.setType("comboBox");
    		cbItem.setValueMap("Cat", "Dog", "Giraffe", "Goat", "Marmoset",	"Mouse");
    
    		form.setFields(cbItem);
    
    		RootPanel.get().add(form);
    
    		History.addValueChangeHandler(new ValueChangeHandler<String>() {
    
    			@Override
    			public void onValueChange(ValueChangeEvent<String> event) {
    				// TODO Auto-generated method stub
    
    			}
    		});
    	}
    Thanks

    #2
    Another user who reported a similar problem found that it was due to using the GWT Hyperlink class.

    Comment


      #3
      Isomorphic,

      Thank you for the information, however the sample I provided above does not use the gwt hyper link. But as I stated above it seems that using standard gwt controls in a smart gwt application will cause the restarting issue. In our case we use multiple standard gwt controls in the application where replacing them with smart gwt controls is not a feasible workaround. I'm not sure if this is an issue with the devmode plugin or smart gwt code but it is easily reproduce-able.

      if you comment out these lines in the sample I provided above the dropdown works properly, otherwise it restarts when clicking.

      Code:
      		Image printButton = new Image("helloworld/sc/skins/Enterprise/images/blank.gif");
      		printButton.getElement().getStyle().setProperty("margin", "3");
      		printButton.setWidth("16px");
      		printButton.setHeight("16px");
      		printButton.setTitle("test");
      
      		RootPanel.get().add(printButton);

      Thank you for your time

      Comment


        #4
        I have foundt, that some Smart GWT parts are using HTML hyperlinks as backing element and as such they have link to page ending with hash (page.html#)

        If I then update the URL (change GWT history) to page.html#something
        and If you then click on the link (that is still to page.html#) the app reloads.

        Any solutions?

        Comment

        Working...
        X