Discussions

Web tier: servlets, JSP, Web frameworks: Logic iterate not sufficient

  1. Logic iterate not sufficient (2 messages)

    Hello
    I am programming a jsp page with struts. My problem is that i have a bean like this:

    private ArrayList carList = new Arraylist();
    private DataFormat DF = new DataFormat();

    and then other Bean DataFormat as:

    private ArrayList dfList = new ArrayList();

    Logic:iterate can iterate in carList but... how i can iterate throught dfList???

    thanks
  2. Maybe I caught what've said[ Go to top ]

    Hi,
    If your class hierarchy looks like:
    [code]
    class A
    {
    private ArrayList carList = new Arraylist();
    private DataFormat DF = new DataFormat();
    }

    class DataFormat
    {
      private ArrayList dfList = new ArrayList();
      public List getDfList()
      {
        return dfList;
      }
    }
    [/code]

    you can try struts-nested tag lib

    Good luck,
    Albert
  3. Maybe I caught what've said[ Go to top ]

    Thanks Albert, you`ve caught it!! ;-)
    Yes, my hierarchy is that.

    I have found another solution. A <bean:define> with the DataFormat class in it.

    thanks