title: i just need to add details to the list, one at a time using codename one
body: <p>am working on a project where I need to add a list of children(including their details) in a database table... but before the user sends the details I need to see that list, the maximum is 7 children. I have created a list and an add action but I cant add the child details to the list. using codename one I have,</p>
  <pre><code>    public void childscreen()
          {
              /*-------DETAILS TAKEN HERE------*/
              Form regscreen = new Form(&quot;Fill Childs details&quot;);
          TableLayout tl;
          
           int spanButton = 2;
          if(Display.getInstance().isTablet()) {
              tl = new TableLayout(7, 2);
          } else {
              tl = new TableLayout(14, 1);
              spanButton = 1;
          }
          tl.setGrowHorizontally(true);
          regscreen.setLayout(tl);
          
          regscreen.addComponent(new Label(&quot;First Name&quot;));
          TextField txtname = new TextField();
          regscreen.addComponent(txtname);
          
           regscreen.addComponent(new Label(&quot;Middle Name&quot;));
          TextField txtname2 = new TextField();
          regscreen.addComponent(txtname2);
          
           regscreen.addComponent(new Label(&quot;Surname&quot;));
          TextField txtname3 = new TextField();
          regscreen.addComponent(txtname3);
          
          regscreen.addComponent(new Label(&quot;Birth Certificate/Notification No&quot;));
          TextField txtbirth = new TextField();
      //    txtidno.setConstraint(TextArea.NUMERIC);
          regscreen.addComponent(txtbirth);
          
          regscreen.addComponent(new Label(&quot;Date of Birth&quot;));
          PickerComponent date = PickerComponent.createDate(new Date());
          regscreen.addComponent(date);   
          
          Button btnadd = new Button(&quot;Add&quot;);
          TableLayout.Constraint cn = tl.createConstraint();
          cn.setHorizontalSpan(spanButton);
          cn.setHorizontalAlign(Component.RIGHT);
          regscreen.addComponent(cn, btnadd);
          
          Validator v = new Validator();
          v.addConstraint(txtname, new LengthConstraint(3)).
                  addConstraint(txtname2, new LengthConstraint(3,&quot;Enter Middle Name&quot;)).
                  addConstraint(txtname3, new LengthConstraint(3)).
                  addConstraint(txtbirth, new LengthConstraint(10)).
                  addConstraint(txtbirth, new LengthConstraint(4));
      //            addConstraint(txtname2, new RegexConstraint(&quot;txtname2&quot;, &quot;Must be valid phone number&quot;));
                  
          v.addSubmitButtons(btnadd);
              /*-------DETAILS TAKEN HERE------*/
              
              Form watoto=new Form(&quot;CHILDREN DETAILS&quot;, new BorderLayout());
              Container list=new Container(BoxLayout.y());
              list.setScrollableY(true);
              for(int inter=1; inter&lt;=7; inter++)
              {
                  MultiButton mb=new MultiButton(&quot;Child Details &quot;+inter);
                  mb.setTextLine2(&quot;Add&quot;);
                  mb.addActionListener(new ActionListener() 
                  {
                      @Override
                      public void actionPerformed(ActionEvent evt) 
                      {
                          regscreen.show();
                      }
                  });
                  list.add(mb);
              }
              watoto.add(CENTER, list);
              watoto.show();
          }
  </code></pre>
  <p>any help
  thanks in advance</p>