cancel
Showing results for 
Search instead for 
Did you mean: 

Get checkbox text and value in Webdynpro java

Sreejith1
Contributor
0 Kudos

Hi Gurus,

In my Webdynpro Java Application I have few check boxes(created dynamically using checkboxgroup).

In that I have to catch one particular checkbox text and value.

for eg,

case 1,  If Asia

                   check boxes are India,China,Srilanka,Pakistan etc...

case 2,  If Europe

                   check boxes are Germany,Italy,France etc...

Here if someone  selected the case 2 and

in the corresponding dynamic checkbox if he select "Germany",

I need to catch that event only.Rest all checkbox event I dont need to catch.

  

Thanks in advance,

Ram

Accepted Solutions (1)

Accepted Solutions (1)

junwu
Active Contributor
0 Kudos
cannot follow you
Sreejith1
Contributor
0 Kudos

Hi Wu,

Let me explain it in simpler way.

I have one Model node and it gives the inputs for  Combobox group.

I am taking the values for of combobox when the user clicks submit button.This part is normal.

Before that there is one special scenario

When the user Click one specific checkbox (with text "Germany") I need to execute one method.

My problem is, every check box click I am reading whole checkboxes(using one 'for' loop ) to verify whether the check box with name "Germany" is clicked or not.

There will be situation that the model node don't have checkbox with name "Germany" .

Still my iteration will execute unnecessary.So i need one optimized way to handle this.

-------------------------------------------------------------------------------------------

I have solved the above by using the logic in this thread.

http://scn.sap.com/thread/73191

if (firstTime) {

                                        IWDCheckBoxGroup cg1 = (IWDCheckBoxGroup) view.getElement("CheckBoxGroup") ;

                                        cg1.mappingOfOnToggle().addSourceMapping("index", "cgIndex") ;

                                        cg1.mappingOfOnToggle().addSourceMapping("checked", "cgChecked") ;           

                                }

Answers (0)