Announcement

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

    Exception setting PickListProperties for ComboBoxItem

    Hi Isomorphic,

    Something changed between the 2025-01-13 and 2025-01-25 SmartGWT 13.1p builds that is causing the following exception:

    Code:
    ConsoleLogger.java:33 Error: java.lang.IllegalStateException: *ReferenceItem.setPickListProperties(): the ListGrid passed as configuration properties has been initialized and/or drawn. Calling draw(), fetchData() and other key methods will force a component to initialize, after which it cannot be used as configuration properties.
        at bxy_g$.BC_g$ [as createError_0_g$] (Throwable.java:114:1)
        at bxy_g$.MC_g$ [as initializeBackingError_0_g$] (Throwable.java:106:1)
        at bxy_g$.uC_g$ (Throwable.java:66:1)
        at bxy_g$.aD_g$ (Exception.java:29:1)
        at bxy_g$.iD_g$ (RuntimeException.java:29:1)
        at new bxy_g$ (IllegalStateException.java:28:1)
        at e4g_g$ (ConfigUtil.java:60:1)
        at Xyo_g$.C9k_g$ [as setPickListProperties_0_g$] (ComboBoxItem.java:3015:1)
    I've tracked it down to calling setFetchOperation on the ListGrid used to configure the ComboBoxItem.

    Thanks.

    #2
    Can you provide sample code to reproduce the issue? We want to see this in context. Perhaps you can modify one of the Showcase samples?

    Comment


      #3
      Hi Isomorphic,

      it’s most likely related to this fix:
      https://forums.smartclient.com/forum...657#post274657

      Best regards
      Blama

      Comment


        #4
        Thanks Blama.

        I was able to reproduce it with the following Showcase sample:
        https://smartclient.com/smartgwt/sho...tifield_search

        Set the Fetch Operation on the pickListProperties instance.

        Code:
        ListGrid pickListProperties = new ListGrid();
        pickListProperties.setShowFilterEditor(true);
        pickListProperties.setFetchOperation("custom");
        In this case, it's a SelectItem, but the problem exists with a ComboBoxItem as well.

        Thanks

        Comment


          #5
          Thanks for providing context. In some cases the exceptions thrown by that check are valid and prevent subtle bugs. In this case, however, it looks like the ListGrid configuration "template" is being unexpectedly instantiated. We're looking into a fix now.

          Comment


            #6
            Isomorphic,

            Has this been fixed. We are no longer seeing this exception with the Feb 4 builds of 13.1p and 14.1d.

            Thanks

            Comment


              #7
              We can confirm. Fixes were applied to SGWT 13.1+ by 1/31 and should be in builds dated 2/02 and beyond on all affected branches.

              Comment


                #8
                OK, thanks.

                Comment

                Working...
                X