on 12-05-2005 5:34 AM
How to display an icon in a column of a table UI element and this icon is to be displayed based on values in the table row?
Hi wei,
For inserting an icon inside the table
1)create a table with ur input fields,
2)next to the input field column insert a col with buttons.
3))in the buttons u can add ur image source so that it looks like an icon.
4)onAction() of the button give ur implementation.
Hope this helps u better,
Regards,
Nagarajan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I normally use a calculated attribute inside the table's data source node for this.
Add an attribute "Icon", type=string, calculated=true, read-only=true, under the data source node.
(If the data source node uses structure binding and does not allow to add an attribute, add a helper value node instead, cardinality=1:1, selection=1:1, and add the attribute to this node.)
In the get-method for the calculated attribute, you get the node element corresponding to the table row as parameter. Depending on other attributes in this node element, select an icon URL and return it.
If you put your icons inside the src/mimes/<component> folder, you can simply return the file name of the icon.
Don't use a Button as table cell editor but rather an Image or LinkToAction.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The following answer is more or less helpful, but it still does not solve the problem. What I want is to display the icon beside the input field and both the icon and input field are in one cell.
====================================================
You can use the following as table cell editor:
1. Image -- just displays plain image
2. Caption -- dislays image along with text or image only (or text only).
3. LinkToAction -- same as caption, however provides you a way to have something like "onClick" action.
========================================================
Message was edited by: Wei Tang
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Wei,
It is impossible to use pair of UI controls as single table cell editor. Using any kind of container (like IWDTransparentContainer) for cell editor is forbidden as well. So the answer is "NO WAY", either in NW 6.40 or 7.00.
So it is the only option to use 2 columns. In later versions (at least recent 7.0 builds) you may switch off vertical grid lines in table, so result looks like what you want.
Valery Silaev
EPAM Systems
hi wei,
FOr adding icons check on to this link:
http://help.sap.com/saphelp_erp2005/helpdata/en/b6/ab3a7803ac11d4a73f0000e83dd863/frameset.htm
Hope this helps u,
Regards,
Nagarajan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
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.