on 11-19-2009 12:06 PM
Hi All,
I have a requirement where in the business wants to have a Traffic light associated with one of the Search Result Table as the first column. The traffic light will suggest the End User, the status based on which decesions or processings will be taken care.
I tried getting certain information in the SDN but alas! had no luck which suits the requirement. I request you all to come out with your suggestions and approach that will give me the insight to head on with the requirement.
Please let me know if you need any additional information.Many thanks!
Regards
DK
DK,
It is simple. In the Result Table Create Table Cell Editor- Type - Image and map image source to a String Context variable.
Use the below code to get image Dynamically and do not forget to add images to Mimes - Components Folder.
if(inputValue.intValue() == 0){
returnButtonImage = "Green.GIF";;
}else if(RISK_LOW_MIN){
returnButtonImage = "Yellow.GIF";;
}else if(RISK_MEDIUM_MIN){
returnButtonImage = "Orange.GIF";;
}else{
returnButtonImage = "Red.GIF";;
}
Let me know, if you need more information.
Thanks,
Sridhar
Edited by: Sridhar k on Nov 19, 2009 2:59 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
First, you need to download the icons.
http://www.sapdesignguild.org/resources/icons_sap/index.htm
Place these icons under your Component Mimes folder.
Next step is to create the Context Attribute that will resolve which Image to show. You have your SearchTableNode, insert a new Attribute in there, type String, readOnly = true and calculated = true. If you are using structure binding, you need to create a Non-Singleton Node under your SearchTableNode and add the property in there.
Go to your calculated method and implement the logic you will use to select with Icon to display (usually you will display something based on status). Return the icon name, IE. RED_LIGHT.GIF in that method.
Now in your Table (in Layout view) you can add a new column, header, and a celleditor, type Image. - Bind the source property to this newly created attribute.
Regards,
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Search the forum, I have answered this already at some time.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dipendra,
Using trafic lights in Web Dynpro could only be furnished by uploading images of three type (Red,Green and Yellow) in three context attributes of WDResouce type say Img_1,Img_2 and Img_3. Now you can have one extra column at the beginning of the table without column header and Image as TableCellEditor for that column. Now before the table is loaded, get URL of the three WDResouce context attributes using WDWebResouce API and set is to three other context attributes of string type say attr1, attr2 and attr3. Now create a context attribute under the table node and bind it to the 'source' of the Image under the first column. As per the case, set this Table Node's attribute to whichever relevant context attribute out of attr1, attr2 and attr3 to pass the path to the sorce of the image.
Hope your problem is addressed.
Regards,
Tushar Sinha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Due to network : plz avoid this
Best Regards
Satish Kumar
Edited by: satish jhariya on Nov 19, 2009 6:32 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
aa
Edited by: satish jhariya on Nov 19, 2009 6:30 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
If you aware of NW 7.0 Visual composer WebI nterface at right hand side , there something like your requirement i.e traffic light.
Approach is simple for WD Table
1.Select 4 images (Red,Yellow,Green and gray)
2.At table toolbar (or could be simple TContainer) at right hand side put 3 image UI.
3.Now it might based on selection/you want those signal (Tell us what are those conditions).
4. We have to create some mehtod which will call repeditely at every selection. each method will represent particular color
or all depends on your conditions. (also tell us your NWDS version)
Best Regards
Satish Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I think you can use the image like green, yellow and red and then associate its visibility property with attribute of type visibility you can make them visible and invisible based on the condition.
else i don't think there is any UI element like traffic light in web dynpro.
Regards
Jeetendra.
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 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.