Announcement

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

    Changed handler of text item is not working for string value in internet explorer

    Hi,

    I am having problem with addChangedHandler() method of TextItem. The issue is only for internet explore. In Google Chrome and Mozilla Firefox it's working fine.
    Issue is that addChangedHandler() method not get's called when we enter string value in text item although it's working fine for numeric values.
    I am using 12.0-p20191102 version of smartgwt with enterprise edition.

    You can refer below code to replicate the issue:

    final TextItem smartSearch = new TextItem();
    smartSearch.setName("smartSearchItem");
    smartSearch.setHeight(30);
    smartSearch.setWidth("100%");
    smartSearch.addChangedHandler(new ChangedHandler() {

    @Override
    public void onChanged(ChangedEvent event) {
    Logger.getLogger("").info("onChanged() called...");
    if (null != event.getValue()) {
    Logger.getLogger("").info("text: "+ event.getValue().toString());
    }
    }
    });

    DynamicForm form = new DynamicForm();
    form.setFields(smartSearch);

    HLayout layout = new HLayout();
    layout.addMember(form);
    layout.draw();

    Please suggest.

    Thanks
    Last edited by sidharth1917; 31 Mar 2020, 08:01.

    #2
    This doesn't reproduce an issue. Of course it doesn't - this is extremely basic functionality and if it were broken we'd have hundreds of posts about it.

    Your team routinely reports that something really basic is broken, and we can't reproduce it, and then you just go silent. What is going on? Are you just reporting to your management that you "filed an issue with the vendor" so you can have the afternoon off? :)

    Comment


      #3
      Hi Isomorphic ,

      Thanks for your kind words but this is actually an issue i have been going through. Above i had pasted only the code snippet.
      You can run the below code with class and method having this code.

      public class MyEntryPoint implements EntryPoint {


      public void onModuleLoad() {
      final TextItem smartSearch = new TextItem();
      smartSearch.setName("smartSearchItem");
      smartSearch.setHeight(30);
      smartSearch.setWidth("100%");
      smartSearch.addChangedHandler(new ChangedHandler() {

      @Override
      public void onChanged(ChangedEvent event) {
      Logger.getLogger("").info("onChanged() called...");
      if (null != event.getValue()) {
      Logger.getLogger("").info("text: "+ event.getValue().toString());
      }
      }
      });

      DynamicForm form = new DynamicForm();
      form.setFields(smartSearch);

      HLayout layout = new HLayout();
      layout.addMember(form);
      layout.draw();
      }
      }

      I have also attached all the screenshots from all the 3 browsers and my eclipse code snapshot.
      You can see in the screenshots that chrome and firefox both are working fine for string and numeric value but internet explorer is working for only numeric value and not for string value.
      Please help me on this.

      Thanks
      Attached Files

      Comment


        #4
        What you seem to be showing is that your "Logger" class (whatever that is - you haven't explained) doesn't succeed in logging to the native console in IE11, sometimes, on your machine only, possibly due to some plugins or other development tools you have installed that may have broken IE, or perhaps due to invalid framework-wide customizations you've attempted, or third-party code in your application..

        The idea that the Changed event doesn't fire for IE for non-numeric values is nonsense - probably something like 30% of the samples in the Showcase would be non-functional in IE, and, as we've covered, there would be hundreds of posts about the issue within hours, because if this was broken, all of our customer's apps would be broken.

        So again, with support we have an obligation to you to fix anything that's broken in the framework, which we take very very seriously. But on the flip side, you have an obligation not to report an issue to us until you've made quite sure it's a problem with our framework. Please hold up your end of the contract. Thanks.

        Comment

        Working...
        X