Announcement

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

    ButtonItem visibility bug

    Hi there,
    There seems to be a bug with the "visible" attribute in button items.
    I have a toolbar with two button items, the first (invisibleButton) has set the visible attribute to false right on creation. The second button does not specify a value for the visible attribute. Now when we look at the result, both buttons are visible. The invisibleButton returns false for "visible" as expected, but true for isVisible() (See screenshot below).
    The documentation shows that visible can be set on creation: http://www.smartclient.com/smartclie...onItem.visible

    This is reproducible with the latest versions of firefox, chrome, IE11 and the latest nightly of smartclient (SmartClient_v110p_2016-10-08_Pro)

    Click image for larger version

Name:	image.png
Views:	43
Size:	16.2 KB
ID:	240684
    Code:
    isc.DynamicForm.create({
        "ID" : "myForm",
        "hideUsingDisplayNone" : false,
        "numCols" : 2,
        "titleSuffix" : "",
        "width" : "500",
        "autoFocus" : true,
        "selectOnFocus" : true,
        "readOnlyDisplay" : "static",
        "fields" :
        [{
                "type" : "toolbar",
                "width" : "100%",
                "readOnlyDisplay" : "static",
                "showIcons" : true,
                "buttons" :
                [{
                        "ID" : "invisibleButton",
                        "name" : "invisibleButton",
                        "title" : "Should not be visible",
                        "type" : "button",
                        "width" : "100%",
                        "visible" : false,
                        "readOnlyDisplay" : "static",
                    }, {
                        "ID" : "visibleButton",
                        "name" : "visibleButton",
                        "title" : "Should be visible",
                        "type" : "button",
                        "width" : "100%",
                        "readOnlyDisplay" : "static",
                    }
                ],
                "createButtonsOnInit" : true
            }
        ],
        "values" : {}
    });

    #2
    This looks looks to be exactly the same question you posted in May, and the answer is the same.

    Comment

    Working...
    X