It's not a secret anymore!*
The moose likes Struts and the fly likes want to show only rows in dispaly tag in struts page using pagination Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "want to show only rows in dispaly tag in struts page using pagination" Watch "want to show only rows in dispaly tag in struts page using pagination" New topic
Author

want to show only rows in dispaly tag in struts page using pagination

vishal gaiky
Greenhorn

Joined: Jun 06, 2012
Posts: 19
hello friends,

i am developing one online exam application using struts i want to use pagination to show five pages and on each page i want to show 5 questions..now problem is that i am using display tag but i dont know how to iterate it for rows only..i want to show data on rows not on columns like

1. question text.
radio button 1
radio button 2
radio button 3
radio button 4

2. question text.
radio button 1
radio button 2
radio button 3
radio button 4

3. question text.
radio button 1
radio button 2
radio button 3
radio button 4


like above
vishal gaiky
Greenhorn

Joined: Jun 06, 2012
Posts: 19
please help me friends..
Daniel Val
Ranch Hand

Joined: Jan 09, 2012
Posts: 44
vishal gaiky wrote:hello friends,

i am developing one online exam application using struts i want to use pagination to show five pages and on each page i want to show 5 questions..now problem is that i am using display tag but i dont know how to iterate it for rows only..i want to show data on rows not on columns like

1. question text.
radio button 1
radio button 2
radio button 3
radio button 4

2. question text.
radio button 1
radio button 2
radio button 3
radio button 4

3. question text.
radio button 1
radio button 2
radio button 3
radio button 4


like above


Probably you iterate something like
<logic:iterate>
<html:radio .... /> <br/>
</logic:iterate>

And that is the reason it starts on the next line. Remove the BR tag and the radio buttons will be displayed horizontally.

If your question was not that but you actually wanted the first question and group shown in a position, then the second one together with its options shown to the right, then you need a layout table. You render a table tag,
then a tr tag, then the first question and options will be in the first td tag, the second and its options in the second td tag etc.

<table>
<tr>
<td>
Question 1 <br/>
radio 1 <br/>
radio 2
</td>
<td>
Question 2 <br/>
radio 1 <br/>
radio 2
</td>
</tr>
</table>

and this will be rendered horizontally, question by question.
vishal gaiky
Greenhorn

Joined: Jun 06, 2012
Posts: 19
i want to use pagination also so i cant use other tag than display tag..i want pagination + radio button to options
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: want to show only rows in dispaly tag in struts page using pagination