1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19 package org.apache.myfaces.custom.radio;
20
21 import javax.faces.component.UIComponentBase;
22
23 import org.apache.myfaces.component.AccesskeyProperty;
24 import org.apache.myfaces.component.AlignProperty;
25 import org.apache.myfaces.component.AltProperty;
26 import org.apache.myfaces.component.ChangeSelectProperties;
27 import org.apache.myfaces.component.DisabledClassEnabledClassProperties;
28 import org.apache.myfaces.component.EventAware;
29 import org.apache.myfaces.component.FocusBlurProperties;
30 import org.apache.myfaces.component.StyleAware;
31 import org.apache.myfaces.component.TabindexProperty;
32 import org.apache.myfaces.component.UniversalProperties;
33 import org.apache.myfaces.component.UserRoleAware;
34
35 /**
36 * This tag is used in conjunction with the extended selectOneRadio
37 * tag when the "spread" layout is selected. It specifies the
38 * position within the document that the radio button corresponding
39 * to a specific SelectItem should be rendered. All HTML pass-through
40 * attributes for this input are taken from the associated
41 * selectOneRadio.
42 *
43 * Unless otherwise specified, all attributes accept static values or EL expressions.
44 *
45 * @JSFComponent
46 * name = "t:radio"
47 * class = "org.apache.myfaces.custom.radio.HtmlRadio"
48 * tagClass = "org.apache.myfaces.custom.radio.HtmlRadioTag"
49 * @since 1.1.7
50 * @author Thomas Spiegl (latest modification by $Author: lu4242 $)
51 * @version $Revision: 691856 $ $Date: 2008-09-03 21:40:30 -0500 (miƩ, 03 sep 2008) $
52 */
53 public abstract class AbstractHtmlRadio
54 extends UIComponentBase implements UserRoleAware,
55 FocusBlurProperties, ChangeSelectProperties,
56 UniversalProperties, EventAware, AltProperty,
57 AlignProperty, StyleAware, AccesskeyProperty, TabindexProperty, DisabledClassEnabledClassProperties
58 {
59 //private static final Log log = LogFactory.getLog(HtmlRadio.class);
60
61 public static final String FOR_ATTR = "for".intern();
62 public static final String INDEX_ATTR = "index".intern();
63
64
65 public static final String COMPONENT_TYPE = "org.apache.myfaces.HtmlRadio";
66 public static final String COMPONENT_FAMILY = "org.apache.myfaces.Radio";
67 private static final String DEFAULT_RENDERER_TYPE = "org.apache.myfaces.Radio";
68
69 /**
70 * The id of the referenced extended selectOneRadio component.
71 * This value is resolved to the particular component using
72 * the standard UIComponent.findComponent() searching algorithm.
73 *
74 * @JSFProperty
75 * required="true"
76 */
77 public abstract String getFor();
78
79 /**
80 * The index of the corresponding SelectItem, where 0 represents the first SelectItem.
81 *
82 * @JSFProperty
83 * defaultValue = "Integer.MIN_VALUE"
84 * required="true"
85 */
86 public abstract int getIndex();
87
88 }