on 07-03-2006 3:39 PM
hi Gurus,
I have an application which retrieved some data from back end R/3 system.
Now I am displaying the data in a table, now I have one column which displays the delivery date and in that we also have text displayed as "Cancelled".
Now I want to change the color of text "cancelled" whenever it is retrieved from the back end.
Thanks,
kris
closing
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Which table cell editor is used in that column?
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Armin,
Thanks for ur fast response.
I am using TextView table cell editor.
I am trying to implement this functionality to a value which is in the Model node, and I have to check a condition before applying this color change to the table cell editor.
If the value coming from the back end is "CANCELLED" then only I have to display it in color RED, and the remaining text should be displayed as normal text in black.
please suggest me how should I go further.
thanks and regards,
kris
Let "Rows" be the table data source node (model node).
Add a value node "State" to node "Rows".
Set State.cardinality = 1:1, State.selection=1:1.
Add a <b>calculated attribute</b> "Color" to "State", type=com.sap.ide.webdynpro.uielementdefinitions.TextViewSemanticColor,
readOnly=true, calculated=true.
Bind the "semanticColor" property of the TextView to attribute "Color".
Implement the generated get-method for the calculated attribute:
WDTextViewSemanticColor getColor(IStateElement element)
{
IRowsElement row = (IRowsElement) element.node().getParentElement();
return "CANCELLED".equals(row.getValue())
? WDTextViewSemanticColor.NEGATIVE
: WDTextViewSemanticColor.STANDARD;
}
Armin
Hi Armin,
My question is I want get the value from the BAPI. and based on that value(CANCELLED).If Iam getting the value Cancelled then display as RED color Value and otherwise normal black.
Here I have created Model node and cardinality 1.1 and what u said all in the above .But After creating model node I am mapping BAPI Value attribute from the BAPImodel.After creating the color attribute"TextColor" .That Color Value node is not added to that Model Node.
If showing message like this "not possible to add the valuenode it was already mapped with model node".
How add the color Value node to the Already mapped valuenode from the BAPIModel.
Or otherwise is there any alternative for please help me out.
Advance Thanks.
Krishna.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.