Announcement

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

    Loading Dialog Problem

    When a Databound component performs an operation it shows a loading dialog.

    The problem is that for some unknown reason this dialog is always appearing behind the other windows so it's impossible to the user to see it. Also it is not disabling the other windows in the application as it was expected since it is a modal dialog.

    The same thing happens when I call fetchData manually or when I invoke a RPC/DMI call.

    How can I get this dialog appearing correctly?

    #2
    Not normal and may indicate that you are doing some kind of hand-manipulation of zIndexes. Try narrowing this to a standalone test case.

    Comment


      #3
      I'm not using smartclient API in the usual way.
      Instead of coding this way:

      Window.create
      ({
      items:
      [
      isc.ListGrid.create
      ({
      ...
      });
      ]
      })

      I'm coding this way:

      isc.defineClass("ApplicationWindow", "Window")

      ApplicationWindow.addProperties
      ({
      myList : null,

      initWidget : function(arguments)
      {
      this.Super("initWidget", arguments);
      this.createMyList();
      },

      createMyList : function()
      {
      var list = isc.ListGrid.create();
      list.setCanResizeFields(false);

      this.myList = list;
      this.addItem(list);
      }
      });

      ApplicationWindow.create().show();

      It seems that doing this the ListGrid data is fetched before the window show up. However, this operation is assynchronous and the window is shown before de fetch operation is completed overlapping the dialog.

      I solved the problem changing the code a little bit:

      isc.defineClass("ApplicationWindow", "Window")

      ApplicationWindow.addProperties
      ({
      myList : null,

      initWidget : function(arguments)
      {
      this.Super("initWidget", arguments);
      this.createMyList();
      },

      show : function()
      {
      this.Super("show");
      this.myList.fetchData();

      /*
      Mannually fetch data here because at this point
      the window is already shown up and all the components
      drawn
      */
      },

      createMyList : function()
      {
      var list = isc.ListGrid.create();
      list.autoFetchData = false; // Do not auto fetch data
      list.setCanResizeFields(false);

      this.myList = list;
      this.addItem(list);
      }
      });


      Now I have another question.
      How can I customize the loading dialog message?
      It says "Finding records that match your criteria".
      I want to show another message and if possible put an animated icon to the left.

      Comment


        #4
        Code:
        isc.ListGrid.create
        ({
          loadingDataMessage: "${loadingImage} I am loading data with an icon to the left..."
        });

        Comment


          #5
          Thanx!!!!!!

          Comment


            #6
            This is the message shown within the ListGrid body.
            I want to customize the message shown in the dialog.

            Comment


              #7
              You can specify a different prompt on the DSRequest object when you call 'fetchData()'

              Comment


                #8
                Thanx!
                I'll try that!

                Comment

                Working...
                X