0

我有一个具有布尔属性 IsGroup 的 MachineProcess 实体,在 AddandEditMachineProcess 屏幕中,我希望选项卡 PartGroup 根据值 IsGroup 更改可见性。我的代码如下所示,它不起作用。

 myapp.AddEditMachineProcess.Details_postRender = function (element, contentItem) {
// Write code here.  
contentItem.details.addChangeListener("IsGroup", function (e) {
    var isGroup = contentItem.value.MachineProcess.isGroup;
    var partGroup  = contentItem.findItem("PartGroups");
    if(isGroup){partGroup.isVisible}});};

请帮助正确的代码,谢谢!

4

1 回答 1

0

基于布尔值是真还是假,我有类似的东西。如果这个布尔值保存在数据库的表中,那么这样的事情将起作用:

if (screen.MachineProcess.IsGroup == true) {
    screen.findContentItem("PartGroups").isVisible = true;
}
else
{
    screen.findContentItem("PartGroups").isVisible = false;
}
于 2015-01-02T11:57:13.333 回答