在对话框上搜索字段 - SAPUI5

时间:2017-03-03 15:09:42

标签: sap sapui5

早上好!

我开始使用SAPUI5

如何在对话框上设置搜索字段(sap.m.SearchField)?

谢谢

1 个答案:

答案 0 :(得分:0)

我建议:

new Dialog({
                title: 'Available Products',
                content: new List({
                    items: {
                        path: '/ProductCollection',
                        template: new StandardListItem({
                            title: "{Name}",
                            counter: "{Quantity}"
                        })
                    }
                }),
                beginButton: new Button({
                    text: 'Close',
                    press: function() {
                        that.pressDialog.close();
                    }
                }),
                subHeader: [
                    new sap.m.Bar({
                        contentMiddle: [
                            new sap.m.SearchField({
                                width: "100%",
                                value: "Search Term"
                            })
                        ]
                    })
                ]
            });