on 07-13-2006 11:30 PM
Hello,
I need to have a link in a table and assign an action to this link. The action should take a user to a different screen. How can I achieve this?
I created binding of my table: right click on a table name in Layout, select Create Binding. Standard Cell Editor: TextView. For each of Context Attributes I can set Cell Editor of Table Column and Name of Property to Be Bound. When I set it to Link and apply changes it works fine. However, when I open Create Biniding again I still see TextView.
Also, I need to change a cell's background color of a column to red, green or yellow depending on the value that a cell has. Values come from a view.
Can anybody suggest?
Thank you.
Georgy
Hi Georgy,
How to make <i>change a cell's background color of a column to red, green or yellow </i>:
Use cellDesign property of TableStandardCell UI element (Check http://help.sap.com/saphelp_nw04s/helpdata/en/1e/49a841c1dae034e10000000a1550b0/frameset.htm)
Make calculated readonly attribute with type WDUI_TABLE_CELL_DESIGN and in getter return appropriate value depending on what conditions you have. Bind this property with appropriate UI element`s property.
How to make link which takes user to different screen: make your cell editor as LinkToAction ( Check http://help.sap.com/saphelp_nw04s/helpdata/en/0f/e8884118aa1709e10000000a155106/frameset.htm ), create appropriate in- and outbound view plugs, in action handler fire appropriate plug. In case you need different screens for different cells - use paramameter mapping
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Maksim,
Thanks for the info.
However, I am not exactly clear.
I have a view that I select from. Result of the selection is bound to a dataSource property of a table. One column displays priority. If priority is high than I need to set color for that cell to red, when medium than to yellow and so on.
How this can be done?
Thank you.
Georgy
Hi Georgy,
Sorry for confusing - seems like there are no calculated attributes in WDA.
Try this: in datasource node add attribute with type WDUI_TABLE_CELL_DESIGN, just after binding iterate through node elements and set this attribute to appropriate value (calculate using priority value), bind new attribute with appropriate TableStandardCell` cellDesign property.
Best regards, Maksim Rashchynski.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
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.