Announcement

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

    DynamicForm ComboBoxItem static appearance

    Hi,

    Fields with a ComboBoxItem editor type in a DynamicForm no longer display correctly when read-only and their ReadOnlyDisplayAppearance is STATIC.
    Other item types like TextItem and DateItem don't have this issue.

    Using latest Chrome browser and SmartGWT version v14.1p_2026-06-10/Pro Deployment.
    I also tested it using SmartGWT version v14.1p_2026-04-01/Pro Deployment, using that older build everything displays statically as expected.

    Click image for larger version

Name:	SGWT_issue_static_readonly_01.png
Views:	7
Size:	3.1 KB
ID:	277580
    In this example:
    A -> is read-only and contains text but does not display statically
    B -> is editable and displays as expected
    C -> is read-only and contains no value, does not display statically
    D -> is a TextItem instead of a ComboBoxItem, displays as expected

    Associated test case code:
    Code:
    @Override
        public void onModuleLoad()
        {
            ComboBoxItem aItem = new ComboBoxItem("a", "A");
            aItem.setCanEdit(false);
            ComboBoxItem bItem = new ComboBoxItem("b", "B");
            bItem.setCanEdit(true);
            ComboBoxItem cItem = new ComboBoxItem("c", "C");
            cItem.setCanEdit(false);
            TextItem dItem = new TextItem("d", "D");
            dItem.setCanEdit(false);
            DynamicForm form = new DynamicForm();
            form.setItems(aItem, bItem, cItem, dItem);
            form.setCanEdit(true);
            form.setReadOnlyDisplay(ReadOnlyDisplayAppearance.STATIC);
    
            com.smartgwt.client.data.Record record = new com.smartgwt.client.data.Record();
            record.setAttribute("a", "A value");
            record.setAttribute("b", "B value");
            record.setAttribute("c", (String) null);
            record.setAttribute("d", "D value");
            form.editRecord(record);
    
            form.draw();
        }

    #2
    There has indeed been a change in this area - which framework version and browser are you using?

    Comment


      #3
      In fact, that effect (of showing a shrunken box with no content) should already have been fixed, about a month ago.

      Comment


        #4
        Following up, it turns out that the fix wasn't ported back to 14.1 - we'll do it now, for today's builds dated June 11.

        Comment

        Working...
        X