• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Duplication des labels checkboxlist et optgroup

 
Luis Parente
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everybody,

I continue my learning Struts 2 with some small concerns.

In one of my JSP I have the following code:



This code is within a form that's pointes in follow action:



As you may notice in the JSP, I use the same list twice listeRepas, once in:



and another time :



If I delete the tag <s:optgroup/> the CheckBoxList tag is well generated, while if both are present I get a duplicate labels as seen in the picture attached.

I use twice the same list, is this a problem?

Thank you in advance.



duplica.JPG
[Thumbnail for duplica.JPG]
Duplacation labels
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look real close at this code. Ask yourself what happens if you invoke this method more than once:
 
Luis Parente
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot, another time I will see my code with more atention and I will put more logs.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic