Announcement

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

    ListGrid Field Picker dialog questions

    Be sure your post includes:

    1. SmartClient Version: SNAPSHOT_v8.3d_2012-07-18/LGPL Development Only (built 2012-07-18)

    2. Browser: IE9

    Some of my grids show a menu structure for selecting the fields to show (with the Column titles appearing in a submenu with check marks in front of them). Other grids show a "Columns..." menu item that brings up a dialog titled "Field Picker" for selecting the columns.

    Question 1: Can you tell me what controls whether or not the dialog is used instead of a submenu? I can't figure out what's different between my two grids.

    Issue 1: When saving the changes in the field picker dialog, the grid columns change and the view state changes, but the ViewStateChanged event is not fired so I don't know the state has changed and cannot save the user preferences.

    Issue 2: The field picker dialog has left/right buttons in the middle. They are refering to graphical assets that do not appear to be in the smartgwt jar for the Enterprise theme so I don't get the graphics.

    Issue 3: There is a button in the right-hand list in the dialog for editing the grid highlights (button is titled "Highlights..."). Is there a way to get the Field Picker dialog to NOT show this button if I don't want the user to be able to edit the grid highlights?

    #2
    Originally posted by pgrever View Post
    Be sure your post includes:

    1. SmartClient Version: SNAPSHOT_v8.3d_2012-07-18/LGPL Development Only (built 2012-07-18)

    2. Browser: IE9

    Some of my grids show a menu structure for selecting the fields to show (with the Column titles appearing in a submenu with check marks in front of them). Other grids show a "Columns..." menu item that brings up a dialog titled "Field Picker" for selecting the columns.

    Question 1: Can you tell me what controls whether or not the dialog is used instead of a submenu? I can't figure out what's different between my two grids.
    The new feature is triggered by two properties on the ListGrid:

    1. ListGrid.useAdvancedFieldPicker
    2. ListGrid.advancedFieldPickerThreshold

    These should be documented, but the first obviously is an on/off switch, and the second indicates the minimum # of fields (across the top of the ListGrid) that have to be present before the FieldPicker will launch if enabled by the first property--I believe its default is 25.

    Originally posted by pgrever View Post
    Issue 1: When saving the changes in the field picker dialog, the grid columns change and the view state changes, but the ViewStateChanged event is not fired so I don't know the state has changed and cannot save the user preferences.

    Issue 2: The field picker dialog has left/right buttons in the middle. They are refering to graphical assets that do not appear to be in the smartgwt jar for the Enterprise theme so I don't get the graphics.
    We'll have to look into these.

    Originally posted by pgrever View Post
    Issue 3: There is a button in the right-hand list in the dialog for editing the grid highlights (button is titled "Highlights..."). Is there a way to get the Field Picker dialog to NOT show this button if I don't want the user to be able to edit the grid highlights?
    You can disable the hilights button by setting a property on the nested FieldPicker AutoChild when you create the ListGrid. It would look something like this:

    Code:
    isc.ListGrid.create({
        ID: "myListGrid",
        fieldPickerWindowProperties : {
            fieldPickerProperties: {
                showHilitesButton: false
            }
        }
    });
    That property should also be documented.

    Comment


      #3
      The new feature is triggered by two properties on the ListGrid:

      1. ListGrid.useAdvancedFieldPicker
      2. ListGrid.advancedFieldPickerThreshold

      These should be documented, but the first obviously is an on/off switch, and the second indicates the minimum # of fields (across the top of the ListGrid) that have to be present before the FieldPicker will launch if enabled by the first property--I believe its default is 25.
      Are these available from java or only java script? I cannot find any methods on the java class ListGrid with names similar to those you mention. Do I need to set them from something like load_skins.js and these are the string literals to use for the property names?

      When you say these should be documented to you mean that they need to be documented but they are not, or do you mean I should be able to find the documentation. I've searched on these names and could not find anything. If they are documented, where can I find the documentation?

      You can disable the hilights button by setting a property on the nested FieldPicker AutoChild when you create the ListGrid. It would look something like this:

      Code:
      isc.ListGrid.create({
          ID: "myListGrid",
          fieldPickerWindowProperties : {
              fieldPickerProperties: {
                  showHilitesButton: false
              }
          }
      });
      That property should also be documented.
      Where is this documented? Can this be done from Java or only javascript? I am typically writing my code in java and doing a "new ListGrid()", not a "create" from js.

      Comment


        #4
        I was able to get things to work in my java code by doing the following in a class that extends ListGrid:

        Code:
        setAttribute("useAdvancedFieldPicker", true, true);
        setAttribute("advancedFieldPickerThreshold", 0, true);
        String fieldPickerWindowProperties = "{fieldPickerProperties:{showHilitesButton:false}}";
        setAttribute("fieldPickerWindowProperties", JSOHelper.eval(fieldPickerWindowProperties), true);
        Is this reasonable? Is there more documentation on other fieldPickerProperties I can set? Are there other things similar to the fieldPickerWindowProperties in the ListGrid that I can use to configure things like the hilites dialog?

        Comment


          #5
          Originally posted by pgrever View Post
          I was able to get things to work in my java code by doing the following in a class that extends ListGrid:

          Code:
          setAttribute("useAdvancedFieldPicker", true, true);
          setAttribute("advancedFieldPickerThreshold", 0, true);
          String fieldPickerWindowProperties = "{fieldPickerProperties:{showHilitesButton:false}}";
          setAttribute("fieldPickerWindowProperties", JSOHelper.eval(fieldPickerWindowProperties), true);
          Is this reasonable? Is there more documentation on other fieldPickerProperties I can set? Are there other things similar to the fieldPickerWindowProperties in the ListGrid that I can use to configure things like the hilites dialog?
          As this is a new feature, it looks as if the visibility of the Java APIs and documentation is limited at this point. I will check whether they can be made fully visible for SmartGWT.

          For now, yes, that's a reasonable approach.

          Comment


            #6
            We've decided to switch this off by default in SGWT 3.1d (SC 8.3d) and release it as a fully documented feature for SGWT 3.2.

            The properties mentioned above will still be available for controlling the feature, but it won't be officially supported in this release.

            Comment


              #7
              Originally posted by pgrever View Post
              Issue 1: When saving the changes in the field picker dialog, the grid columns change and the view state changes, but the ViewStateChanged event is not fired so I don't know the state has changed and cannot save the user preferences.
              I confirmed this and it will be addressed.

              Originally posted by pgrever View Post
              Issue 2: The field picker dialog has left/right buttons in the middle. They are refering to graphical assets that do not appear to be in the smartgwt jar for the Enterprise theme so I don't get the graphics.
              I verfied that those images show up fine in the latest development SC and SGWT zips. In particular, in SGWT, that image shows up for me as:

              http://localhost:8080/showcase/sc/skins/Enterprise/images/actions/forward.png

              There was an issue with the images addressed early on, so you may just need a newer ZIP file. If a newer version doesn't solve this issue for you, please provide more details, such as what is shown under "properties" in IE when you right click over the missing image in your browser.

              Comment


                #8
                Originally posted by Isomorphic View Post
                I confirmed this and it will be addressed.
                Can you clarify whether this will be addressed in 3.1 (even if it is not 'officially supported' until 3.2)?

                Comment


                  #9
                  It should be, right now that fix is sitting with some other changes that haven't entered the code stream yet but should shortly.

                  Comment


                    #10
                    (Referring to solution for issue 3- disabling highlites button)How do we know that what all properties can be set this way?And how to eval multiple properties.For example i want to disable highlites button, disable side buttons for changing column ordering, change title of this field picker dialog box.
                    I am not enabling this dialog through setUseAdvancedFieldPicker();

                    I have called the dialog using editFields() on a click of a button.Now i want to change properties on this dialog.
                    Any help?

                    I am using:-

                    BuildDate Wed Mar 05 15:52:00 IST 2014
                    Version 4.1p
                    SCVersionNumber v9.1p_2014-03-05
                    Last edited by mchoudhary; 19 Aug 2014, 21:30.

                    Comment


                      #11
                      The field picker dialog is an instance of FieldPicker, so you can set the documented configuration properties to change how it appears or behaves.

                      If there is some specific configuration you need which doesn't have a publicly documented way to control, we may be able to point you to the right way to achieve what you're after, or you could either sponsor a feature to achieve it, or potentially roll your own UI control instead of going through the standard field picker interface.

                      Regards
                      Isomorphic Software

                      Comment

                      Working...
                      X