Results 1 to 6 of 6

Thread: Info goes behind a dialog

  1. #1
    Sencha Premium Member
    Join Date
    Jun 2013
    Location
    Nuremberg, Germany
    Posts
    88
    Answers
    3

    Default Info goes behind a dialog

    Hello,
    we want to use Info objects to show some user messages. Generally it works pretty fine, there is only one problem.
    There is a dialog in our application for a customer search. If no customer is found, a message shall be shown and the result table is refreshed. In this case, the Info box is only shown very short and after refreshing the result table it is obviously set behind the dialog (when I close the dialog quickly, I can see the Info box fade out).
    Is there any way to force the Info box to stay in the foreground?

    We are using a common Info class:
    Code:
    public class MyInfo extends Info {
    
        static MyInfo info;
    
        public static void show(String message, int duration, ApplicationCtrl smuggCtrl) {
    
            if (duration == -1)
                duration = 4000;
    
            info = new MyInfo();
    
            InfoConfig config = new DefaultInfoConfig(null, message);
            config.setDisplay(duration);
    
            StringBuffer styles = new StringBuffer();
            styles.append("text-align:center;");
            styles.append("border:2x solid black;");
            styles.append("Font-family:tahoma,arial,helvetica,sans-serif;");
            info.getElement().applyStyles(styles.toString());
            info.show(config);
    
            FxElement el = (FxElement) info.getElement();
            Fx fadeOutFx = new Fx(duration);
            el.fadeToggle(fadeOutFx);
    
            int left = (Window.getClientWidth() - info.getOffsetWidth()) / 2;
            int top = (Window.getClientHeight() - info.getOffsetHeight()) / 3 * 2;
    
            info.setPagePosition(left, top);
        }
    }
    Thanks in advance,
    Holger

  2. #2
    Sencha Premium Member
    Join Date
    Jun 2013
    Location
    Nuremberg, Germany
    Posts
    88
    Answers
    3

    Default

    ... no one an idea so far?

  3. #3
    Sencha User
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,737
    Answers
    109

    Default

    Do you get this issue with the normal Info popups?

    I just tried this briefly at sencha.com/examples, by first visiting http://www.sencha.com/examples/#Exam...ccordionwindow and clicking open, then moving to the Misc > Info example and making the info popups appear for 10 seconds. When dragging the window, it will appear over the info popups, but as soon as I released the mouse, it fell back under again.

    The only time I get this issue is when the info popup comes up *before* the dialog/window does - test this by first visiting the Info example, make a popup appear for 100 seconds, and *then* go to the window example and show the window. But that doesn't seem to agree with your description where the dialog was already present when the info popup is shown.

  4. #4
    Sencha Premium Member
    Join Date
    Jun 2013
    Location
    Nuremberg, Germany
    Posts
    88
    Answers
    3

    Default

    I can follow your explanations about your tests with the sencha examples. But indeed, that's not the way we do it getting this problem.
    Today I faced another aspect: I have an (other) dialog open and then want to show an Info. In this case the info message already starts and stays *behind* the dialog. I can't see anything special within this dialog, there is also no table like in the situation described before.
    I think I have to try to reproduce this with a small test client...

  5. #5
    Sencha Premium Member
    Join Date
    Jun 2013
    Location
    Nuremberg, Germany
    Posts
    88
    Answers
    3

    Default

    Having a closer look at the class XElement because of another issue (fading in dialog boxes), I came across this:
    Code:
    info.getElement().<FxElement> cast().setVisMode(VisMode.DISPLAY);
    Callling this throws an exception:
    Code:
    com.google.gwt.core.client.JavaScriptException: (ReferenceError) @com.sencha.gxt.core.client.dom.XElement::setVisMode(Lcom/sencha/gxt/core/client/dom/XElement$VisMode;)([Java object: [email protected]]): "visModel" ist undefiniert
    I had a look at XElement and saw this:
    Code:
      public final native void setVisMode(VisMode visMode) /*-{
            this.visMode = visModel;
      }-*/;
    I'm no javascript expert, but this doesn't seem write to me: the parameter is visMode, but visModel is assigned to this.visMode. Is that correct?

    (btw: when I don't catch the exception the Info stays in front of the dialog...)

  6. #6
    Sencha User
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,737
    Answers
    109

    Default

    As of 3.1 this appears to have been fixed:
    Code:
      public final native void setVisMode(VisMode visMode) /*-{
        this.visMode = visMode;
      }-*/;

Posting Permissions

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