This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Struts and the fly likes Duplication des labels checkboxlist et optgroup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Duplication des labels checkboxlist et optgroup" Watch "Duplication des labels checkboxlist et optgroup" New topic
Author

Duplication des labels checkboxlist et optgroup

Luis Parente
Ranch Hand

Joined: Jan 17, 2012
Posts: 39
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 <sptgroup/> 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.






[Thumbnail for duplica.JPG]

Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8877
    
    8

Look real close at this code. Ask yourself what happens if you invoke this method more than once:


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Luis Parente
Ranch Hand

Joined: Jan 17, 2012
Posts: 39
Thanks a lot, another time I will see my code with more atention and I will put more logs.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Duplication des labels checkboxlist et optgroup