Discussions

Web tier: servlets, JSP, Web frameworks: to see one record at a time by selecting the key form combo box

  1. Hi,

      I have a ArrayList which holds objects of type class "Property",contails no, name as fields.
     
    In my jsp view i need to show one record at a time.
    The view look like
    1.No.-combobox- contains all the available No fields in the ArrayList.
    2.Name-text- to display the name of the corresponding No that is selected in the combobox dynamically.

    How can i do that.

    in clear

      class Property{
         int no;
         String name;
      }
      .....
      ...
    ArrayList al=new ArrayList();
    for(i=0;i<=5;i++){
       Property property=new Property();
       property.no=i;
       al.add(property);
    }

    but in jsp i want to show two fields
      1.No as combobox with all entries in the ArrayList al
      2 Name, of the No that is currently in the combobox.
    How can I...?

    Regards,
    MaRu :(
  2. Use framesets.

    Put your Combobox/Select in one frame, and whenever the select list changes, use JavaScript to reload the other frame with the subset of data you want to display.
  3. Here I have anothere work to do, I need to populate the complete row to a FormBean .

     And can I have nested form Tags..?
     <html:form>
       <html:form>

       </html:form>
     <html:form>

    Regards,
    MaRu.