1 Reply Latest reply on Nov 16, 2012 4:25 AM by Veena_07

    manipulating individual checkbox in a checkboxgroup

    Veena_07 Level 3

      Hi

       

            I have created a checkboxgroup (cq:Widget). Inside that inside items(cq:WidgetCollection) i have my cq:Widgets which will be rendered as individual checkboxes. i have three widgets inside the items. Initially second and third widget will be disabled. On click of first widget, second and third widget will get activated. This much i have done.

       

      But if the user unchecks the first checkbox the next two checkbox shud get disabled. How can i acheive this since in documentation , nothing is mentioned thru which i can iterate thru each item of the checkboxgroup.. Any help would be appreciable

       

       

      Thanks in advance

       

      Veena

        • 1. Re: manipulating individual checkbox in a checkboxgroup
          Veena_07 Level 3

          Hey Guys

           

                I got the solution

           

             Reference : http://stackoverflow.com/questions/3523733/in-extjs-how-can-you-loop-through-menu-items

           

          For my requirement

           

                if check is my checkbox group

           

          check[0].items.each(function(i) {

                                                            var label = i.fieldLabel;

                                                            if (label == "second"

                                                                                || label == "third") {

                                                                      i.disable();

                                                            }

                                                  });

           

           

          will disable my second and third checkbox where "second" is the fieldLabel for my second checkbox and "third" for my third checkbox

           

           

          Thanks

           

          Veena