01: // Copyright 2007 The Apache Software Foundation
02: //
03: // Licensed under the Apache License, Version 2.0 (the "License");
04: // you may not use this file except in compliance with the License.
05: // You may obtain a copy of the License at
06: //
07: // http://www.apache.org/licenses/LICENSE-2.0
08: //
09: // Unless required by applicable law or agreed to in writing, software
10: // distributed under the License is distributed on an "AS IS" BASIS,
11: // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12: // See the License for the specific language governing permissions and
13: // limitations under the License.
14:
15: package org.apache.tapestry;
16:
17: import org.apache.tapestry.corelib.components.Radio;
18:
19: /**
20: * A container of {@link Radio} components, used to identify the element name used when rendering
21: * the individual radio buttons (all buttons in a group share the same element name) and to
22: */
23: public interface RadioContainer {
24: /**
25: * Returns the value used as the name attribute of the rendered element. This value will be
26: * unique within an enclosing form, even if the same component renders multiple times.
27: */
28: String getElementName();
29:
30: /**
31: * If true, then all buttons within the container should also be disabled.
32: */
33: boolean isDisabled();
34:
35: /**
36: * Converts an object to a client-side string representation of that value.
37: *
38: * @param value
39: * to convert (may be null)
40: * @return string representation of the value
41: * @see ValueEncoder#toClient(Object)
42: */
43: String toClient(Object value);
44:
45: /** Returns true if the value is the current selected value. */
46: boolean isSelected(Object value);
47: }
|