cancel
Showing results for 
Search instead for 
Did you mean: 

Check Box in Webdynpro

Former Member
0 Kudos

Hi,

I am working on checkbox in webdynpro. I hav 2 views. In the first view I hav 4 check boxes. In the second voew I hav one text box. If the check box is checkd and the submit button is pressed then the corresponding value of check box should get display in Second view. This is my requirement.

But for this what are the methods I need to use.....to know which check box is checked...and to set the corresponding checkbox value to the text box?

Regards

Sandeep Reddy

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Abhi,

Thanx for the quick response. I am verymuch new to this webdynpro.

So..jus working on basics.

Mine check box group. This check box group is binded with the node.

So I hav one Node in Comp. Controller. This node is binded with one Internal table . Depends on the number of records in Internal table the check boxes will be created. So, now tell me how can get my requirement done//?

Regards

Sandip

abhimanyu_lagishetti7
Active Contributor
0 Kudos

The Same Node create in Component control and Drag and Drop to create Context Mapping to View1 and View2.

on the Submit Button Event Handler using code wizard navigate to next view

in the InBound plug Event Handler of the View2 put the code

data: lr_node type ref to if_wd_context_node.

data: lr_elem type ref to if_wd_context_element.

data: lt_elem type WDR_CONTEXT_ELEMENT_SET.

data: ls_elem type <node_type>.

lr_node = wd_context->get_child_node( '<node_name>' ).

lt_elem = lr_node->get_elements( ).

loop at lt_elem into lr_elem.

if lr_elem->is_selected( ) eq abap_true.

  • this record is selected

lr_elem->get_static_attributes( importing static_attributes = ls_elem ).

  • ls_elem structure will have the selected check box

  • fill your input field binded context attribute here.

endif.

endloop.

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanx Abhi!!!!

abhimanyu_lagishetti7
Active Contributor
0 Kudos

You must have created three context attributes of type WDY_BOOLEAN and binded to the check boxes.

You can do this two ways.

1. passing the check box values through Outbound Plug

2. Context Mapping : you can create context node in comopnentcontroller to store the three check box's value and map it to both the views.

Abhi