2017-03-03 61 views
0

早上好!对话框上的搜索字段 - SAPUI5

我的下手SAPUI5工作

如何我可以在对话框中设置一个搜索字段(sap.m.SearchField)?

谢谢

+0

请提供你的代码。 StackOverflow是一个平台,用于帮助您使代码正常工作,而不是为您解决问题。 – Technotronic

回答

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" 
          }) 
         ] 
        }) 
       ] 
      });