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