Results 1 to 2 of 2

Thread: Legacy Bug (MVC)

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium Member
    Join Date
    Nov 2008
    Vote Rating

    Default Legacy Bug (MVC)

    Required Information
    Version(s) of Ext GWT
    Ext GWT 3.0 Release Candidate

    Browser versions and OS

    • All browsers and OSes
    Virtual Machine
    I would assume both.

    Utilizing the Legacy jar to migrate to GXT 3.0:
    We utilize the MVC code. Attempt to call Dispatcher.get().dispatch(..., ...), but the event never appears to be handled by the appropriate Controller, and as such, the application fails to proceed as expected.

    This ends up in the method Dispatcher.dispatch(AppEvent event, boolean createhistory) ...
    Which appears to begin as follows:
    BeforeAppEvent before = new BeforeAppEvent(event);
        if (before.isCanceled()) {
          ... handle event ...
    (Line 232, for reference.)
    However, before appears NEVER to be canceled. As such, the event is always ignored.

    Run mode
    Possible fix
    It appears the line on 235 should read: if (!before.isCanceled()).

    Please let me know what approach I can take to working around this issue.

  2. #2
    Sencha User's Avatar
    Join Date
    Feb 2009
    Vote Rating


    Quote Originally Posted by scaswell1 View Post

    Version(s) of Ext GWT
    Ext GWT 3.0 Release Candidate
    The final release (gxt-3.0.0-GPL) suffers this defect as well.

    While implementing it as suggested (!before.isCanceled()) does work, more fundamentally, it doesn't seem that the
    beforeDispatch(final BeforeAppEvent mvce) method of a Dispatcher listener ever gets called.

    I can rewrite my app even if both of these things are broken but it does seem as though fundamentally that mvc legacy support is really broken.

    Anyway, my workaround was to:

    1) replace com.sencha.gxt.legacy.client.mvc.Dispatcher with my own class (a simple copy) com.sencha.gxt.legacy.client.mvc.BugFixDispatcher

    use the suggested workaround in the dispatch(AppEvent event, boolean createhistory) method: if (!before.isCanceled())

    3) also in
    dispatch(AppEvent event, boolean createhistory), comment out the call to fire the beforeAppEvent since it wasn't working, and call it directly

    note FB_Controller is a static class in my main class which implements EntryPoint and beforeDispatch is now a static method that I just copied out of the DispatcherListener that was functioning before.
    Last edited by; 19 May 2012 at 4:08 PM. Reason: did further investigation

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts