on 11-12-2007 4:13 AM
Hello,
My table is binded to a structure, and I plan to use once column to display different images depending on a particular criteria, which is determined during the page init.
I tried to change the properties of the cell on the said column, but I dont see an imageSource property. Nor did I see on the editor column when binding a table to a structure an image type. Currently, the cells under the columns are set to TextView.
And I plan to use SAP icons for my images.
Anybody knows how to do this? Thanks.
regards,
arnold
Hi Arnold
First copy all your images into "project/src/mimes/components/<packagename>"
1) First create a new column for image and insert Child "Image" UI Element
2) Create a Context in a view in which you are using Image UI Element
3) Value Node
Name : <b>Image</b>
Cardidality : <b>1..1</b>
4) create 2 Value Attributes
4)a <b>ImageAlt</b> (Calculate property - true)
4)b <b>ImageSrc</b> (Calculate property - true)
5)Bind the properties of Image
alt - <b>Image.ImageAlt</b>
source - <b>Image.ImageSrc</b>
6) in <b>getImageSrc()</b>
{
//according to your condition use your image
retrun "XX.gif"
}
7) in <b>getImageAlt()</b>
{
return "Image Not Available"
}
<u>Case 2 :</u>
1) Add a new String attribute to your existing context
2) Right click on your table in RootUIElememntContainer
3) Edit Sturcture Binding
4) Select the context which you modified , Select next
5) in the next step for the newly created attribute select imageUIElement as type
If you want to use that in wdDoinit()
bind the two string value attributes to alt and source properties of ImageUIElement and write the following code
in doinit
wdContext.currentContextElement.set<src>("img1.gif") ;
wdContext.currentContextElement.set<alt>("Image not found") ;
Best Regards
Chaitanya.A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi arnold
Pl have a look at this Blog it has more than you need.
/people/anilkumar.vippagunta2/blog/2007/02/20/reading-and-writing-images-from-sqlserver-in-webdynpro
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.