cancel
Showing results for 
Search instead for 
Did you mean: 

Reg: Dynamic creation of context

Former Member
0 Kudos

Hi,

I have a value node Vn_node and one value attribute Va_att and i have binded it a table.

I have another node Vn_node1 and attribute for this is Va_att1,

based on the size of Vn_node1, i need to create value attributes in Vn_node of type checkbox and bind it to the table and the header text should be corresponding Va_att1.

Kindly suggest.

Regards,

Prasanthi.

Accepted Solutions (1)

Accepted Solutions (1)

former_member192434
Active Contributor
0 Kudos

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

please check this forums link

Hope you will find your answer

Regards

Ruturaj

Former Member
0 Kudos

For Dynammically creating Context use the following code:

Ctx_bool1 is a context whose property is checked and it is set true and Context added to the node of type string.( you can change its type).

Added code in OnActionget:

if(!wdContext.currentContextElement().getCtx_bool1())

{

wdContext.currentContextElement().setCtx_bool1(true);

wdContext.getNodeInfo().addAttribute("nameValue","ddic:com.sap.dictionary.string");

}

In wddomodifyView:

You can bind the context attribute to a field or so shown and add it to RootContainer.

Field is created.

IWDInputField input = (IWDInputField)view.createElement(IWDInputField.class,"nameField");

Binding of field to the context.

input.bindValue("nameValue");

Adding it to RootContainer.

IWDTransparentContainer c = (IWDTransparentContainer)view.getElement("RootUIElementContainer");

c.addchild(input).

I hope this wud help you as you would be able to create a context dynammically and bind it with field.

Thanx.