cancel
Showing results for 
Search instead for 
Did you mean: 

Changing dynamically the CellBackgroundDesign

Former Member
0 Kudos
71

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

Accepted Solutions (1)

Accepted Solutions (1)

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

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Noy,

Please check the following.In the same way you can try for MatrixLayout.

IWDGroup headerGroup=(IWDGroup)view.createElement(IWDGroup.class,null);

IWDGridLayout headerGroupLayout=(IWDGridLayout)headerGroup.createLayout(IWDGridLayout.class);

Regards, Anilkumar