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.EventAware; 28 import org.apache.myfaces.component.FocusBlurProperties; 29 import org.apache.myfaces.component.StyleAware; 30 import org.apache.myfaces.component.TabindexProperty; 31 import org.apache.myfaces.component.UniversalProperties; 32 import org.apache.myfaces.component.UserRoleAware; 33 34 /** 35 * This tag is used in conjunction with the extended selectOneRadio 36 * tag when the "spread" layout is selected. It specifies the 37 * position within the document that the radio button corresponding 38 * to a specific SelectItem should be rendered. All HTML pass-through 39 * attributes for this input are taken from the associated 40 * selectOneRadio. 41 * 42 * Unless otherwise specified, all attributes accept static values or EL expressions. 43 * 44 * @JSFComponent 45 * name = "t:radio" 46 * class = "org.apache.myfaces.custom.radio.HtmlRadio" 47 * tagClass = "org.apache.myfaces.custom.radio.HtmlRadioTag" 48 * @since 1.1.7 49 * @author Thomas Spiegl (latest modification by $Author: lu4242 $) 50 * @version $Revision: 1084267 $ $Date: 2011-03-22 12:49:43 -0500 (Tue, 22 Mar 2011) $ 51 */ 52 public abstract class AbstractHtmlRadio 53 extends UIComponentBase implements UserRoleAware, 54 FocusBlurProperties, ChangeSelectProperties, 55 UniversalProperties, EventAware, AltProperty, 56 AlignProperty, StyleAware, AccesskeyProperty, TabindexProperty 57 { 58 //private static final Log log = LogFactory.getLog(HtmlRadio.class); 59 60 public static final String FOR_ATTR = "for".intern(); 61 public static final String INDEX_ATTR = "index".intern(); 62 63 64 public static final String COMPONENT_TYPE = "org.apache.myfaces.HtmlRadio"; 65 public static final String COMPONENT_FAMILY = "org.apache.myfaces.Radio"; 66 private static final String DEFAULT_RENDERER_TYPE = "org.apache.myfaces.Radio"; 67 68 /** 69 * The id of the referenced extended selectOneRadio component. 70 * This value is resolved to the particular component using 71 * the standard UIComponent.findComponent() searching algorithm. 72 * 73 * @JSFProperty 74 * required="true" 75 */ 76 public abstract String getFor(); 77 78 /** 79 * The index of the corresponding SelectItem, where 0 represents the first SelectItem. 80 * 81 * @JSFProperty 82 * defaultValue = "Integer.MIN_VALUE" 83 * required="true" 84 */ 85 public abstract int getIndex(); 86 87 }