File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 8867
    
    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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Duplication des labels checkboxlist et optgroup