on 07-09-2017 4:01 PM
Hello experts,
I have an application that getting a table of data from Ecc and displaying it in a table.
in the table all the data displayed ColumnListItem.
one field content is icon for example : "sap-icon://multiselect-all".
The problem is that the icon is not displayed in the table .
<items>
<ColumnListItem
type="Navigation"
press="onPress">
<cells>
<Text
text="{Xblnr}"/>
<Text
text="{Bldat}"/>
<Text
text="{Wrbtr}"/>
<Text
text="{Waers}"/>
<Text
text="{Invoice_Name}"/>
<Text
text="{CREATE_DATE}"/>
<Text
text="{Status}"/>
<Text
text="{Status_Url}"
src="{Status_Url}"
icon="{Status_Url}"/>
</cells>
</ColumnListItem>
</items>
is it possible to display different icons in the table lines?
Thank you.
Sorry I am confused with what you are doing
<Text
text="{Status_Url}"
src="{Status_Url}"
icon="{Status_Url}"/>
why do you have icon and src properties in sap.m.Text control?
-D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I am new to this world of ui5.
But i have a task to do.
I look at the example in step 15
but its still not working for my.
<items>
<ColumnListItem
type="Navigation" press="onPress">
<cells>
<Text text="{Xblnr}"/>
<Text text="{Bldat}"/>
<Text text="{Wrbtr}"/>
<Text text="{Waers}"/>
<Text text="{Invoice_Name}"/>
<Text text="{CREATE_DATE}"/>
<Text text="{Status}"/>
<Text text="{Status_Url}" factory= "{.productListFactory}"/>
</cells> </ColumnListItem>
I also add code in the Main.Controller
productListFactory : function(sId,oContext) {
var oUIControl = null;
// This item is out of stock and discontinued
//
if (oContext.getProperty("Status_Url") === 1 ) {
// Yup, so use a
// StandardListItem
oUIControl = new sap.m.StandardListItem(sId, {
icon : "sap-icon://warning",
infoState : "Error"
});
return oUIControl; } },
Any help will be appreciated.
Thank you.
Hello Sharath,
Thank you for the answer.
I changed the code but its not working for me.
in the .XML
<items>
<ColumnListItem
type="Navigation"
press="onPress">
<cells>
<Text
text="{Xblnr}"/>
<Text
text="{Bldat}"/>
<Text
text="{Wrbtr}"/>
<Text
text="{Waers}"/>
<Text
text="{Invoice_Name}"/>
<Text
text="{CREATE_DATE}"/>
<Text
text="{Status}"/>
<Image
image="{Status_Url}"
factory= "{.productListFactory}"/>
</cells>
</ColumnListItem>
</items>
In The controller.js
productListFactory : function(sId,oContext) {
var oUIControl = null;
//
if (oContext.getProperty("Status_Url") === 1 ) {
// Set icone
oUIControl = new sap.m.StandardListItem(sId, {
icon : "sap-icon://warning",
infoState : "Error"
});
return oUIControl;
}
},
Can you help me with the code?
Thank you.
User | Count |
---|---|
83 | |
9 | |
9 | |
8 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.