Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

checkboxlist alignment

 
Ritesh Badwaik
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Is there any way to set the width / alignment of each checkbox among the checkboxlist. I want to display some 50-80 checkboxes. I tried as follows but they are not aligned properly.

<s:checkboxlist name="filename" list="#session.fileNames_Size.keys"/>

How can I set to display only 2 or 3 checkboxes with lables in a row ?

Thanks
Ritesh
 
Himanshu Kansal
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll need to loop through. No other way.
 
Ritesh Badwaik
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Himanshu,
I didn't understand . Should I use a iterator ?
Can you please post a sample code snippet ?

Thanks
Ritesh
 
Himanshu Kansal
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

As far as I understand you have a series of checkboxes which you want to display, say, 3 in a row. Suppose you have 60 chekboxes, you should have 20 rows with 3 checkbozes each.

Please tell me if I have not understood the problem statement correctly.

For this you should iterate through the checkboxes putting 3 in a loop. Eg:



Please tell me if it is something else that you are looking for.

Regards
 
Ritesh Badwaik
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
Thanks for the reply.
I got it .
 
Himanshu Kansal
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you are welcome sir!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic