on 07-20-2016 12:26 PM
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.
Hi Neeraja,
Do you want to display the items in the listbox using OData or Some thing else...?
Thanks,
Deepak Raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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??
like this example?
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
You can find the listbox like object list item.
Still if u have any doubt please reply me..
Thanks,
Deepak.
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.
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
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.
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.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.