Announcement

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

    Show DSRequest.setPrompt("Loading") depending on operation time

    Hi Isomorphic

    I use DSRequest.setPrompt("Please wait...Loading") message in custom operation call in a listgrid.
    I use following code in grid custom operation.

    DSRequest dsreq=new DSRequest();
    dsreq.setPrompt("Please wait...Loading");
    dsreq.setShowPrompt(true); dsreq.setPromptStyle(PromptStyle.DIALOG);


    Grid1.getDataSource().performCustomOperation("gridValueChanged", data,new DSCallback() {

    @Override
    public void execute(DSResponse response,Object rawData,DSRequest request) {

    //---------------Logic after return from server----------//


    },dsreq);



    I want to show this dialog only when dsRequest takes more than 5 sec time.otherwise it will not prompt anything.

    Currently it is showing every time when operation starts whether it is 1 sec or less than one sec.

    Is it possible to do in custom operation or any dsRequest. ???


    Please help ?

    I am using ........

    SmartClient Version: v8.3_2012-11-20/PowerEdition Deployment (built 2012-11-20)

    Browser...
    1. Mozila 25.0.1
    2.Chrome Version 34.0.1847.116 m
    3. IE 9.0

    Window 7 , 64 bit (jdk 1.7.0_45)

    #2
    Hi dev_123,

    please see RPCRequest/DSRequest.setPromptDelay(int).

    Best regards,
    Blama

    Comment


      #3
      Thank You for your quick reply.

      I am not getting this option in my dsRequest.

      Please give a example.

      Comment


        #4
        Please make sure you are importing the client side DSRequest and we are speaking about client side. If so, try:
        Code:
        com.smartgwt.client.data.DSRequest dsRequest = new DSRequest();
        dsRequest.setPromptDelay(5);
        Best regards,
        Blama

        Comment


          #5
          Just saw your version. Check your local JavaDocs for the method. I don't know if v3.1p has that method. Perhaps it was added in v4.0.

          Anyway you shoudn't be using the original release, but the latest p-nightly. See

          Originally posted by http://www.smartclient.com/product/downloadOtherReleases.jsp
          Original release (11/20/2012). Please use latest patched versions above to avoid hitting already-fixed bugs.
          Best regards,
          Blama

          Comment


            #6
            Thanks for reply.

            I imported com.smartgwt.client.data.DSRequest and option(method) is not present for DSRequest . May be this is added later patched version that i use now.

            Is there any other way to achieve this with this build (I use)

            Best Regards

            Dev

            Comment


              #7
              Hi dev_123,

              download the latest nightly of 3.1p and look in the javadocs if the method is there (better: Try it yourself in Eclipse). If so, besides the other reasons, use the latest nightly.
              Otherwise the question is for Isomorphic to answer, but I'd guess they'll suggest an update to 4.1.

              Best regards,
              Blama

              Comment


                #8
                Thanks for reply.

                I'll wait for Isomorphic for answer,If solution not found then i'll go to upgrade my build version as suggested by you.

                Once again thanks for your response.

                Best Regards

                Dev

                Comment


                  #9
                  focusInRow in list grid

                  I want to set keyboard focus in listgrid after listgrid.selectrecord(0). But i am not getting this method in listgrid.
                  Is it available in upper version of smartGwt.


                  My code is
                  listgrid.selectrecord(0);
                  listgrid.setCanSelectCells(false);

                  with in DataArrive handler of listgrid.

                  Can any one help me. ?

                  I am using
                  SmartClient Version: v8.3_2012-11-20/PowerEdition Deployment (built 2012-11-20)
                  Mozilla- 25.0.1

                  Comment

                  Working...
                  X