将模型添加到 SplitApp 时,SAPUI5 SplitApp 主视图不隐藏

SAPUI5 SplitApp Master view not hiding when adding model to SplitApp

在其中一个详细信息页面中,我在 xml 中定义了 table:

<core:View controllerName="myapp.view.personal.detail.created_tasks.createdtasks"
    xmlns="sap.m"   xmlns:core="sap.ui.core" >

    <Page
        id="created_tasks_page"
        title="Created tasks" >
        <content>

            <Table
                id="users_table"
                items="{/userdata}">
                <columns>
                    <Column
                        minScreenWidth=""
                        demandPopin="false" >
                        <Label
                            text="First name" >
                        </Label>
                    </Column>

                    <Column
                        minScreenWidth=""
                        demandPopin="false" >
                    <Label
                            text="Last name" >
                        </Label>
                    </Column>

                    <Column
                        minScreenWidth="Small"
                        demandPopin="true">
                        <Label
                            text="Email" >
                        </Label>
                    </Column>

                    <Column
                        minScreenWidth="Small"
                        demandPopin="true">
                        <Label
                            text="Per. no." >
                        </Label>
                    </Column>

                    <Column
                        minScreenWidth="Small"
                        demandPopin="true">
                        <Label
                            text="Gender" >
                        </Label>
                    </Column>
                </columns>
                <items>
                    <ColumnListItem>
                        <cells>
                            <Text id="tFirst" text="{firstName}" />
                            <Text id="tLast" text="{lastName}" />
                            <Text id="tEmail" text="{email}" />
                            <Text id="tPerno" text="{persno}" />
                            <Text id="tGender" text="{gender}" />
                        </cells>
                    </ColumnListItem>
                </items>
            </Table>                        

        </content>
    </Page>
</core:View>

当我不向 table 投标数据时,主视图隐藏,按钮显示正常。但是当我将数据绑定到 table 时,例如:

onAfterRendering: function() {
        var oModel = new sap.ui.model.json.JSONModel("model/user_data.json");

        var oTable = this.byId("users_table");

        oTable.setModel(oModel);
},

主视图停止工作。你知道是什么问题吗?

我尝试在详细控制器中设置模型,但是当我在主控制器中设置模型时它工作正常。要查找所需的元素,请使用

sap.ui.getCore().byId(viewId + "--" + elementId);