Skip to Content

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

Changing dynamically the CellBackgroundDesign

Hi,

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...)

Thanks,

Noy

Former Member replied

Noy,

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
  .currentContextElement().getModifiedElementId();
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

http://www.NetWeaverTeam.com

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