01: /*
02: * $Id: IOptionRenderer.java 462103 2006-09-05 22:32:17Z ehillenius $ $Revision: 462103 $ $Date: 2006-09-06 00:32:17 +0200 (Wed, 06 Sep 2006) $
03: *
04: * ==============================================================================
05: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
06: * use this file except in compliance with the License. You may obtain a copy of
07: * the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14: * License for the specific language governing permissions and limitations under
15: * the License.
16: */
17: package wicket.extensions.markup.html.form.select;
18:
19: import java.io.Serializable;
20:
21: import wicket.model.IModel;
22:
23: /**
24: * @author Igor Vaynberg (ivaynberg)
25: *
26: */
27: public interface IOptionRenderer extends Serializable {
28: /**
29: * Get the value for displaying to the user.
30: *
31: * @param object
32: * SelectOption model object
33: * @return the value for displaying to the user.
34: */
35: public String getDisplayValue(Object object);
36:
37: /**
38: * Gets the model that will be used to represent the value object.
39: *
40: * This is a good place to wrap the value object with a detachable model one
41: * is desired
42: *
43: * @param value
44: * @return model that will contain the value object
45: */
46: public IModel getModel(Object value);
47: }
|