Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Changing dynamically the CellBackgroundDesign


How can I change LayoutData of a UI element that I created dynamically and his parent is in MatrixLayout?

I want to change his CellBackgroundDesign. (dynamically...)



Former Member replied


Sadly, there is no binding possible, so you have to do this programmatically. Here is the sequence:

1. You must locate element somehow, probably passing it's id to corresponding action handler, or via storing id in context node element attribute.

2. You must set some flag (attribute in context) from action handler, that describes element to be modified. You may use null for "no modifications" and element id as flag for processing.

3. Do the following in wdDoModifyView:

/* flag value */
final String id = wdContext
if ( null == id ) return;
final IWDUIElement el = (IWDUIElement)view.getElement(id);
final IWDMatrixData cell = (IWDMatrixData)el.getLayoutData();
cell.setCellBackgroundDesign(<some costant>);

Valery Silaev

EPAM Systems

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question