aspose file tools*
The moose likes Struts and the fly likes logic iterate tag not displaying desired result Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "logic iterate tag not displaying desired result" Watch "logic iterate tag not displaying desired result" New topic
Author

logic iterate tag not displaying desired result

Abbie joseph
Greenhorn

Joined: Sep 12, 2007
Posts: 8
hi friends,
my situation here is that, in my action class i have a result set, and im printing the values of that result set in a jsp page. for that i have done something like this.

and in my jsp page i have done something like this to display my contents from the resultset.



and


and so on.....till s7.
the result that im getting inside my table is
2344, 0, 0, et, 2344, 0, 0, hyii, 4200000, 0, 3936056
this values are getting printed in all the columns.....i want it to be like for example say under s4 it should be 2344 , under s5 it should be 0 , under s6 it should be et...etc how can i do it?please help me...thanks in advance.
regards,
aj_ajos
Tarun Yadav
Ranch Hand

Joined: Sep 20, 2007
Posts: 134
Hi 'aj ajos'; there's a strict naming policy followed on JavaRanch, one of the mods should be along shortly to ask you to change your display name. Keep in mind that accounts get deleted, often without warning, for violation.

That said, people are already answering your query here, it'd be rude and unfair to them.
Abbie joseph
Greenhorn

Joined: Sep 12, 2007
Posts: 8
Originally posted by Tarun Yadav:
Hi 'aj ajos'; there's a strict naming policy followed on JavaRanch, one of the mods should be along shortly to ask you to change your display name. Keep in mind that accounts get deleted, often without warning, for violation.

That said, people are already answering your query here, it'd be rude and unfair to them.

hi tarun,im sorry for this but i am stuck with this thing for many days now and i cannot make a DTO as suggested as i have been told to do it in the very basic way.
regards,
aj.
Tarun Yadav
Ranch Hand

Joined: Sep 20, 2007
Posts: 134
But don't you see? That is pretty much the most basic way. If you're using an ArrayList etc already, there shouldn't be any problem in adding one simple class, should there?

As also mentioned on that other post that I linked to earlier, you're using a wrong way to go about reading the values. You're iterating over each list of properties for each row. So you obviously get all the values for a property printed out in each row of your table.

You need to iterate of a list of rows. And the simplest and least complicated way is to make a bean and add an instance of the bean for each row into the list.
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
Jospeh...I am sure you will add a last name to meet the Java Ranch naming policy...right.

I agree with Tarun. You could create a value bean like this:


Then add one of these to your list for each database record:


If you really did not want to create a new class, you could have a "two-dimensional List" like this:


- Brent
Abbie joseph
Greenhorn

Joined: Sep 12, 2007
Posts: 8
Originally posted by Brent Sterling:
Jospeh...I am sure you will add a last name to meet the Java Ranch naming policy...right.

I agree with Tarun. You could create a value bean like this:


Then add one of these to your list for each database record:


If you really did not want to create a new class, you could have a "two-dimensional List" like this:


- Brent


hi Brent,
thanks very much for the reply,truely appreciate it.Will try this and get back to you.But the other problem that i face is the retrieval of the values in my jsp page.I want the values to be iteraterd along the rows, at present the values are been shown inside each column.Thanks mate once again.
regards,
Abbie Joseph
[ October 22, 2007: Message edited by: joseph ]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Joseph,

Please check your private messages for an important message from me. You can do so by clicking My Private Messages in the upper right corner of the page.


Merrill
Consultant, Sima Solutions
Abbie joseph
Greenhorn

Joined: Sep 12, 2007
Posts: 8
Ok friends problem solved...thanks to those who tried to help.
cheers,
Abbie Joseph
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: logic iterate tag not displaying desired result