cancel
Showing results for 
Search instead for 
Did you mean: 

Changing dynamically the CellBackgroundDesign

Former Member
0 Kudos
68

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

View Entire Topic
Former Member
0 Kudos

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

Former Member
0 Kudos

Thanks,

It solved my problem