Sapui5 如何在headertoolbar中提供新行?

Sapui5 如何在headertoolbar中提供新行?,sapui5,Sapui5,我正在使用sap.m.table创建一个表。为此,我需要创建一个headertoolbar 我的问题是,如何使用sap.m.table的聚合headertoolbar在单独的行中创建元素(每行一项) 解决方案在js视图中,请根据需要调整宽度 XML视图中的解决方案 plz用Javascript为我提供了解决方案:我的标题工具栏中有5个按钮,搜索就是其中之一。我想把搜索按钮放在第二行,我将如何实现它? headerToolbar: [ new sap.m.Toolbar({ heigh

我正在使用sap.m.table创建一个表。为此,我需要创建一个headertoolbar

我的问题是,如何使用sap.m.table的聚合headertoolbar在单独的行中创建元素(每行一项)

解决方案在js视图中,请根据需要调整宽度

XML视图中的解决方案


plz用Javascript为我提供了解决方案:我的标题工具栏中有5个按钮,搜索就是其中之一。我想把搜索按钮放在第二行,我将如何实现它?
headerToolbar: [
  new sap.m.Toolbar({
    height: 'auto',
    content: [
      new sap.m.VBox({
        items: [
          new sap.m.HBox({
            items: [
              new sap.m.SearchField({
                placeholder: "search"
              })
            ]
          }),
          new sap.m.HBox({
            items: [
              new sap.m.Button({
                text: "One"
              }),
              new sap.m.Button({
                text: "Two"
              }),
              new sap.m.Button({
                text: "Three"
              }),
              new sap.m.Button({
                text: "Four"
              }),
              new sap.m.Button({
                text: "Five"
              })
            ]
          })
        ]
      })
    ]
  })
]
<headerToolbar>
  <Toolbar height='auto'>
    <content>
      <VBox>
        <Text text="Text one" />
        <Text text="Text two" />
        <Text text="Text three" />
        <Text text="Text four" />
      </VBox>
    </content>
  </Toolbar>
</headerToolbar>