cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with VBox or Vertical layout

Former Member
0 Kudos


Hi Experts,

I have a page in which I have a subheader containing two combobox for which data is getting populated from models.

But then after I used VBOX/VerticalLayout under Subheader then i am not getting values for second comboBox. Although when i used HBOX or HorizontalLayout both the combobox are working fine.

Please find my view.XML file below:

<core:View xmlns:core="sap.ui.core"

xmlns:mvc="sap.ui.core.mvc"

xmlns:l = "sap.ui.layout"

xmlns="sap.m" controllerName="view.View1"

xmlns:html="http://www.w3.org/1999/xhtml">

<Page title="Timesheet">

<headerContent>

      <Label text = "Dhiraj"></Label>

    </headerContent>

    <subHeader>

    <Toolbar height ="8rem" >

    <l:VerticalLayout>

        <ComboBox id ="idComboBox"  items="{dmodel>/ProductCollection}">

        <core:Item key="{dmodel>Productid}" text="{dmodel>Name}" />

      </ComboBox>

      <ComboBox id ="idComboBox1"  items="{lmodel>/Location}">

        <core:Item key="{lmodel>locid}" text="{lmodel>locname}" />

      </ComboBox>

    </l:VerticalLayout>

    </Toolbar>

    </subHeader>

   

  <content>

 

  </content>

</Page>

</core:View>

I want to know what is the reason only one combobox is working when i am working with VBOX.

Thank You in advance..

Regards,

Dhiraj More

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

try using ListItem instead of Item and run the code, below is the example for that,

Edit fiddle - JSFiddle

regards,

Nagarjun

Answers (0)