Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Doubt in checkboxlist

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
  • Quote
  • Report post to moderator
Try without the "%".
 
Sakthi Priya
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
Yes David, It worked



Thanks
 
Sakthi Priya
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • 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


 
Yes, of course, and I accept that blame. In fact, i covet that blame. As does this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic