on 11-24-2012 2:07 AM
Hi experts,
i have one requirement let me explain
I have one table (Table1) in that i have the columns duedate ans status and some other columns
bind ui elements to the bapi fields
now my question is
if(sysdate<=duedate)
{
display cell in green color ;
}
else
if(sysdate<=duedate+7 days)
{
display cell in orange color ;
}
else
if(sysdate>=duedate+7 days)
{
display cell in red color ;
}
I am not able to do this please help me through the required steps to be done to achieve this
if possible try to send the related document on this.
Its very urgent
Thanks in advance,
Fayaz Shaik
Hello Fayaz,
Create one attribute called "cell editor" with type simple Type TableCellDesign (com.sap.ide.webdynpro.uielementdefinitions.TableCellDesign) and bind to the Table Column Properties ---->CellDesign
and write the code like below
if(sysdate<=duedate)
{
//display cell in green color ;
wdContext.currentContextElement().setCelleditor(WDTableCellDesign.goodvalue_dark);
}
else
if(sysdate<=duedate+7 days)
{
//display cell in orange color ;
wdContext.currentContextElement().setCelleditor(WDTableCellDesign.
criticalvalue_dark)
);
}
else
if(sysdate>=duedate+7 days)
{
//display cell in red color ;
wdContext.currentContextElement().setCelleditor(WDTableCellDesign.badvalue_dark);
}
Note: in the init method you can call it as s standard color:
wdContext.currentContextElement().setCelleditor(WDTableCellDesign.STANDARD);
Hope it will helps
Regards,
Manivannan P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
moved to Web Dynpro Java by moderator
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
this one may be better
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.
Is it in smartform or any other context?
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.