Skip to Content
0
Former Member
Oct 22, 2012 at 01:47 PM

How can I use the value of a singleRowSelect as src for an image

29 Views

Hi,

Does anybody knows how I can use the value of a SingleRowSelect as the src for an image.

I can only find exemples where they use the SingleRowSelect function to fill a textfield:

e.g.

productDetailsLayout.createRow(

new sap.ui.commons.Label({text:"Model", width:"100px"}),

new sap.ui.commons.TextField("model",{editable:false, width:"150px", value : "{model}", required : true}),

new sap.ui.commons.Label({text:"Description", width:"100px"}),

new sap.ui.commons.TextField("description",{editable:false, width:"150px", value : "{description}", required : true}),

new sap.ui.commons.Label({text:"Price", width:"100px"}),

new sap.ui.commons.TextField("price", { editable: false, width: "200px", value: "{price}", required: true }),

new sap.ui.commons.Label({ text: "Image", width: "100px" }),

new sap.ui.commons.Image({src: "{detail_url}", width: "200px", height: "200px"})

);

With this code all the textfields will be filled with the selected data, but I can't show the image.

So If anyone knows what I have to change in line 9 in the code above, please tell me!

Thanks,

Robbe Wuyts

Attachments

scrn1.png (34.2 kB)