Announcement

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

    MultiSort Dialog is deprecated

    The MultiSortDialog appears as deprecated. I did not find a replacement. Even in the showcase there is no nother example mentioned.

    Code:
    MultiSortDialog.askForSort( listGrid, listGrid.getSort(), new MultiSortCallback()
                    {
                        public void execute( SortSpecifier[] sortLevels )
                        {
                            if ( sortLevels != null )
                            {
                                listGrid.setSort( sortLevels );
                            }
                        }
                    } );
    Another question is... how can I transfer the following window settings to this dialog:

    Code:
            Window window = new Window();
            window.setIsModal( true );
            window.setShowModalMask( true );
            window.setModalMaskOpacity( 75 );
    SmartGWT: 6.1p
    Version: 30. July LGPL


    Thanks
    Andy



    #2
    MultiSortDialog is a subclass of Window, so you apply those settings in the usual way.

    Please clarify what specificly is deprecated - we're not seeing an API that is deprecated without a replacement.

    Comment


      #3
      What is the usual way? MultiSortDialog.setModal(true) is not available.

      Eclipse marks this dialog as deprecated... I do not know why (see screenshot)


      Click image for larger version

Name:	dep.png
Views:	120
Size:	26.3 KB
ID:	248086



      Thanks
      Andy


      Comment


        #4
        Instead of calling askForSort() on MultiSortDialog, call it on listGrid - you can then use setMultiSortDialogProperties() to specify your settings, and they will be applied to the MultiSortDialog that gets created.

        We'll look at why the static version you linked to is deprecated.

        Comment


          #5
          Note there's a second MultiSortDialog in the "data" package which briefly existed and was deprecated. You want the one in the "widgets" package.

          Comment


            #6
            Yeah I used the following code:

            Code:
                            MultiSortDialog multiSortDialogProperties = new MultiSortDialog();
                            multiSortDialogProperties.setIsModal( true );
                            multiSortDialogProperties.setShowModalMask( true );
                            multiSortDialogProperties.setModalMaskOpacity( 75 );
            
                            listGrid.setMultiSortDialogProperties( multiSortDialogProperties );
                            listGrid.askForSort();
            The window does appear modal... but I do not see the grey background... which should be set by the function ".setModalMaskOpacity( 75 )". It appears with a white background as follows:

            Click image for larger version

Name:	modalPopUp.png
Views:	129
Size:	11.6 KB
ID:	248203

            Is there a similiar function for the other listgrid pop ups... like "listGrid.editFields()" or "listGrid.editHilites()"... I did not found a method therefore.

            Maybe you also should change shor showcase code... you call there the deprecated medthod.

            Thanks
            Andy


            Comment


              #7
              1) yes, that was a bug - logic wasn't passing attributes through - as of tomorrow, just setting showModalMask to true, in this way, should be enough for you to see a 50% grey modal mask (isModal is true by default).

              2) You can use setAutoChildProperties() for the two auto-children called "fieldPickerWindow" and "hiliteEditor".
              Last edited by Isomorphic; 8 Aug 2017, 07:25.

              Comment


                #8
                Thank you! So the "FieldPickerWindow" also gets ignored... I tried the followin without any change:

                Code:
                FieldPickerWindow properties = new FieldPickerWindow();
                                properties.setIsModal( true );
                                properties.setShowModalMask( true );
                                properties.setModalMaskOpacity( 75 );
                                listGrid.setAutoChildProperties( "fieldPickerWindow", properties );
                
                                listGrid.editHilites();
                And one last questions... is there any way to add the same properties to any of the SC pop ups like "SC.say("Test");" ? I also did not find a way therefore. Thanks!
                Last edited by andyx1975; 8 Aug 2017, 21:30.

                Comment


                  #9
                  You're applying settings to the fieldPicker window and then showing the hiliteEditor.

                  Comment


                    #10
                    This way also did not work:

                    Code:
                                    listGrid.editHilites();
                    
                                    FieldPickerWindow properties = new FieldPickerWindow();
                                    properties.setIsModal( true );
                                    properties.setShowModalMask( true );
                                    properties.setModalMaskOpacity( 75 );
                                    listGrid.setAutoChildProperties( "fieldPickerWindow", properties );

                    Comment


                      #11
                      ??? editHilites() shows the hiliteEditor, not the fieldPickerWindow...

                      Comment


                        #12
                        Ah okay sorry... just pasted the wrong code... but it still does not adopt the settings:


                        Code:
                         FieldPickerWindow properties = new FieldPickerWindow();
                                        properties.setIsModal( true );
                                        properties.setShowModalMask( true );
                                        properties.setModalMaskOpacity( 75 );
                                        listGrid.setAutoChildProperties( "fieldPickerWindow", properties );
                        
                                        listGrid.editFields();
                        So I guess the hilites should maybe work the following?
                        Code:
                         Window properties = new Window();
                                        properties.setIsModal( true );
                                        properties.setShowModalMask( true );
                                        properties.setModalMaskOpacity( 75 );
                                        listGrid.setAutoChildProperties( "hiliteEditor", properties );
                        
                                        listGrid.editHilites();
                        Last edited by andyx1975; 9 Aug 2017, 05:28.

                        Comment


                          #13
                          These blocks of code are identical.

                          For editHilites(), you want the "hiliteWindow" autochild, not "fieldPickerWindow" - and you pass Window properties, not FieldPickerWindow properties.

                          For editFields(), "fieldPickerWindow" is the right auto-child name - if it *really* doesn't work when it's correct, try also passing Window properties, rather than FieldPickerWindow properties.

                          Comment


                            #14
                            okay thank you... the hilitesWindow is working now! But the the editFields Window does not work... I tried the following:

                            Code:
                                            Window properties = new Window();
                                            properties.setIsModal( true );
                                            properties.setShowModalMask( true );
                                            properties.setModalMaskOpacity( 50 );
                                            listGrid.setAutoChildProperties( "fieldPickerWindow", properties );
                            
                                            listGrid.editFields();

                            Code:
                             FieldPickerWindow properties = new FieldPickerWindow();
                                            properties.setIsModal( true );
                                            properties.setShowModalMask( true );
                                            properties.setModalMaskOpacity( 50 );
                                            listGrid.setAutoChildProperties( "fieldPickerWindow", properties );
                            
                                            listGrid.editFields();

                            Click image for larger version

Name:	modal.jpg
Views:	105
Size:	43.4 KB
ID:	248269

                            Thanks
                            Andy




                            Comment


                              #15
                              Ok,we'll take a look and get back to you

                              Comment

                              Working...
                              X