Skip to content

Commit

Permalink
SimpleChoiceRenderer compiles
Browse files Browse the repository at this point in the history
  • Loading branch information
aaime committed Jan 18, 2016
1 parent 7f9c0e5 commit ebf34e4
Showing 1 changed file with 5 additions and 5 deletions.
@@ -1,23 +1,23 @@
/* (c) 2014 Open Source Geospatial Foundation - all rights reserved
/* (c) 2014 - 2016 Open Source Geospatial Foundation - all rights reserved
* (c) 2001 - 2013 OpenPlans
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
package org.geoserver.web.wicket;

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

/**
* A choice renderer in which each displayed value is also the id
*/
@SuppressWarnings("serial")
public class SimpleChoiceRenderer implements IChoiceRenderer {
public class SimpleChoiceRenderer<T> extends ChoiceRenderer<T> {

public Object getDisplayValue(Object object) {
public Object getDisplayValue(T object) {
return object;
}

public String getIdValue(Object object, int index) {
public String getIdValue(T object, int index) {
return object.toString();
}

Expand Down

0 comments on commit ebf34e4

Please sign in to comment.