Announcement

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

    Browser crashes with this particular line

    Isomorphic,

    I have a selectitem and another component which extends TextItem. The component has a property which I need to change dynamically depending on the selectitem value.

    The following line of code put in the changedhandler for selectitem causes the browser to crash(both chrome and firefox) only when deployed in tomcat but not when run in hosted mode:

    Code:
    ((TypeAheadTextItem)reportInput.getField("destination")).setDimension(changedEvent.getValue().toString());
    I tried with direct referencing like:

    Code:
    destination.setDimension(changedEvent.getValue().toString());
    making destination as final.

    this too doesn't work.

    TypeAheadTextItem is a class that extends textitem.
    dimension -> is a instance variable of TypeAheadTextItem with getters and setters.

    reportInput -> form in which the selectitem and typeaheadtextitem form elements are present.

    destination -> name of the typeaheadtextitem textitem.

    It works fine in hosted mode but not when deployed in tomcat.


    GWT-version: 2.4
    SmartGWT- version: 25112011 nightly
    Browsers: Firefox-5 and Chrome:15.0.874.121 m


    Thanks.
    Last edited by harsha.galla; 7 Dec 2011, 10:13.

    #2
    We don't have a definitive answer from this description.

    There's nothing obviously wrong in the code snippets you've posted or pattern you're describing here.
    It's definitely odd that it works in hosted mode but then crashes in compiled mode. This makes it unlikely to be a SmartGWT framework issue - it could be an application issue where some state is available in hosted mode that isn't available in your live deployment (different server logic / different data etc perhaps)?

    When you say the browser crashes, what actually happens? A JavaScript error, or a full browser crash, or something else? Do you get anything logged in the developer console that might shed light on what's going on here?
    If not, the best way to proceed would be to try to isolate this down to a runnable test case we can try on our end that demonstrates the problem.

    Regards
    Isomorphic Software

    Comment


      #3
      Browser just crashes, no error anywhere in the logs. When I comment this particular line of code, everything works fine. I have a listGrid tied to the TypeAheadTextItem class. So the datasource operationId of the listgrid changes based on the selection in the selectItem. I use this line of code to change a property of TypeAheadTextItem to determine at run time the operation id to perform a fetch on.

      Will try to isolate the issue.

      Thanks.

      Comment

      Working...
      X