Skip to Content
avatar image
Former Member

change dynamically color of table cell

Hallo,

I want to change dynamically the color of a cell table depending to a service response.

But no color change happen.

Context node is:

phase_subphase_table >> color_cell_subphase of type com.sap.ide.webdynpro.uielementdefinitions.TableCellDesign

The code is the following:

if(status.equals(DAConst.STATUS_RUNNING)){

wdContext.currentPhase_subphase_tableElement().setColor_cell_subphase(WDTableCellDesign.CRITICALVALUE_LIGHT);

}else if(status.equals(DAConst.STATUS_NOTIFY)){

wdContext.currentPhase_subphase_tableElement().setColor_cell_subphase(WDTableCellDesign.BADVALUE_LIGHT);

}else if(status.equals(DAConst.STATUS_COMPLETED)){

wdContext.currentPhase_subphase_tableElement().setColor_cell_subphase(WDTableCellDesign.GOODVALUE_MEDIUM);

}else if(status.equals(DAConst.STATUS_ABORTED)){

msg.reportSuccess("status aborted");

wdContext.currentPhase_subphase_tableElement().setColor_cell_subphase(WDTableCellDesign.BADVALUE_DARK);

}else{

wdContext.currentPhase_subphase_tableElement().setColor_cell_subphase(WDTableCellDesign.KEY_MEDIUM);

}

After refreshes I call the web service and get the status.

The table cell is colored the first time but never more change.

Could anybody help me please?

Thanks,

Andrea

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Mar 16, 2009 at 04:55 PM

    Use a calculated attribute or call this code every time the table data change.

    Armin

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Thanks for your help Björn, now it works! 😊

      You are very kind, your explanation about calculated node is helpfull, I did not known this argument!

      Have a nice day!

      Kind regards,

      Andrea