/**

   Copyright 2009 OpenEngSB Division, Vienna University of Technology

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

 */
package org.openengsb.config.view.util;

import org.apache.wicket.markup.html.form.ChoiceRenderer;

/**
 * Helper class to seperate display and identifier for items in a {@code
 * DropDownChoice}. Use in combination with a {@code new
 * ChoiceRenderer<ChoiceOption>("display", "id")}.
 */
public class ChoiceOption {
    private final String id;
    private final String display;

    public ChoiceOption(String id, String display) {
        super();
        this.id = id;
        this.display = display;
    }

    public String getId() {
        return id;
    }

    public String getDisplay() {
        return display;
    }

    public static ChoiceRenderer<ChoiceOption> createRenderer() {
        return new ChoiceRenderer<ChoiceOption>("display", "id");
    }
}

@@ -666,16 +666,46 @@
 .util;%0A%0A
+import java.io.Serializable;%0A%0A
 import o
@@ -970,17 +970,94 @@
 eOption 
-%7B
+implements Serializable %7B%0A    private static final long serialVersionUID = 1L;
 %0A    pri

make ChoiceOption Serializable