2 Replies Latest reply: Dec 2, 2010 9:33 AM by 820585 RSS

    choice Group

    843849
      Hai to All

      I displayed 2 pop up lists through choice group. problem is, while navigating among items in first choice group,
      focus jumps to next choice group when focus comes to last item of first choice group. but my requirement is it has to be with in first choice group until to select one item from first choice group.this is my code

      ch=new String[3];
      ch[0]="MOVIE";
      ch[1]="PARK";
      ch[2]="TEMPLE";
      //#style choiceGroup
      choiceGroup=new ChoiceGroup(" ",ChoiceGroup.POPUP,ch,null);
      choiceGroup.allowCycling=true;
      choiceGroup.setSelectedIndex(Integer.parseInt(selectedIndex), true);
      //#style choiceGroup
      choiceGroup1=new ChoiceGroup(" ",ChoiceGroup.POPUP,ch,null);
      choiceGroup1.allowCycling=true;
      choiceGroup1.setSelectedIndex(Integer.parseInt(selectedIndex), true);
      index=append(choiceGroup);
      append(choiceGroup1);
      if any body is having idea, can help to me.
        • 1. Re: choice Group
          802033
          Hi,
          I'm afraid it's not possible with default Form. If you want this functionality, use some more advanced UI library (or build your own).
          For example thw LWUIT: [http://www.oracle.com/technetwork/java/javame/tech/lwuit-141954.html|http://www.oracle.com/technetwork/java/javame/tech/lwuit-141954.html] where you can enable/disable various components on screen and much more.

          Rada
          • 2. Re: choice Group
            820585
            Try setItemCommandListener on your ChoiceGroup object.
            In it's CommandAction method you will check if such menu item is selected and only after that you will append another ChoiceGroup object. I didn't try this. But you can ;-)
            I hope this will heko you :-)