Jump to content
We've recently updated our Privacy Statement, available here ×

How to display an array list


bako

Recommended Posts

HI

i've a bean that have a List ml = new ArrayList.

so i add in my arrayList some thing, for example:

ml.add("hi");

ml.add("bau");

 

so when i try to print the arrayList into a report i use this: ""+$F{ml} but the result is [hi,bau]. I will have another thing, hi and bau separeted.

so i will iterate on my arraylist like a for, it is possible?

 

and, if i have an arrylist compose of another class

ex: List ml = new ArrayList();

Myclass mc = newMyclass();

mc.setOne(1);

mc.setTwo(2);

mc.setName("name");

ml.add(mc);

Myclass mc2 = newMyclass();

mc2.setOne(100);

mc2.setTwo(200);

mc2.setName("bho");

ml.add(mc2);

 

how i can print the fields of my class?

Link to comment
Share on other sites

  • 8 years later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...