beehive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sourmugster <>
Subject Formbean list containing selected checkbox values twice
Date Thu, 29 Nov 2007 23:36:23 GMT


I have created a form containing several input fields and a dynamically
generated list of checkboxes.

When I submit the form, all fields are put in the appropriate member
variables in my formbean. 
For the checkboxes, a list is being used to contain the selected values. 
The problem is, that the list contains all the selected items twice.

For instance.


<netui:checkBoxGroup dataSource="actionForm.items"  orientation="vertical">
	<netui:checkBoxOption value="item1">item1</netui:checkBoxOption>
	<netui:checkBoxOption value="item2">item2</netui:checkBoxOption>
	<netui:checkBoxOption value="item3">item3</netui:checkBoxOption>


   public static class MyFormBean implements {
        private static final long serialVersionUID     = 43170698L;

        private List    items      = new ArrayList();
        private String lastName = "";

        public List getItems() {
            return items;

        public void setItems(List items) {
            this.items = items;

        public String getLastName() {
            return lastName;

        public void setLastName(String lastName) {
            this.lastName = lastName;

After selecting item1 and item3, the list looks like this: 
	item1, item3, item1, item3

Has anyone encountered the same problem and perhaps found a solution for

Thx in advance.
View this message in context:
Sent from the Beehive - User mailing list archive at

View raw message