cancel
Showing results for 
Search instead for 
Did you mean: 

List Box in fiori

Former Member
0 Kudos

Hi experts

can anyone tell how to code for list box in fiori using odata services

as no documents are available...being new  to fiori, am unable to the exact code for controllers.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member203031
Contributor
0 Kudos

Hi Neeraja,

Do you want to display the items in the listbox using OData or Some thing else...?

Thanks,

Deepak Raj.

Former Member
0 Kudos

Hi deepak,

Yes,need to display the items in the list box.

This is tabular format we made...but as there are more line items,we need to provide a list box for few item like Year model( 200AFWD,200CFWD,LIMITED RWD))etc, which should give the sales value and sales quantity respectively.

how can we acheve this??

SergioG_TX
Active Contributor
0 Kudos

like this example?

SAPUI5 Explored

former_member203031
Contributor
0 Kudos

Hi Neeraja,

As i understood your requirement that you need to display in the form of list instead of tables...

Is this correct the image shown below:

if Yes please have a look at this link

SAPUI5 Explored  

You can find the listbox like object list item.

Still if u have any doubt please reply me..


Thanks,

Deepak.

Former Member
0 Kudos

Hi,Thanks for your quick reply

Yes,A kind of !!! But here all the'Product' are listed out.I need the a list box or combo box where user can select the year and product which give the result respectively.

I am following SAPUI5 Explored for reference but can find any samples for list box or combo box and they have hard coded the values,but am using data from OData services so its difficult to relate as i am new to fiori.

Former Member
0 Kudos

This is the way i have coded...but need to include selection parameters where user can select what thaey need to disply...Eg: if he select Year and Model he should get the respective sales qty and sales value Now all the line item are displayed which is looking odd if there are lots of models

former_member203031
Contributor
0 Kudos

Then it is better for you to use SplitApp.

In the master page you can how the list of items with the year and product.

After selecting the particular item then in the detail page you display the respective values.

You can refer this link: for the SPLITAPP masterpage to detailpage

SAPUI5-SplitApp/splitapp/WebContent/splitapp at SAPUI5-basics · Deepak1204/SAPUI5-SplitApp · GitHub

Thanks,

Deepak Raj.

Former Member
0 Kudos

hey deepak!!

Did u meant this??

I have already a master list on my left from where the column list is obtained as shown .Is that u called as splitapp??? if so from that column list i need to include some selection parameters to make my result confined as said above

any solution????

former_member203031
Contributor
0 Kudos

Yes it is the SPLITAPP.

Then you want to display the list in the detail page also..

if not as you asked in the combobox you can add the items and after selection you can display the respective values.

Combo Box you have properties like text  and additional text.

Former Member
0 Kudos

do u have any sample codes for combo box or list box??

former_member203031
Contributor
0 Kudos

S sure.

This is the sample piece of code for the combobox.

new sap.ui.commons.ComboBox("c1",{

     width:"250px",

     placeholder:"Select",

    displaySecondaryValues:true,

    "association:listBox": new sap.ui.commons.ListBox({

    items:{

              path:"/results",

              template:new sap.ui.core.ListItem({

                                   text: "{Product_Name}",additionalText:"{Year}"

                              }),         //closing for list item

         }                  // closing for items

    }),          //closing  for listBox

})          //Closing for ComboBox

I hope it will helps you.




Thanks,

Deepak Raj.

Former Member
0 Kudos

Thank you deepak.I will try this