/** * Copyright 2014-2017 Riccardo Massera (TheCoder4.Eu) and Stephan Rauh (http://www.beyondjava.net). * * This file is part of BootsFaces. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package net.bootsfaces.component.radiobutton; import javax.faces.component.FacesComponent; import net.bootsfaces.component.inputText.InputText; /** This class holds the attributes of <b:radiobutton />. * The annotation is necessary to prevent Mojarra from confusing b:inputText with b:radioButtonCore. * The latter doesn't exist, making Mojarra crash. */ @FacesComponent("net.bootsfaces.component.radiobuttonCore.RadiobuttonCore") public abstract class RadiobuttonCore extends InputText implements net.bootsfaces.render.IHasTooltip { protected enum PropertyKeys { ajax, colLg, colMd, colSm, colXs, dir, disabled, display, hidden, immediate, itemLabel, itemValue, largeScreen, mediumScreen, offset, offsetLg, offsetMd, offsetSm, offsetXs, onclick, oncomplete, onerror, onsuccess, process, required, requiredMessage, smallScreen, span, style, styleClass, tinyScreen, tooltip, tooltipContainer, tooltipDelay, tooltipDelayHide, tooltipDelayShow, tooltipPosition, update, visible; String toString; PropertyKeys(String toString) { this.toString = toString; } PropertyKeys() { } public String toString() { return ((this.toString != null) ? this.toString : super.toString()); } } /** * Whether the Button submits the form with AJAX. <P> * @return Returns the value of the attribute, or , false, if it hasn't been set by the JSF file. */ public boolean isAjax() { return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.ajax, false); } /** * Whether the Button submits the form with AJAX. <P> * Usually this method is called internally by the JSF engine. */ public void setAjax(boolean _ajax) { getStateHelper().put(PropertyKeys.ajax, _ajax); } /** * Integer value to specify how many columns to span on large screens (≥1200 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * @return Returns the value of the attribute, or "-1", if it hasn't been set by the JSF file. */ public String getColLg() { return (String) getStateHelper().eval(PropertyKeys.colLg, "-1"); } /** * Integer value to specify how many columns to span on large screens (≥1200 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * Usually this method is called internally by the JSF engine. */ public void setColLg(String _colLg) { getStateHelper().put(PropertyKeys.colLg, _colLg); } /** * Integer value to specify how many columns to span on medium screens (≥992 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * @return Returns the value of the attribute, or "-1", if it hasn't been set by the JSF file. */ public String getColMd() { return (String) getStateHelper().eval(PropertyKeys.colMd, "-1"); } /** * Integer value to specify how many columns to span on medium screens (≥992 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * Usually this method is called internally by the JSF engine. */ public void setColMd(String _colMd) { getStateHelper().put(PropertyKeys.colMd, _colMd); } /** * Integer value to specify how many columns to span on small screens (≥768p pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * @return Returns the value of the attribute, or "-1", if it hasn't been set by the JSF file. */ public String getColSm() { return (String) getStateHelper().eval(PropertyKeys.colSm, "-1"); } /** * Integer value to specify how many columns to span on small screens (≥768p pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * Usually this method is called internally by the JSF engine. */ public void setColSm(String _colSm) { getStateHelper().put(PropertyKeys.colSm, _colSm); } /** * Integer value to specify how many columns to span on tiny screens (≤ 767 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * @return Returns the value of the attribute, or "-1", if it hasn't been set by the JSF file. */ public String getColXs() { return (String) getStateHelper().eval(PropertyKeys.colXs, "-1"); } /** * Integer value to specify how many columns to span on tiny screens (≤ 767 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * Usually this method is called internally by the JSF engine. */ public void setColXs(String _colXs) { getStateHelper().put(PropertyKeys.colXs, _colXs); } /** * Direction indication for text that does not inherit directionality. Legal values: ltr (Default. Left-to-right text direction), rtl (Right-to-left text direction) and auto (let the browser figure out the direction of your alphabet, based on the page content). <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getDir() { return (String) getStateHelper().eval(PropertyKeys.dir); } /** * Direction indication for text that does not inherit directionality. Legal values: ltr (Default. Left-to-right text direction), rtl (Right-to-left text direction) and auto (let the browser figure out the direction of your alphabet, based on the page content). <P> * Usually this method is called internally by the JSF engine. */ public void setDir(String _dir) { getStateHelper().put(PropertyKeys.dir, _dir); } /** * Boolean value to specify if the button is disabled. <P> * @return Returns the value of the attribute, or , false, if it hasn't been set by the JSF file. */ public boolean isDisabled() { return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.disabled, false); } /** * Boolean value to specify if the button is disabled. <P> * Usually this method is called internally by the JSF engine. */ public void setDisabled(boolean _disabled) { getStateHelper().put(PropertyKeys.disabled, _disabled); } /** * If you use the "visible" attribute, the value of this attribute is added. Legal values: block, inline, inline-block. Default: block. <P> * @return Returns the value of the attribute, or "block", if it hasn't been set by the JSF file. */ public String getDisplay() { return (String) getStateHelper().eval(PropertyKeys.display, "block"); } /** * If you use the "visible" attribute, the value of this attribute is added. Legal values: block, inline, inline-block. Default: block. <P> * Usually this method is called internally by the JSF engine. */ public void setDisplay(String _display) { getStateHelper().put(PropertyKeys.display, _display); } /** * This column is hidden on a certain screen size and below. Legal values: lg, md, sm, xs. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getHidden() { return (String) getStateHelper().eval(PropertyKeys.hidden); } /** * This column is hidden on a certain screen size and below. Legal values: lg, md, sm, xs. <P> * Usually this method is called internally by the JSF engine. */ public void setHidden(String _hidden) { getStateHelper().put(PropertyKeys.hidden, _hidden); } /** * Flag indicating that, if this component is activated by the user, notifications should be delivered to interested listeners and actions immediately (that is, during Apply Request Values phase) rather than waiting until Invoke Application phase. Default is false. <P> * @return Returns the value of the attribute, or , false, if it hasn't been set by the JSF file. */ public boolean isImmediate() { return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.immediate, false); } /** * Flag indicating that, if this component is activated by the user, notifications should be delivered to interested listeners and actions immediately (that is, during Apply Request Values phase) rather than waiting until Invoke Application phase. Default is false. <P> * Usually this method is called internally by the JSF engine. */ public void setImmediate(boolean _immediate) { getStateHelper().put(PropertyKeys.immediate, _immediate); } /** * The caption of the radio button. Alternatively you can use arbitrary captions by embedding them as child elements of the b:radiobutton. As a third alternative, you can follow the traditional JSF approach using <f:f:selectItem /> or <f:selectItems />. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getItemLabel() { return (String) getStateHelper().eval(PropertyKeys.itemLabel); } /** * The caption of the radio button. Alternatively you can use arbitrary captions by embedding them as child elements of the b:radiobutton. As a third alternative, you can follow the traditional JSF approach using <f:f:selectItem /> or <f:selectItems />. <P> * Usually this method is called internally by the JSF engine. */ public void setItemLabel(String _itemLabel) { getStateHelper().put(PropertyKeys.itemLabel, _itemLabel); } /** * Value of the item. Must be omitted if you use the traditional JSF approach using <f:selectItem /> or <f:selectItems />. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getItemValue() { return (String) getStateHelper().eval(PropertyKeys.itemValue); } /** * Value of the item. Must be omitted if you use the traditional JSF approach using <f:selectItem /> or <f:selectItems />. <P> * Usually this method is called internally by the JSF engine. */ public void setItemValue(String _itemValue) { getStateHelper().put(PropertyKeys.itemValue, _itemValue); } /** * Alternative spelling to col-lg. Integer value to specify how many columns to span on large screens (≥1200 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * @return Returns the value of the attribute, or "-1", if it hasn't been set by the JSF file. */ public String getLargeScreen() { return (String) getStateHelper().eval(PropertyKeys.largeScreen, "-1"); } /** * Alternative spelling to col-lg. Integer value to specify how many columns to span on large screens (≥1200 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * Usually this method is called internally by the JSF engine. */ public void setLargeScreen(String _largeScreen) { getStateHelper().put(PropertyKeys.largeScreen, _largeScreen); } /** * Alternative spelling to col-md. Integer value to specify how many columns to span on medium screens (≥992 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * @return Returns the value of the attribute, or "-1", if it hasn't been set by the JSF file. */ public String getMediumScreen() { return (String) getStateHelper().eval(PropertyKeys.mediumScreen, "-1"); } /** * Alternative spelling to col-md. Integer value to specify how many columns to span on medium screens (≥992 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * Usually this method is called internally by the JSF engine. */ public void setMediumScreen(String _mediumScreen) { getStateHelper().put(PropertyKeys.mediumScreen, _mediumScreen); } /** * Integer value to specify how many columns to offset. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getOffset() { return (String) getStateHelper().eval(PropertyKeys.offset); } /** * Integer value to specify how many columns to offset. <P> * Usually this method is called internally by the JSF engine. */ public void setOffset(String _offset) { getStateHelper().put(PropertyKeys.offset, _offset); } /** * Integer value to specify how many columns to offset. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getOffsetLg() { return (String) getStateHelper().eval(PropertyKeys.offsetLg); } /** * Integer value to specify how many columns to offset. <P> * Usually this method is called internally by the JSF engine. */ public void setOffsetLg(String _offsetLg) { getStateHelper().put(PropertyKeys.offsetLg, _offsetLg); } /** * Integer value to specify how many columns to offset. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getOffsetMd() { return (String) getStateHelper().eval(PropertyKeys.offsetMd); } /** * Integer value to specify how many columns to offset. <P> * Usually this method is called internally by the JSF engine. */ public void setOffsetMd(String _offsetMd) { getStateHelper().put(PropertyKeys.offsetMd, _offsetMd); } /** * Integer value to specify how many columns to offset. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getOffsetSm() { return (String) getStateHelper().eval(PropertyKeys.offsetSm); } /** * Integer value to specify how many columns to offset. <P> * Usually this method is called internally by the JSF engine. */ public void setOffsetSm(String _offsetSm) { getStateHelper().put(PropertyKeys.offsetSm, _offsetSm); } /** * Integer value to specify how many columns to offset. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getOffsetXs() { return (String) getStateHelper().eval(PropertyKeys.offsetXs); } /** * Integer value to specify how many columns to offset. <P> * Usually this method is called internally by the JSF engine. */ public void setOffsetXs(String _offsetXs) { getStateHelper().put(PropertyKeys.offsetXs, _offsetXs); } /** * The onclick attribute. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getOnclick() { return (String) getStateHelper().eval(PropertyKeys.onclick); } /** * The onclick attribute. <P> * Usually this method is called internally by the JSF engine. */ public void setOnclick(String _onclick) { getStateHelper().put(PropertyKeys.onclick, _onclick); } /** * JavaScript to be executed when ajax completes. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getOncomplete() { return (String) getStateHelper().eval(PropertyKeys.oncomplete); } /** * JavaScript to be executed when ajax completes. <P> * Usually this method is called internally by the JSF engine. */ public void setOncomplete(String _oncomplete) { getStateHelper().put(PropertyKeys.oncomplete, _oncomplete); } /** * JavaScript to be executed when ajax results on an error (including both network errors and Java exceptions). <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getOnerror() { return (String) getStateHelper().eval(PropertyKeys.onerror); } /** * JavaScript to be executed when ajax results on an error (including both network errors and Java exceptions). <P> * Usually this method is called internally by the JSF engine. */ public void setOnerror(String _onerror) { getStateHelper().put(PropertyKeys.onerror, _onerror); } /** * JavaScript to be executed when ajax completes with success (i.e. there's neither a network error nor a Java exception). <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getOnsuccess() { return (String) getStateHelper().eval(PropertyKeys.onsuccess); } /** * JavaScript to be executed when ajax completes with success (i.e. there's neither a network error nor a Java exception). <P> * Usually this method is called internally by the JSF engine. */ public void setOnsuccess(String _onsuccess) { getStateHelper().put(PropertyKeys.onsuccess, _onsuccess); } /** * Comma or space separated list of ids or search expressions denoting which values are to be sent to the server. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getProcess() { return (String) getStateHelper().eval(PropertyKeys.process); } /** * Comma or space separated list of ids or search expressions denoting which values are to be sent to the server. <P> * Usually this method is called internally by the JSF engine. */ public void setProcess(String _process) { getStateHelper().put(PropertyKeys.process, _process); } /** * Boolean value Require input in the component when the form is submitted. <P> * @return Returns the value of the attribute, or , false, if it hasn't been set by the JSF file. */ public boolean isRequired() { return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.required, false); } /** * Boolean value Require input in the component when the form is submitted. <P> * Usually this method is called internally by the JSF engine. */ public void setRequired(boolean _required) { getStateHelper().put(PropertyKeys.required, _required); } /** * Message to show if the user did not specify a value and the attribute required is set to true. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getRequiredMessage() { return (String) getStateHelper().eval(PropertyKeys.requiredMessage); } /** * Message to show if the user did not specify a value and the attribute required is set to true. <P> * Usually this method is called internally by the JSF engine. */ public void setRequiredMessage(String _requiredMessage) { getStateHelper().put(PropertyKeys.requiredMessage, _requiredMessage); } /** * Alternative spelling to col-sm. Integer value to specify how many columns to span on small screens (≥768p pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * @return Returns the value of the attribute, or "-1", if it hasn't been set by the JSF file. */ public String getSmallScreen() { return (String) getStateHelper().eval(PropertyKeys.smallScreen, "-1"); } /** * Alternative spelling to col-sm. Integer value to specify how many columns to span on small screens (≥768p pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * Usually this method is called internally by the JSF engine. */ public void setSmallScreen(String _smallScreen) { getStateHelper().put(PropertyKeys.smallScreen, _smallScreen); } /** * Integer value to specify how many columns to span on medium screens (≥992 pixels). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getSpan() { return (String) getStateHelper().eval(PropertyKeys.span); } /** * Integer value to specify how many columns to span on medium screens (≥992 pixels). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * Usually this method is called internally by the JSF engine. */ public void setSpan(String _span) { getStateHelper().put(PropertyKeys.span, _span); } /** * Inline style of the input element. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getStyle() { return (String) getStateHelper().eval(PropertyKeys.style); } /** * Inline style of the input element. <P> * Usually this method is called internally by the JSF engine. */ public void setStyle(String _style) { getStateHelper().put(PropertyKeys.style, _style); } /** * Style class of this element. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getStyleClass() { return (String) getStateHelper().eval(PropertyKeys.styleClass); } /** * Style class of this element. <P> * Usually this method is called internally by the JSF engine. */ public void setStyleClass(String _styleClass) { getStateHelper().put(PropertyKeys.styleClass, _styleClass); } /** * Alternative spelling to col-xs. Integer value to specify how many columns to span on tiny screens (≤ 767 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * @return Returns the value of the attribute, or "-1", if it hasn't been set by the JSF file. */ public String getTinyScreen() { return (String) getStateHelper().eval(PropertyKeys.tinyScreen, "-1"); } /** * Alternative spelling to col-xs. Integer value to specify how many columns to span on tiny screens (≤ 767 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * Usually this method is called internally by the JSF engine. */ public void setTinyScreen(String _tinyScreen) { getStateHelper().put(PropertyKeys.tinyScreen, _tinyScreen); } /** * The text of the tooltip. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getTooltip() { return (String) getStateHelper().eval(PropertyKeys.tooltip); } /** * The text of the tooltip. <P> * Usually this method is called internally by the JSF engine. */ public void setTooltip(String _tooltip) { getStateHelper().put(PropertyKeys.tooltip, _tooltip); } /** * Where is the tooltip div generated? That's primarily a technical value that can be used to fix rendering errors in special cases. Also see data-container in the documentation of Bootstrap. The default value is body. <P> * @return Returns the value of the attribute, or "body", if it hasn't been set by the JSF file. */ public String getTooltipContainer() { return (String) getStateHelper().eval(PropertyKeys.tooltipContainer, "body"); } /** * Where is the tooltip div generated? That's primarily a technical value that can be used to fix rendering errors in special cases. Also see data-container in the documentation of Bootstrap. The default value is body. <P> * Usually this method is called internally by the JSF engine. */ public void setTooltipContainer(String _tooltipContainer) { getStateHelper().put(PropertyKeys.tooltipContainer, _tooltipContainer); } /** * The tooltip is shown and hidden with a delay. This value is the delay in milliseconds. Defaults to 0 (no delay). <P> * @return Returns the value of the attribute, or 0, if it hasn't been set by the JSF file. */ public int getTooltipDelay() { return (int) (Integer) getStateHelper().eval(PropertyKeys.tooltipDelay, 0); } /** * The tooltip is shown and hidden with a delay. This value is the delay in milliseconds. Defaults to 0 (no delay). <P> * Usually this method is called internally by the JSF engine. */ public void setTooltipDelay(int _tooltipDelay) { getStateHelper().put(PropertyKeys.tooltipDelay, _tooltipDelay); } /** * The tooltip is hidden with a delay. This value is the delay in milliseconds. Defaults to 0 (no delay). <P> * @return Returns the value of the attribute, or 0, if it hasn't been set by the JSF file. */ public int getTooltipDelayHide() { return (int) (Integer) getStateHelper().eval(PropertyKeys.tooltipDelayHide, 0); } /** * The tooltip is hidden with a delay. This value is the delay in milliseconds. Defaults to 0 (no delay). <P> * Usually this method is called internally by the JSF engine. */ public void setTooltipDelayHide(int _tooltipDelayHide) { getStateHelper().put(PropertyKeys.tooltipDelayHide, _tooltipDelayHide); } /** * The tooltip is shown with a delay. This value is the delay in milliseconds. Defaults to 0 (no delay). <P> * @return Returns the value of the attribute, or 0, if it hasn't been set by the JSF file. */ public int getTooltipDelayShow() { return (int) (Integer) getStateHelper().eval(PropertyKeys.tooltipDelayShow, 0); } /** * The tooltip is shown with a delay. This value is the delay in milliseconds. Defaults to 0 (no delay). <P> * Usually this method is called internally by the JSF engine. */ public void setTooltipDelayShow(int _tooltipDelayShow) { getStateHelper().put(PropertyKeys.tooltipDelayShow, _tooltipDelayShow); } /** * Where is the tooltip to be displayed? Possible values: "top", "bottom", "right", "left", "auto", "auto top", "auto bottom", "auto right" and "auto left". Default to "bottom". <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getTooltipPosition() { return (String) getStateHelper().eval(PropertyKeys.tooltipPosition); } /** * Where is the tooltip to be displayed? Possible values: "top", "bottom", "right", "left", "auto", "auto top", "auto bottom", "auto right" and "auto left". Default to "bottom". <P> * Usually this method is called internally by the JSF engine. */ public void setTooltipPosition(String _tooltipPosition) { getStateHelper().put(PropertyKeys.tooltipPosition, _tooltipPosition); } /** * Component(s) to be updated with ajax. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getUpdate() { return (String) getStateHelper().eval(PropertyKeys.update); } /** * Component(s) to be updated with ajax. <P> * Usually this method is called internally by the JSF engine. */ public void setUpdate(String _update) { getStateHelper().put(PropertyKeys.update, _update); } /** * This column is shown on a certain screen size and above. Legal values: lg, md, sm, xs. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getVisible() { return (String) getStateHelper().eval(PropertyKeys.visible); } /** * This column is shown on a certain screen size and above. Legal values: lg, md, sm, xs. <P> * Usually this method is called internally by the JSF engine. */ public void setVisible(String _visible) { getStateHelper().put(PropertyKeys.visible, _visible); } }