This week's book giveaway is in the Testing forum.
We're giving away four copies of Data Structures the Fun Way: An Amusing Adventure with Coffee-Filled Examples and have Jeremy Kubica on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

Doubt in checkboxlist

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to create list of checkboxes using s:checkboxlist tag, where in the properties has to read from Application Resources property file. As the values are static i dont want to populate the list in my action class and display it in jsp. Please let me know how can i do it? I'm using as



for displaying single property the above code is working fine.



which is not working.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's not a valid OGNL expression--you're opening it twice. Remove the second "%{".
 
Sakthi Priya
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And my another doubt is :

Is there a way to set the width / alignment of each checkbox among the checkbox list. When i'm displaying some 20-30 checkboxes, next to next checkboxes are getting displayed and looking ugly.

It is better if i come to know how can i set to display only 3 checkboxes with lables in a row

Thanks
 
Sakthi Priya
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, its working. But only the lastly given label is displaying with only one checkbox. when i give as


only one checkbox is displayed with label First Name

David Newton wrote:That's not a valid OGNL expression--you're opening it twice. Remove the second "%{".

 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try without the "%".
 
Sakthi Priya
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No David, its not working. I tried as


and also


Getting the below eror:
SEVERE: Servlet.service() for servlet jsp threw exception
tag 'checkboxlist', field 'list', name 'downloadColList': The requested list key '%{getText('employee.label.number'), {getText('employee.label.extension')}' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.{name} - [unknown location]
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's odd, they both have "%" characters, which I suggested you try removing.
 
Sakthi Priya
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes David, It worked



Thanks
 
Sakthi Priya
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And do you have any idea on the other doubt that i asked?


Is there a way to set the width / alignment of each checkbox among the checkbox list. When i'm displaying some 20-30 checkboxes, next to next checkboxes are getting displayed and looking ugly.

It is better if i come to know how can i set to display only 3 checkboxes with lables in a row


 
reply
    Bookmark Topic Watch Topic
  • New Topic