Announcement

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

    data source fields of type="sequence" don't render property in dynamic forms

    In smartGWT 12.1 I have an dynamic form that presents a selectItem with a pulldown of primary key values to choose as well as the rows other field values. In 13.0 the selectItem does not render at all. When I changed the data source field's type value from sequence to integer, proper functionality returned. I'm assuming this break was not intentional.

    details:

    Code:
    <fields>
    
            <field name="pk" hidden="true" primaryKey="true" type="integer" />
            <field name="isBookmark" title="Is Bookmark" hidden="true" type="boolean" sqlStorageStrategy="number" />
            <field name="userName" title="User Name" hidden="true" type="text" length="255" />
            <field name="bookmarkName" title="Bookmark Name" type="text" length="255" />
            <field name="bookmarkDate" title="Date Created" type="date" />
            <field name="bookmarkURL" title="URL" type="text" length="255" />
    
            <field name="viewState" type="text" customSQL="true" tableName="BCG_UIViewStateComponents" />
            <field name="componentId" type="text" customSQL="true" tableName="BCG_UIViewStateComponents" />
    
        </fields>
    Code:
            ListGrid pickListProperties = new ListGrid();
            pickListProperties.setShowFilterEditor(true);
    
            ListGridField pkField = new ListGridField("pk");
            ListGridField bookmarkNameField = new ListGridField("bookmarkName");
            bookmarkNameField.setWidth(250);
            ListGridField bookmarkURLField = new ListGridField("bookmarkURL","URL");
            bookmarkURLField.setWidth(250);
            ListGridField usrNameField = new ListGridField("userName");
            ListGridField dateField = new ListGridField("bookmarkDate","Date");
            ListGridField isBookmarkField = new ListGridField("isBookmark");
    
    
            bookmarkIDSelectItem = new SelectItem("pk", "ViewStateId");
            bookmarkIDSelectItem.setWrapTitle(false);
            bookmarkIDSelectItem.setOptionDataSource(DS_NAME_ISO_UIViewState);
            bookmarkIDSelectItem.setPickListWidth(900);
            bookmarkIDSelectItem.setPickListFields(pkField, bookmarkNameField ,bookmarkURLField ,usrNameField ,dateField ,isBookmarkField);
            bookmarkIDSelectItem.setPickListProperties(pickListProperties);
            bookmarkIDSelectItem.addChangedHandler((ChangedEvent event) -> {
                  // does stuff  ...
            });
    
            final DynamicForm changebookmarkForm = new DynamicForm();
            changebookmarkForm.setWidth(250);
            changebookmarkForm.setNumCols(2);
            changebookmarkForm.setItems(bookmarkIDSelectItem);
            changebookmarkForm.setDataSource(DS_NAME_ISO_UIViewState);
            changebookmarkForm.setValuesManager(valuesManager);
    
            bookmarkIDSelectItem.setValue(Integer.parseInt(currentValueVariable));




    #2
    Hi
    We're not seeing an obvious reason for this and a preliminary investigation hasn't revealed a culprit.

    Can we get some more information here:
    - Firstly if you open the Developer Console in the 13.0 branch where the SelectItem fails to render, are there any warnings or JavaScript errors?

    - Secondly - we're assuming that when the SelectItem is rendered you'll be seeing a fetch against the dataSource. If you open the "RPC" tab of the Developer Console and enable tracking RPCs you should see this request and response. Can you confirm whether the fetch is succeeding, and if so what the response data looks like. If it includes multiple records, feel free to just show us one sample record from the response and scrub out any sensitive data, etc.

    - Thirdly - this line in the code above attaches the form to a ValuesManager: changebookmarkForm.setValuesManager(valuesManager);
    You haven't shared the source for that valuesManager. Can you create a simplified version of the form that doesn't bind to the valuesManager and see if the problem persists?

    Ultimately we may need to see a complete simplified test case that we can run to see the problem in action but we're hoping the above questions may give us enough information to shed some light on what's going on here

    Thanks
    Isomorphic Software

    Comment


      #3
      Reviewing the code more closely, I found that this admin/debug tool had been expanded at least 3 times, asking the values manager to manage values from two data sources(I don't think that was intentional), with the tool involving forms from 3 data sources. It really needs a ground up redesign. As this form is really independent of the other data sources, and just used to initialize/change the other elements in the UI, it needed to be independent. Interestingly enough, it wasn't enough to remove the changebookmarkForm.setValuesManager(valuesManager) line, but I also needed to remove changebookmarkForm.setDataSource(DS_NAME_ISO_UIViewState) in order for the SelectItem to render. At this point, I'm going to move on to higher priority issues, though would give you the code in it's entirety if you wanted to chase down anything on your side.

      After removing the intertwined data source assignments, the console did not show anything useful.

      Comment


        #4
        Hi
        Since we're not aware of any framework bugs that would be responsible for what you're seeing, we don't really have enough information to speculate on a cause in application code, and this isn't a priority for you, we're going to leave this one for now.

        If this becomes urgent again, please let us know and we'll revisit it!

        Regards
        Isomorphic Software

        Comment

        Working...
        X