diff --git a/src/main/java/net/bootsfaces/component/ComponentUtils.java b/src/main/java/net/bootsfaces/component/ComponentUtils.java new file mode 100644 index 000000000..12c23b119 --- /dev/null +++ b/src/main/java/net/bootsfaces/component/ComponentUtils.java @@ -0,0 +1,29 @@ +package net.bootsfaces.component; + +import javax.faces.bean.ManagedBean; +import javax.faces.bean.RequestScoped; +import javax.faces.context.FacesContext; + +import net.bootsfaces.beans.ELTools; + +@ManagedBean +@RequestScoped +public class ComponentUtils { + private boolean renderLabelDefault = true; + + public ComponentUtils() { + String renderLabel = FacesContext.getCurrentInstance().getExternalContext() + .getInitParameter("net.bootsfaces.defaults.renderLabel"); + if (null != renderLabel && renderLabel.contains("#{")) { + renderLabelDefault = (Boolean) ELTools.evalAsObject(renderLabel); + } + else if (null != renderLabel) { + renderLabelDefault = Boolean.valueOf(renderLabel); + } + } + + public static boolean isRenderLabelDefault() { + ComponentUtils cu = (ComponentUtils) ELTools.evalAsObject("#{componentUtils}"); + return cu.renderLabelDefault; + } +} diff --git a/src/main/java/net/bootsfaces/component/inputText/InputText.java b/src/main/java/net/bootsfaces/component/inputText/InputText.java index 25a271730..0da51ff68 100644 --- a/src/main/java/net/bootsfaces/component/inputText/InputText.java +++ b/src/main/java/net/bootsfaces/component/inputText/InputText.java @@ -20,7 +20,6 @@ import javax.el.ValueExpression; import javax.faces.component.FacesComponent; -import javax.faces.component.html.HtmlInputText; import net.bootsfaces.C; import net.bootsfaces.beans.ELTools; @@ -35,7 +34,7 @@ * @author thecoder4.eu */ @FacesComponent("net.bootsfaces.component.inputText.InputText") -public class InputText extends HtmlInputText implements IHasTooltip, IAJAXComponent { +public class InputText extends InputTextCore implements IHasTooltip, IAJAXComponent { private String renderLabel = null; @@ -82,7 +81,7 @@ public InputText() { AddResourcesListener.addBasicJSResource("bsf", "js/bsf.js"); AddResourcesListener.addThemedCSSResource("core.css"); AddResourcesListener.addThemedCSSResource("bsf.css"); - renderLabel= BsfUtils.getInitParam("net.bootsfaces.defaults.renderLabel"); + renderLabel = BsfUtils.getInitParam("net.bootsfaces.defaults.renderLabel"); if (null != renderLabel && renderLabel.contains("#{")) { renderLabel = ELTools.evalAsString(renderLabel); } @@ -97,903 +96,4 @@ public void setValueExpression(String name, ValueExpression binding) { public String getFamily() { return COMPONENT_FAMILY; } - - protected enum PropertyKeys { - accesskey, - ajax, - alt, - autocomplete, - binding, - converterMessage, - dir, - disabled, - fieldSize, - immediate, - inline, - label, - lang, - maxlength, - onblur, - onchange, - onclick, - oncomplete, - ondblclick, - onfocus, - onkeydown, - onkeypress, - onkeyup, - onmousedown, - onmousemove, - onmouseout, - onmouseover, - onmouseup, - onselect, - placeholder, - process, - readonly, - renderLabel, - required, - requiredMessage, - size, - span, - style, - styleClass, - tabindex, - title, - tooltip, - tooltipContainer, - tooltipDelay, - tooltipDelayHide, - tooltipDelayShow, - tooltipPosition, - type, - update -; - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() {} - - public String toString() { - return ((this.toString != null) ? this.toString : super.toString()); - } - } - - - /** - * Access key to transfer focus to the input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getAccesskey() { - return (String)getStateHelper().eval(PropertyKeys.accesskey); - } - - /** - * Access key to transfer focus to the input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setAccesskey(String _accesskey) { - getStateHelper().put(PropertyKeys.accesskey, _accesskey); - } - - - /** - * Activates AJAX. The default value is false (no AJAX).

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isAjax() { - return (boolean) (Boolean)getStateHelper().eval(PropertyKeys.ajax, false); - } - - /** - * Activates AJAX. The default value is false (no AJAX).

- * Usually this method is called internally by the JSF engine. - */ - public void setAjax(boolean _ajax) { - getStateHelper().put(PropertyKeys.ajax, _ajax); - } - - - /** - * Alternate textual description of the input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getAlt() { - return (String)getStateHelper().eval(PropertyKeys.alt); - } - - /** - * Alternate textual description of the input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setAlt(String _alt) { - getStateHelper().put(PropertyKeys.alt, _alt); - } - - - /** - * Controls browser autocomplete behavior.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getAutocomplete() { - return (String)getStateHelper().eval(PropertyKeys.autocomplete); - } - - /** - * Controls browser autocomplete behavior.

- * Usually this method is called internally by the JSF engine. - */ - public void setAutocomplete(String _autocomplete) { - getStateHelper().put(PropertyKeys.autocomplete, _autocomplete); - } - - - /** - * An EL expression referring to a server side UIComponent instance in a backing bean.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public javax.faces.component.UIComponent getBinding() { - return (javax.faces.component.UIComponent)getStateHelper().eval(PropertyKeys.binding); - } - - /** - * An EL expression referring to a server side UIComponent instance in a backing bean.

- * Usually this method is called internally by the JSF engine. - */ - public void setBinding(javax.faces.component.UIComponent _binding) { - getStateHelper().put(PropertyKeys.binding, _binding); - } - - - /** - * Message to display when conversion fails.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getConverterMessage() { - return (String)getStateHelper().eval(PropertyKeys.converterMessage); - } - - /** - * Message to display when conversion fails.

- * Usually this method is called internally by the JSF engine. - */ - public void setConverterMessage(String _converterMessage) { - getStateHelper().put(PropertyKeys.converterMessage, _converterMessage); - } - - - /** - * 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).

- * @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).

- * Usually this method is called internally by the JSF engine. - */ - public void setDir(String _dir) { - getStateHelper().put(PropertyKeys.dir, _dir); - } - - - /** - * Disables the input element, default is false.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isDisabled() { - return (boolean) (Boolean)getStateHelper().eval(PropertyKeys.disabled, false); - } - - /** - * Disables the input element, default is false.

- * Usually this method is called internally by the JSF engine. - */ - public void setDisabled(boolean _disabled) { - getStateHelper().put(PropertyKeys.disabled, _disabled); - } - - - /** - * The size of the input. Possible values are xs (extra small), sm (small), md (medium) and lg (large) .

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getFieldSize() { - return (String)getStateHelper().eval(PropertyKeys.fieldSize); - } - - /** - * The size of the input. Possible values are xs (extra small), sm (small), md (medium) and lg (large) .

- * Usually this method is called internally by the JSF engine. - */ - public void setFieldSize(String _fieldSize) { - getStateHelper().put(PropertyKeys.fieldSize, _fieldSize); - } - - - /** - * 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.

- * @return Returns the value of the attribute, or null, 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.

- * Usually this method is called internally by the JSF engine. - */ - public void setImmediate(boolean _immediate) { - getStateHelper().put(PropertyKeys.immediate, _immediate); - } - - - /** - * Inline forms are more compact and put the label to the left hand side of the input field instead of putting it above the input field. Inline applies only to screens that are at least 768 pixels wide.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isInline() { - return (boolean) (Boolean)getStateHelper().eval(PropertyKeys.inline, false); - } - - /** - * Inline forms are more compact and put the label to the left hand side of the input field instead of putting it above the input field. Inline applies only to screens that are at least 768 pixels wide.

- * Usually this method is called internally by the JSF engine. - */ - public void setInline(boolean _inline) { - getStateHelper().put(PropertyKeys.inline, _inline); - } - - - /** - * The label of the field.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getLabel() { - return (String)getStateHelper().eval(PropertyKeys.label); - } - - /** - * The label of the field.

- * Usually this method is called internally by the JSF engine. - */ - public void setLabel(String _label) { - getStateHelper().put(PropertyKeys.label, _label); - } - - - /** - * Code describing the language used in the generated markup for this component.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getLang() { - return (String)getStateHelper().eval(PropertyKeys.lang); - } - - /** - * Code describing the language used in the generated markup for this component.

- * Usually this method is called internally by the JSF engine. - */ - public void setLang(String _lang) { - getStateHelper().put(PropertyKeys.lang, _lang); - } - - - /** - * The maximum length of the input.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public int getMaxlength() { - return (int) (Integer)getStateHelper().eval(PropertyKeys.maxlength, -1); - } - - /** - * The maximum length of the input.

- * Usually this method is called internally by the JSF engine. - */ - public void setMaxlength(int _maxlength) { - getStateHelper().put(PropertyKeys.maxlength, _maxlength); - } - - - /** - * Client side callback to execute when input element loses focus.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnblur() { - return (String)getStateHelper().eval(PropertyKeys.onblur); - } - - /** - * Client side callback to execute when input element loses focus.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnblur(String _onblur) { - getStateHelper().put(PropertyKeys.onblur, _onblur); - } - - - /** - * Client side callback to execute when input element loses focus and its value has been modified since gaining focus.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnchange() { - return (String)getStateHelper().eval(PropertyKeys.onchange); - } - - /** - * Client side callback to execute when input element loses focus and its value has been modified since gaining focus.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnchange(String _onchange) { - getStateHelper().put(PropertyKeys.onchange, _onchange); - } - - - /** - * OnClick DHTML event .

- * @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); - } - - /** - * OnClick DHTML event .

- * 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 with success.

- * @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 with success.

- * Usually this method is called internally by the JSF engine. - */ - public void setOncomplete(String _oncomplete) { - getStateHelper().put(PropertyKeys.oncomplete, _oncomplete); - } - - - /** - * Client side callback to execute when input element is double clicked.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOndblclick() { - return (String)getStateHelper().eval(PropertyKeys.ondblclick); - } - - /** - * Client side callback to execute when input element is double clicked.

- * Usually this method is called internally by the JSF engine. - */ - public void setOndblclick(String _ondblclick) { - getStateHelper().put(PropertyKeys.ondblclick, _ondblclick); - } - - - /** - * Client side callback to execute when input element receives focus.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnfocus() { - return (String)getStateHelper().eval(PropertyKeys.onfocus); - } - - /** - * Client side callback to execute when input element receives focus.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnfocus(String _onfocus) { - getStateHelper().put(PropertyKeys.onfocus, _onfocus); - } - - - /** - * Client side callback to execute when a key is pressed down over input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnkeydown() { - return (String)getStateHelper().eval(PropertyKeys.onkeydown); - } - - /** - * Client side callback to execute when a key is pressed down over input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnkeydown(String _onkeydown) { - getStateHelper().put(PropertyKeys.onkeydown, _onkeydown); - } - - - /** - * Client side callback to execute when a key is pressed and released over input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnkeypress() { - return (String)getStateHelper().eval(PropertyKeys.onkeypress); - } - - /** - * Client side callback to execute when a key is pressed and released over input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnkeypress(String _onkeypress) { - getStateHelper().put(PropertyKeys.onkeypress, _onkeypress); - } - - - /** - * Client side callback to execute when a key is released over input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnkeyup() { - return (String)getStateHelper().eval(PropertyKeys.onkeyup); - } - - /** - * Client side callback to execute when a key is released over input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnkeyup(String _onkeyup) { - getStateHelper().put(PropertyKeys.onkeyup, _onkeyup); - } - - - /** - * Client side callback to execute when a pointer input element is pressed down over input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnmousedown() { - return (String)getStateHelper().eval(PropertyKeys.onmousedown); - } - - /** - * Client side callback to execute when a pointer input element is pressed down over input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnmousedown(String _onmousedown) { - getStateHelper().put(PropertyKeys.onmousedown, _onmousedown); - } - - - /** - * Client side callback to execute when a pointer input element is moved within input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnmousemove() { - return (String)getStateHelper().eval(PropertyKeys.onmousemove); - } - - /** - * Client side callback to execute when a pointer input element is moved within input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnmousemove(String _onmousemove) { - getStateHelper().put(PropertyKeys.onmousemove, _onmousemove); - } - - - /** - * Client side callback to execute when a pointer input element is moved away from input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnmouseout() { - return (String)getStateHelper().eval(PropertyKeys.onmouseout); - } - - /** - * Client side callback to execute when a pointer input element is moved away from input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnmouseout(String _onmouseout) { - getStateHelper().put(PropertyKeys.onmouseout, _onmouseout); - } - - - /** - * Client side callback to execute when a pointer input element is moved onto input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnmouseover() { - return (String)getStateHelper().eval(PropertyKeys.onmouseover); - } - - /** - * Client side callback to execute when a pointer input element is moved onto input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnmouseover(String _onmouseover) { - getStateHelper().put(PropertyKeys.onmouseover, _onmouseover); - } - - - /** - * Client side callback to execute when a pointer input element is released over input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnmouseup() { - return (String)getStateHelper().eval(PropertyKeys.onmouseup); - } - - /** - * Client side callback to execute when a pointer input element is released over input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnmouseup(String _onmouseup) { - getStateHelper().put(PropertyKeys.onmouseup, _onmouseup); - } - - - /** - * Client side callback to execute when text within input element is selected by user.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnselect() { - return (String)getStateHelper().eval(PropertyKeys.onselect); - } - - /** - * Client side callback to execute when text within input element is selected by user.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnselect(String _onselect) { - getStateHelper().put(PropertyKeys.onselect, _onselect); - } - - - /** - * The placeholder attribute shows text in a field until the field is focused upon, then hides the text.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getPlaceholder() { - return (String)getStateHelper().eval(PropertyKeys.placeholder); - } - - /** - * The placeholder attribute shows text in a field until the field is focused upon, then hides the text.

- * Usually this method is called internally by the JSF engine. - */ - public void setPlaceholder(String _placeholder) { - getStateHelper().put(PropertyKeys.placeholder, _placeholder); - } - - - /** - * Comma or space separated list of ids or search expressions denoting which values are to be sent to the server.

- * @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.

- * Usually this method is called internally by the JSF engine. - */ - public void setProcess(String _process) { - getStateHelper().put(PropertyKeys.process, _process); - } - - - /** - * Flag indicating that this input element will prevent changes by the user.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isReadonly() { - return (boolean) (Boolean)getStateHelper().eval(PropertyKeys.readonly, false); - } - - /** - * Flag indicating that this input element will prevent changes by the user.

- * Usually this method is called internally by the JSF engine. - */ - public void setReadonly(boolean _readonly) { - getStateHelper().put(PropertyKeys.readonly, _readonly); - } - - - /** - * Allows you to suppress automatic rendering of labels. Used by AngularFaces, too.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isRenderLabel() { - return (boolean) (Boolean)getStateHelper().eval(PropertyKeys.renderLabel, false); - } - - /** - * Allows you to suppress automatic rendering of labels. Used by AngularFaces, too.

- * Usually this method is called internally by the JSF engine. - */ - public void setRenderLabel(boolean _renderLabel) { - getStateHelper().put(PropertyKeys.renderLabel, _renderLabel); - } - - - /** - * Boolean value Require input in the component when the form is submitted.

- * @return Returns the value of the attribute, or null, 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.

- * 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.

- * @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.

- * Usually this method is called internally by the JSF engine. - */ - public void setRequiredMessage(String _requiredMessage) { - getStateHelper().put(PropertyKeys.requiredMessage, _requiredMessage); - } - - - /** - * Number of characters used to determine the width of the input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public int getSize() { - return (int) (Integer)getStateHelper().eval(PropertyKeys.size, 0); - } - - /** - * Number of characters used to determine the width of the input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setSize(int _size) { - getStateHelper().put(PropertyKeys.size, _size); - } - - - /** - * The size of the input specified as number of grid columns.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public int getSpan() { - return (int) (Integer)getStateHelper().eval(PropertyKeys.span, 0); - } - - /** - * The size of the input specified as number of grid columns.

- * Usually this method is called internally by the JSF engine. - */ - public void setSpan(int _span) { - getStateHelper().put(PropertyKeys.span, _span); - } - - - /** - * Inline style of the input element.

- * @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.

- * Usually this method is called internally by the JSF engine. - */ - public void setStyle(String _style) { - getStateHelper().put(PropertyKeys.style, _style); - } - - - /** - * Style class of the input element.

- * @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 the input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setStyleClass(String _styleClass) { - getStateHelper().put(PropertyKeys.styleClass, _styleClass); - } - - - /** - * Position of this element in the tabbing order for the current document. This value must be an integer between 0 and 32767.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getTabindex() { - return (String)getStateHelper().eval(PropertyKeys.tabindex); - } - - /** - * Position of this element in the tabbing order for the current document. This value must be an integer between 0 and 32767.

- * Usually this method is called internally by the JSF engine. - */ - public void setTabindex(String _tabindex) { - getStateHelper().put(PropertyKeys.tabindex, _tabindex); - } - - - /** - * Advisory tooltip information.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getTitle() { - return (String)getStateHelper().eval(PropertyKeys.title); - } - - /** - * Advisory tooltip information.

- * Usually this method is called internally by the JSF engine. - */ - public void setTitle(String _title) { - getStateHelper().put(PropertyKeys.title, _title); - } - - - /** - * The text of the tooltip.

- * @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.

- * 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.

- * @return Returns the value of the attribute, or null, 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.

- * 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).

- * @return Returns the value of the attribute, or null, 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).

- * 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).

- * @return Returns the value of the attribute, or null, 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).

- * 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).

- * @return Returns the value of the attribute, or null, 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).

- * 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".

- * @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".

- * Usually this method is called internally by the JSF engine. - */ - public void setTooltipPosition(String _tooltipPosition) { - getStateHelper().put(PropertyKeys.tooltipPosition, _tooltipPosition); - } - - - /** - * Type of the input. The default is text.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getType() { - return (String)getStateHelper().eval(PropertyKeys.type); - } - - /** - * Type of the input. The default is text.

- * Usually this method is called internally by the JSF engine. - */ - public void setType(String _type) { - getStateHelper().put(PropertyKeys.type, _type); - } - - - /** - * Component(s) to be updated with ajax.

- * @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.

- * Usually this method is called internally by the JSF engine. - */ - public void setUpdate(String _update) { - getStateHelper().put(PropertyKeys.update, _update); - } - } - diff --git a/src/main/java/net/bootsfaces/component/inputText/InputTextCore.java b/src/main/java/net/bootsfaces/component/inputText/InputTextCore.java new file mode 100644 index 000000000..a74295bde --- /dev/null +++ b/src/main/java/net/bootsfaces/component/inputText/InputTextCore.java @@ -0,0 +1,876 @@ +/** + * Copyright 2014-16 by Riccardo Massera (TheCoder4.Eu), Dario D'Urzo and Stephan Rauh (http://www.beyondjava.net). + * + * This file is part of BootsFaces. + * + * BootsFaces is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * BootsFaces is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with BootsFaces. If not, see . + */ + +package net.bootsfaces.component.inputText; + +import javax.faces.component.html.HtmlInputText; + +/** This class holds the attributes of <b:inputText />. */ +public abstract class InputTextCore extends HtmlInputText implements net.bootsfaces.render.IHasTooltip { + + protected enum PropertyKeys { + accesskey, + ajax, + alt, + autocomplete, + binding, + converterMessage, + dir, + disabled, + fieldSize, + immediate, + inline, + label, + lang, + maxlength, + onblur, + onchange, + onclick, + oncomplete, + ondblclick, + onfocus, + onkeydown, + onkeypress, + onkeyup, + onmousedown, + onmousemove, + onmouseout, + onmouseover, + onmouseup, + onselect, + placeholder, + process, + readonly, + renderLabel, + required, + requiredMessage, + size, + span, + style, + styleClass, + tabindex, + title, + tooltip, + tooltipContainer, + tooltipDelay, + tooltipDelayHide, + tooltipDelayShow, + tooltipPosition, + type, + update; + String toString; + + PropertyKeys(String toString) { + this.toString = toString; + } + + PropertyKeys() { + } + + public String toString() { + return ((this.toString != null) ? this.toString : super.toString()); + } + } + + /** + * Access key to transfer focus to the input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getAccesskey() { + return (String) getStateHelper().eval(PropertyKeys.accesskey); + } + + /** + * Access key to transfer focus to the input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setAccesskey(String _accesskey) { + getStateHelper().put(PropertyKeys.accesskey, _accesskey); + } + + /** + * Activates AJAX. The default value is false (no AJAX).

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isAjax() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.ajax, false); + } + + /** + * Activates AJAX. The default value is false (no AJAX).

+ * Usually this method is called internally by the JSF engine. + */ + public void setAjax(boolean _ajax) { + getStateHelper().put(PropertyKeys.ajax, _ajax); + } + + /** + * Alternate textual description of the input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getAlt() { + return (String) getStateHelper().eval(PropertyKeys.alt); + } + + /** + * Alternate textual description of the input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setAlt(String _alt) { + getStateHelper().put(PropertyKeys.alt, _alt); + } + + /** + * Controls browser autocomplete behavior.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getAutocomplete() { + return (String) getStateHelper().eval(PropertyKeys.autocomplete); + } + + /** + * Controls browser autocomplete behavior.

+ * Usually this method is called internally by the JSF engine. + */ + public void setAutocomplete(String _autocomplete) { + getStateHelper().put(PropertyKeys.autocomplete, _autocomplete); + } + + /** + * An EL expression referring to a server side UIComponent instance in a backing bean.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public javax.faces.component.UIComponent getBinding() { + return (javax.faces.component.UIComponent) getStateHelper().eval(PropertyKeys.binding); + } + + /** + * An EL expression referring to a server side UIComponent instance in a backing bean.

+ * Usually this method is called internally by the JSF engine. + */ + public void setBinding(javax.faces.component.UIComponent _binding) { + getStateHelper().put(PropertyKeys.binding, _binding); + } + + /** + * Message to display when conversion fails.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getConverterMessage() { + return (String) getStateHelper().eval(PropertyKeys.converterMessage); + } + + /** + * Message to display when conversion fails.

+ * Usually this method is called internally by the JSF engine. + */ + public void setConverterMessage(String _converterMessage) { + getStateHelper().put(PropertyKeys.converterMessage, _converterMessage); + } + + /** + * 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).

+ * @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).

+ * Usually this method is called internally by the JSF engine. + */ + public void setDir(String _dir) { + getStateHelper().put(PropertyKeys.dir, _dir); + } + + /** + * Disables the input element, default is false.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isDisabled() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.disabled, false); + } + + /** + * Disables the input element, default is false.

+ * Usually this method is called internally by the JSF engine. + */ + public void setDisabled(boolean _disabled) { + getStateHelper().put(PropertyKeys.disabled, _disabled); + } + + /** + * The size of the input. Possible values are xs (extra small), sm (small), md (medium) and lg (large) .

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getFieldSize() { + return (String) getStateHelper().eval(PropertyKeys.fieldSize); + } + + /** + * The size of the input. Possible values are xs (extra small), sm (small), md (medium) and lg (large) .

+ * Usually this method is called internally by the JSF engine. + */ + public void setFieldSize(String _fieldSize) { + getStateHelper().put(PropertyKeys.fieldSize, _fieldSize); + } + + /** + * 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.

+ * @return Returns the value of the attribute, or null, 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.

+ * Usually this method is called internally by the JSF engine. + */ + public void setImmediate(boolean _immediate) { + getStateHelper().put(PropertyKeys.immediate, _immediate); + } + + /** + * Inline forms are more compact and put the label to the left hand side of the input field instead of putting it above the input field. Inline applies only to screens that are at least 768 pixels wide.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isInline() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.inline, false); + } + + /** + * Inline forms are more compact and put the label to the left hand side of the input field instead of putting it above the input field. Inline applies only to screens that are at least 768 pixels wide.

+ * Usually this method is called internally by the JSF engine. + */ + public void setInline(boolean _inline) { + getStateHelper().put(PropertyKeys.inline, _inline); + } + + /** + * The label of the field.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getLabel() { + return (String) getStateHelper().eval(PropertyKeys.label); + } + + /** + * The label of the field.

+ * Usually this method is called internally by the JSF engine. + */ + public void setLabel(String _label) { + getStateHelper().put(PropertyKeys.label, _label); + } + + /** + * Code describing the language used in the generated markup for this component.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getLang() { + return (String) getStateHelper().eval(PropertyKeys.lang); + } + + /** + * Code describing the language used in the generated markup for this component.

+ * Usually this method is called internally by the JSF engine. + */ + public void setLang(String _lang) { + getStateHelper().put(PropertyKeys.lang, _lang); + } + + /** + * The maximum length of the input.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public int getMaxlength() { + return (int) (Integer) getStateHelper().eval(PropertyKeys.maxlength, -1); + } + + /** + * The maximum length of the input.

+ * Usually this method is called internally by the JSF engine. + */ + public void setMaxlength(int _maxlength) { + getStateHelper().put(PropertyKeys.maxlength, _maxlength); + } + + /** + * Client side callback to execute when input element loses focus.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnblur() { + return (String) getStateHelper().eval(PropertyKeys.onblur); + } + + /** + * Client side callback to execute when input element loses focus.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnblur(String _onblur) { + getStateHelper().put(PropertyKeys.onblur, _onblur); + } + + /** + * Client side callback to execute when input element loses focus and its value has been modified since gaining focus.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnchange() { + return (String) getStateHelper().eval(PropertyKeys.onchange); + } + + /** + * Client side callback to execute when input element loses focus and its value has been modified since gaining focus.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnchange(String _onchange) { + getStateHelper().put(PropertyKeys.onchange, _onchange); + } + + /** + * OnClick DHTML event .

+ * @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); + } + + /** + * OnClick DHTML event .

+ * 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 with success.

+ * @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 with success.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOncomplete(String _oncomplete) { + getStateHelper().put(PropertyKeys.oncomplete, _oncomplete); + } + + /** + * Client side callback to execute when input element is double clicked.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOndblclick() { + return (String) getStateHelper().eval(PropertyKeys.ondblclick); + } + + /** + * Client side callback to execute when input element is double clicked.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOndblclick(String _ondblclick) { + getStateHelper().put(PropertyKeys.ondblclick, _ondblclick); + } + + /** + * Client side callback to execute when input element receives focus.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnfocus() { + return (String) getStateHelper().eval(PropertyKeys.onfocus); + } + + /** + * Client side callback to execute when input element receives focus.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnfocus(String _onfocus) { + getStateHelper().put(PropertyKeys.onfocus, _onfocus); + } + + /** + * Client side callback to execute when a key is pressed down over input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnkeydown() { + return (String) getStateHelper().eval(PropertyKeys.onkeydown); + } + + /** + * Client side callback to execute when a key is pressed down over input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnkeydown(String _onkeydown) { + getStateHelper().put(PropertyKeys.onkeydown, _onkeydown); + } + + /** + * Client side callback to execute when a key is pressed and released over input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnkeypress() { + return (String) getStateHelper().eval(PropertyKeys.onkeypress); + } + + /** + * Client side callback to execute when a key is pressed and released over input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnkeypress(String _onkeypress) { + getStateHelper().put(PropertyKeys.onkeypress, _onkeypress); + } + + /** + * Client side callback to execute when a key is released over input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnkeyup() { + return (String) getStateHelper().eval(PropertyKeys.onkeyup); + } + + /** + * Client side callback to execute when a key is released over input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnkeyup(String _onkeyup) { + getStateHelper().put(PropertyKeys.onkeyup, _onkeyup); + } + + /** + * Client side callback to execute when a pointer input element is pressed down over input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnmousedown() { + return (String) getStateHelper().eval(PropertyKeys.onmousedown); + } + + /** + * Client side callback to execute when a pointer input element is pressed down over input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnmousedown(String _onmousedown) { + getStateHelper().put(PropertyKeys.onmousedown, _onmousedown); + } + + /** + * Client side callback to execute when a pointer input element is moved within input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnmousemove() { + return (String) getStateHelper().eval(PropertyKeys.onmousemove); + } + + /** + * Client side callback to execute when a pointer input element is moved within input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnmousemove(String _onmousemove) { + getStateHelper().put(PropertyKeys.onmousemove, _onmousemove); + } + + /** + * Client side callback to execute when a pointer input element is moved away from input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnmouseout() { + return (String) getStateHelper().eval(PropertyKeys.onmouseout); + } + + /** + * Client side callback to execute when a pointer input element is moved away from input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnmouseout(String _onmouseout) { + getStateHelper().put(PropertyKeys.onmouseout, _onmouseout); + } + + /** + * Client side callback to execute when a pointer input element is moved onto input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnmouseover() { + return (String) getStateHelper().eval(PropertyKeys.onmouseover); + } + + /** + * Client side callback to execute when a pointer input element is moved onto input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnmouseover(String _onmouseover) { + getStateHelper().put(PropertyKeys.onmouseover, _onmouseover); + } + + /** + * Client side callback to execute when a pointer input element is released over input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnmouseup() { + return (String) getStateHelper().eval(PropertyKeys.onmouseup); + } + + /** + * Client side callback to execute when a pointer input element is released over input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnmouseup(String _onmouseup) { + getStateHelper().put(PropertyKeys.onmouseup, _onmouseup); + } + + /** + * Client side callback to execute when text within input element is selected by user.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnselect() { + return (String) getStateHelper().eval(PropertyKeys.onselect); + } + + /** + * Client side callback to execute when text within input element is selected by user.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnselect(String _onselect) { + getStateHelper().put(PropertyKeys.onselect, _onselect); + } + + /** + * The placeholder attribute shows text in a field until the field is focused upon, then hides the text.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getPlaceholder() { + return (String) getStateHelper().eval(PropertyKeys.placeholder); + } + + /** + * The placeholder attribute shows text in a field until the field is focused upon, then hides the text.

+ * Usually this method is called internally by the JSF engine. + */ + public void setPlaceholder(String _placeholder) { + getStateHelper().put(PropertyKeys.placeholder, _placeholder); + } + + /** + * Comma or space separated list of ids or search expressions denoting which values are to be sent to the server.

+ * @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.

+ * Usually this method is called internally by the JSF engine. + */ + public void setProcess(String _process) { + getStateHelper().put(PropertyKeys.process, _process); + } + + /** + * Flag indicating that this input element will prevent changes by the user.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isReadonly() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.readonly, false); + } + + /** + * Flag indicating that this input element will prevent changes by the user.

+ * Usually this method is called internally by the JSF engine. + */ + public void setReadonly(boolean _readonly) { + getStateHelper().put(PropertyKeys.readonly, _readonly); + } + + /** + * Allows you to suppress automatic rendering of labels. Used by AngularFaces, too.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isRenderLabel() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.renderLabel, + net.bootsfaces.component.ComponentUtils.isRenderLabelDefault()); + } + + /** + * Allows you to suppress automatic rendering of labels. Used by AngularFaces, too.

+ * Usually this method is called internally by the JSF engine. + */ + public void setRenderLabel(boolean _renderLabel) { + getStateHelper().put(PropertyKeys.renderLabel, _renderLabel); + } + + /** + * Boolean value Require input in the component when the form is submitted.

+ * @return Returns the value of the attribute, or null, 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.

+ * 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.

+ * @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.

+ * Usually this method is called internally by the JSF engine. + */ + public void setRequiredMessage(String _requiredMessage) { + getStateHelper().put(PropertyKeys.requiredMessage, _requiredMessage); + } + + /** + * Number of characters used to determine the width of the input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public int getSize() { + return (int) (Integer) getStateHelper().eval(PropertyKeys.size, 0); + } + + /** + * Number of characters used to determine the width of the input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setSize(int _size) { + getStateHelper().put(PropertyKeys.size, _size); + } + + /** + * The size of the input specified as number of grid columns.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public int getSpan() { + return (int) (Integer) getStateHelper().eval(PropertyKeys.span, 0); + } + + /** + * The size of the input specified as number of grid columns.

+ * Usually this method is called internally by the JSF engine. + */ + public void setSpan(int _span) { + getStateHelper().put(PropertyKeys.span, _span); + } + + /** + * Inline style of the input element.

+ * @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.

+ * Usually this method is called internally by the JSF engine. + */ + public void setStyle(String _style) { + getStateHelper().put(PropertyKeys.style, _style); + } + + /** + * Style class of the input element.

+ * @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 the input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setStyleClass(String _styleClass) { + getStateHelper().put(PropertyKeys.styleClass, _styleClass); + } + + /** + * Position of this element in the tabbing order for the current document. This value must be an integer between 0 and 32767.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getTabindex() { + return (String) getStateHelper().eval(PropertyKeys.tabindex); + } + + /** + * Position of this element in the tabbing order for the current document. This value must be an integer between 0 and 32767.

+ * Usually this method is called internally by the JSF engine. + */ + public void setTabindex(String _tabindex) { + getStateHelper().put(PropertyKeys.tabindex, _tabindex); + } + + /** + * Advisory tooltip information.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getTitle() { + return (String) getStateHelper().eval(PropertyKeys.title); + } + + /** + * Advisory tooltip information.

+ * Usually this method is called internally by the JSF engine. + */ + public void setTitle(String _title) { + getStateHelper().put(PropertyKeys.title, _title); + } + + /** + * The text of the tooltip.

+ * @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.

+ * 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.

+ * @return Returns the value of the attribute, or null, 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.

+ * 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).

+ * @return Returns the value of the attribute, or null, 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).

+ * 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).

+ * @return Returns the value of the attribute, or null, 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).

+ * 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).

+ * @return Returns the value of the attribute, or null, 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).

+ * 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".

+ * @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".

+ * Usually this method is called internally by the JSF engine. + */ + public void setTooltipPosition(String _tooltipPosition) { + getStateHelper().put(PropertyKeys.tooltipPosition, _tooltipPosition); + } + + /** + * Type of the input. The default is text.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getType() { + return (String) getStateHelper().eval(PropertyKeys.type); + } + + /** + * Type of the input. The default is text.

+ * Usually this method is called internally by the JSF engine. + */ + public void setType(String _type) { + getStateHelper().put(PropertyKeys.type, _type); + } + + /** + * Component(s) to be updated with ajax.

+ * @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.

+ * Usually this method is called internally by the JSF engine. + */ + public void setUpdate(String _update) { + getStateHelper().put(PropertyKeys.update, _update); + } + +} diff --git a/src/main/java/net/bootsfaces/component/inputTextarea/InputTextarea.java b/src/main/java/net/bootsfaces/component/inputTextarea/InputTextarea.java index 89b06280b..5e06df1bf 100644 --- a/src/main/java/net/bootsfaces/component/inputTextarea/InputTextarea.java +++ b/src/main/java/net/bootsfaces/component/inputTextarea/InputTextarea.java @@ -20,7 +20,6 @@ import javax.el.ValueExpression; import javax.faces.component.FacesComponent; -import javax.faces.component.html.HtmlInputText; import net.bootsfaces.C; import net.bootsfaces.component.ajax.IAJAXComponent; @@ -34,9 +33,7 @@ * @author thecoder4.eu */ @FacesComponent("net.bootsfaces.component.inputTextarea.InputTextarea") -public class InputTextarea extends HtmlInputText implements IHasTooltip, IAJAXComponent { - private String renderLabel = null; - +public class InputTextarea extends InputTextareaCore implements IHasTooltip, IAJAXComponent { /** *

* The standard component type for this component. @@ -91,870 +88,4 @@ public void setValueExpression(String name, ValueExpression binding) { name = BsfUtils.snakeCaseToCamelCase(name); super.setValueExpression(name, binding); } - - protected enum PropertyKeys { - accesskey, - ajax, - alt, - autocomplete, - binding, - converterMessage, - dir, - disabled, - fieldSize, - immediate, - inline, - label, - lang, - maxlength, - onblur, - onchange, - onclick, - oncomplete, - ondblclick, - onfocus, - onkeydown, - onkeypress, - onkeyup, - onmousedown, - onmousemove, - onmouseout, - onmouseover, - onmouseup, - onselect, - placeholder, - process, - readonly, - renderLabel, - required, - requiredMessage, - rows, - size, - span, - style, - styleClass, - tabindex, - title, - tooltip, - tooltipContainer, - tooltipDelay, - tooltipDelayHide, - tooltipDelayShow, - tooltipPosition, - type, - update; - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - public String toString() { - return ((this.toString != null) ? this.toString : super.toString()); - } - } - - /** - * Access key to transfer focus to the input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getAccesskey() { - return (String) getStateHelper().eval(PropertyKeys.accesskey); - } - - /** - * Access key to transfer focus to the input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setAccesskey(String _accesskey) { - getStateHelper().put(PropertyKeys.accesskey, _accesskey); - } - - /** - * Activates AJAX. The default value is false (no AJAX).

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isAjax() { - return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.ajax, false); - } - - /** - * Activates AJAX. The default value is false (no AJAX).

- * Usually this method is called internally by the JSF engine. - */ - public void setAjax(boolean _ajax) { - getStateHelper().put(PropertyKeys.ajax, _ajax); - } - - /** - * Alternate textual description of the input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getAlt() { - return (String) getStateHelper().eval(PropertyKeys.alt); - } - - /** - * Alternate textual description of the input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setAlt(String _alt) { - getStateHelper().put(PropertyKeys.alt, _alt); - } - - /** - * Controls browser autocomplete behavior.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getAutocomplete() { - return (String) getStateHelper().eval(PropertyKeys.autocomplete); - } - - /** - * Controls browser autocomplete behavior.

- * Usually this method is called internally by the JSF engine. - */ - public void setAutocomplete(String _autocomplete) { - getStateHelper().put(PropertyKeys.autocomplete, _autocomplete); - } - - /** - * An EL expression referring to a server side UIComponent instance in a backing bean.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public javax.faces.component.UIComponent getBinding() { - return (javax.faces.component.UIComponent) getStateHelper().eval(PropertyKeys.binding); - } - - /** - * An EL expression referring to a server side UIComponent instance in a backing bean.

- * Usually this method is called internally by the JSF engine. - */ - public void setBinding(javax.faces.component.UIComponent _binding) { - getStateHelper().put(PropertyKeys.binding, _binding); - } - - /** - * Message to display when conversion fails.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getConverterMessage() { - return (String) getStateHelper().eval(PropertyKeys.converterMessage); - } - - /** - * Message to display when conversion fails.

- * Usually this method is called internally by the JSF engine. - */ - public void setConverterMessage(String _converterMessage) { - getStateHelper().put(PropertyKeys.converterMessage, _converterMessage); - } - - /** - * 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).

- * @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).

- * Usually this method is called internally by the JSF engine. - */ - public void setDir(String _dir) { - getStateHelper().put(PropertyKeys.dir, _dir); - } - - /** - * Disables the input element, default is false.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isDisabled() { - return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.disabled, false); - } - - /** - * Disables the input element, default is false.

- * Usually this method is called internally by the JSF engine. - */ - public void setDisabled(boolean _disabled) { - getStateHelper().put(PropertyKeys.disabled, _disabled); - } - - /** - * The size of the input. Possible values are xs (extra small), sm (small), md (medium) and lg (large) .

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getFieldSize() { - return (String) getStateHelper().eval(PropertyKeys.fieldSize); - } - - /** - * The size of the input. Possible values are xs (extra small), sm (small), md (medium) and lg (large) .

- * Usually this method is called internally by the JSF engine. - */ - public void setFieldSize(String _fieldSize) { - getStateHelper().put(PropertyKeys.fieldSize, _fieldSize); - } - - /** - * 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.

- * @return Returns the value of the attribute, or null, 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.

- * Usually this method is called internally by the JSF engine. - */ - public void setImmediate(boolean _immediate) { - getStateHelper().put(PropertyKeys.immediate, _immediate); - } - - /** - * Inline forms are more compact and put the label to the left hand side of the input field instead of putting it above the input field. Inline applies only to screens that are at least 768 pixels wide.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isInline() { - return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.inline, false); - } - - /** - * Inline forms are more compact and put the label to the left hand side of the input field instead of putting it above the input field. Inline applies only to screens that are at least 768 pixels wide.

- * Usually this method is called internally by the JSF engine. - */ - public void setInline(boolean _inline) { - getStateHelper().put(PropertyKeys.inline, _inline); - } - - /** - * The label of the field.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getLabel() { - return (String) getStateHelper().eval(PropertyKeys.label); - } - - /** - * The label of the field.

- * Usually this method is called internally by the JSF engine. - */ - public void setLabel(String _label) { - getStateHelper().put(PropertyKeys.label, _label); - } - - /** - * Code describing the language used in the generated markup for this component.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getLang() { - return (String) getStateHelper().eval(PropertyKeys.lang); - } - - /** - * Code describing the language used in the generated markup for this component.

- * Usually this method is called internally by the JSF engine. - */ - public void setLang(String _lang) { - getStateHelper().put(PropertyKeys.lang, _lang); - } - - /** - * The maximum length of the input.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public int getMaxlength() { - return (int) (Integer) getStateHelper().eval(PropertyKeys.maxlength, -1); - } - - /** - * The maximum length of the input.

- * Usually this method is called internally by the JSF engine. - */ - public void setMaxlength(int _maxlength) { - getStateHelper().put(PropertyKeys.maxlength, _maxlength); - } - - /** - * Client side callback to execute when input element loses focus.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnblur() { - return (String) getStateHelper().eval(PropertyKeys.onblur); - } - - /** - * Client side callback to execute when input element loses focus.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnblur(String _onblur) { - getStateHelper().put(PropertyKeys.onblur, _onblur); - } - - /** - * Client side callback to execute when input element loses focus and its value has been modified since gaining focus.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnchange() { - return (String) getStateHelper().eval(PropertyKeys.onchange); - } - - /** - * Client side callback to execute when input element loses focus and its value has been modified since gaining focus.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnchange(String _onchange) { - getStateHelper().put(PropertyKeys.onchange, _onchange); - } - - /** - * OnClick DHTML event .

- * @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); - } - - /** - * OnClick DHTML event .

- * 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 with success.

- * @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 with success.

- * Usually this method is called internally by the JSF engine. - */ - public void setOncomplete(String _oncomplete) { - getStateHelper().put(PropertyKeys.oncomplete, _oncomplete); - } - - /** - * Client side callback to execute when input element is double clicked.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOndblclick() { - return (String) getStateHelper().eval(PropertyKeys.ondblclick); - } - - /** - * Client side callback to execute when input element is double clicked.

- * Usually this method is called internally by the JSF engine. - */ - public void setOndblclick(String _ondblclick) { - getStateHelper().put(PropertyKeys.ondblclick, _ondblclick); - } - - /** - * Client side callback to execute when input element receives focus.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnfocus() { - return (String) getStateHelper().eval(PropertyKeys.onfocus); - } - - /** - * Client side callback to execute when input element receives focus.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnfocus(String _onfocus) { - getStateHelper().put(PropertyKeys.onfocus, _onfocus); - } - - /** - * Client side callback to execute when a key is pressed down over input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnkeydown() { - return (String) getStateHelper().eval(PropertyKeys.onkeydown); - } - - /** - * Client side callback to execute when a key is pressed down over input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnkeydown(String _onkeydown) { - getStateHelper().put(PropertyKeys.onkeydown, _onkeydown); - } - - /** - * Client side callback to execute when a key is pressed and released over input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnkeypress() { - return (String) getStateHelper().eval(PropertyKeys.onkeypress); - } - - /** - * Client side callback to execute when a key is pressed and released over input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnkeypress(String _onkeypress) { - getStateHelper().put(PropertyKeys.onkeypress, _onkeypress); - } - - /** - * Client side callback to execute when a key is released over input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnkeyup() { - return (String) getStateHelper().eval(PropertyKeys.onkeyup); - } - - /** - * Client side callback to execute when a key is released over input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnkeyup(String _onkeyup) { - getStateHelper().put(PropertyKeys.onkeyup, _onkeyup); - } - - /** - * Client side callback to execute when a pointer input element is pressed down over input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnmousedown() { - return (String) getStateHelper().eval(PropertyKeys.onmousedown); - } - - /** - * Client side callback to execute when a pointer input element is pressed down over input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnmousedown(String _onmousedown) { - getStateHelper().put(PropertyKeys.onmousedown, _onmousedown); - } - - /** - * Client side callback to execute when a pointer input element is moved within input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnmousemove() { - return (String) getStateHelper().eval(PropertyKeys.onmousemove); - } - - /** - * Client side callback to execute when a pointer input element is moved within input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnmousemove(String _onmousemove) { - getStateHelper().put(PropertyKeys.onmousemove, _onmousemove); - } - - /** - * Client side callback to execute when a pointer input element is moved away from input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnmouseout() { - return (String) getStateHelper().eval(PropertyKeys.onmouseout); - } - - /** - * Client side callback to execute when a pointer input element is moved away from input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnmouseout(String _onmouseout) { - getStateHelper().put(PropertyKeys.onmouseout, _onmouseout); - } - - /** - * Client side callback to execute when a pointer input element is moved onto input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnmouseover() { - return (String) getStateHelper().eval(PropertyKeys.onmouseover); - } - - /** - * Client side callback to execute when a pointer input element is moved onto input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnmouseover(String _onmouseover) { - getStateHelper().put(PropertyKeys.onmouseover, _onmouseover); - } - - /** - * Client side callback to execute when a pointer input element is released over input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnmouseup() { - return (String) getStateHelper().eval(PropertyKeys.onmouseup); - } - - /** - * Client side callback to execute when a pointer input element is released over input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnmouseup(String _onmouseup) { - getStateHelper().put(PropertyKeys.onmouseup, _onmouseup); - } - - /** - * Client side callback to execute when text within input element is selected by user.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnselect() { - return (String) getStateHelper().eval(PropertyKeys.onselect); - } - - /** - * Client side callback to execute when text within input element is selected by user.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnselect(String _onselect) { - getStateHelper().put(PropertyKeys.onselect, _onselect); - } - - /** - * The placeholder attribute shows text in a field until the field is focused upon, then hides the text.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getPlaceholder() { - return (String) getStateHelper().eval(PropertyKeys.placeholder); - } - - /** - * The placeholder attribute shows text in a field until the field is focused upon, then hides the text.

- * Usually this method is called internally by the JSF engine. - */ - public void setPlaceholder(String _placeholder) { - getStateHelper().put(PropertyKeys.placeholder, _placeholder); - } - - /** - * Comma or space separated list of ids or search expressions denoting which values are to be sent to the server.

- * @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.

- * Usually this method is called internally by the JSF engine. - */ - public void setProcess(String _process) { - getStateHelper().put(PropertyKeys.process, _process); - } - - /** - * Flag indicating that this input element will prevent changes by the user.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isReadonly() { - return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.readonly, false); - } - - /** - * Flag indicating that this input element will prevent changes by the user.

- * Usually this method is called internally by the JSF engine. - */ - public void setReadonly(boolean _readonly) { - getStateHelper().put(PropertyKeys.readonly, _readonly); - } - - /** - * Allows you to suppress automatic rendering of labels. Used by AngularFaces, too.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isRenderLabel() { - return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.renderLabel, false); - } - - /** - * Allows you to suppress automatic rendering of labels. Used by AngularFaces, too.

- * Usually this method is called internally by the JSF engine. - */ - public void setRenderLabel(boolean _renderLabel) { - getStateHelper().put(PropertyKeys.renderLabel, _renderLabel); - } - - /** - * Boolean value Require input in the component when the form is submitted.

- * @return Returns the value of the attribute, or null, 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.

- * 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.

- * @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.

- * Usually this method is called internally by the JSF engine. - */ - public void setRequiredMessage(String _requiredMessage) { - getStateHelper().put(PropertyKeys.requiredMessage, _requiredMessage); - } - - /** - * Number of rows

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public int getRows() { - return (int) (Integer) getStateHelper().eval(PropertyKeys.rows, 5); - } - - /** - * Number of rows

- * Usually this method is called internally by the JSF engine. - */ - public void setRows(int _rows) { - getStateHelper().put(PropertyKeys.rows, _rows); - } - - /** - * Number of characters used to determine the width of the input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public int getSize() { - return (int) (Integer) getStateHelper().eval(PropertyKeys.size, 0); - } - - /** - * Number of characters used to determine the width of the input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setSize(int _size) { - getStateHelper().put(PropertyKeys.size, _size); - } - - /** - * The size of the input specified as number of grid columns.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public int getSpan() { - return (int) (Integer) getStateHelper().eval(PropertyKeys.span, 0); - } - - /** - * The size of the input specified as number of grid columns.

- * Usually this method is called internally by the JSF engine. - */ - public void setSpan(int _span) { - getStateHelper().put(PropertyKeys.span, _span); - } - - /** - * Inline style of the input element.

- * @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.

- * Usually this method is called internally by the JSF engine. - */ - public void setStyle(String _style) { - getStateHelper().put(PropertyKeys.style, _style); - } - - /** - * Style class of the input element.

- * @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 the input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setStyleClass(String _styleClass) { - getStateHelper().put(PropertyKeys.styleClass, _styleClass); - } - - /** - * Position of this element in the tabbing order for the current document. This value must be an integer between 0 and 32767.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getTabindex() { - return (String) getStateHelper().eval(PropertyKeys.tabindex); - } - - /** - * Position of this element in the tabbing order for the current document. This value must be an integer between 0 and 32767.

- * Usually this method is called internally by the JSF engine. - */ - public void setTabindex(String _tabindex) { - getStateHelper().put(PropertyKeys.tabindex, _tabindex); - } - - /** - * Advisory tooltip information.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getTitle() { - return (String) getStateHelper().eval(PropertyKeys.title); - } - - /** - * Advisory tooltip information.

- * Usually this method is called internally by the JSF engine. - */ - public void setTitle(String _title) { - getStateHelper().put(PropertyKeys.title, _title); - } - - /** - * The text of the tooltip.

- * @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.

- * 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.

- * @return Returns the value of the attribute, or null, 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.

- * 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).

- * @return Returns the value of the attribute, or null, 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).

- * 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).

- * @return Returns the value of the attribute, or null, 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).

- * 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).

- * @return Returns the value of the attribute, or null, 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).

- * 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".

- * @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".

- * Usually this method is called internally by the JSF engine. - */ - public void setTooltipPosition(String _tooltipPosition) { - getStateHelper().put(PropertyKeys.tooltipPosition, _tooltipPosition); - } - - /** - * Type of the input. The default is text.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getType() { - return (String) getStateHelper().eval(PropertyKeys.type); - } - - /** - * Type of the input. The default is text.

- * Usually this method is called internally by the JSF engine. - */ - public void setType(String _type) { - getStateHelper().put(PropertyKeys.type, _type); - } - - /** - * Component(s) to be updated with ajax.

- * @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.

- * Usually this method is called internally by the JSF engine. - */ - public void setUpdate(String _update) { - getStateHelper().put(PropertyKeys.update, _update); - } - } diff --git a/src/main/java/net/bootsfaces/component/inputTextarea/InputTextareaCore.java b/src/main/java/net/bootsfaces/component/inputTextarea/InputTextareaCore.java new file mode 100644 index 000000000..47bc7c2a1 --- /dev/null +++ b/src/main/java/net/bootsfaces/component/inputTextarea/InputTextareaCore.java @@ -0,0 +1,893 @@ +/** + * Copyright 2014-16 by Riccardo Massera (TheCoder4.Eu), Dario D'Urzo and Stephan Rauh (http://www.beyondjava.net). + * + * This file is part of BootsFaces. + * + * BootsFaces is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * BootsFaces is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with BootsFaces. If not, see . + */ + +package net.bootsfaces.component.inputTextarea; + +import javax.faces.component.html.HtmlInputText; + +/** This class holds the attributes of <b:inputTextarea />. */ +public abstract class InputTextareaCore extends HtmlInputText implements net.bootsfaces.render.IHasTooltip { + + protected enum PropertyKeys { + accesskey, + ajax, + alt, + autocomplete, + binding, + converterMessage, + dir, + disabled, + fieldSize, + immediate, + inline, + label, + lang, + maxlength, + onblur, + onchange, + onclick, + oncomplete, + ondblclick, + onfocus, + onkeydown, + onkeypress, + onkeyup, + onmousedown, + onmousemove, + onmouseout, + onmouseover, + onmouseup, + onselect, + placeholder, + process, + readonly, + renderLabel, + required, + requiredMessage, + rows, + size, + span, + style, + styleClass, + tabindex, + title, + tooltip, + tooltipContainer, + tooltipDelay, + tooltipDelayHide, + tooltipDelayShow, + tooltipPosition, + type, + update; + String toString; + + PropertyKeys(String toString) { + this.toString = toString; + } + + PropertyKeys() { + } + + public String toString() { + return ((this.toString != null) ? this.toString : super.toString()); + } + } + + /** + * Access key to transfer focus to the input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getAccesskey() { + return (String) getStateHelper().eval(PropertyKeys.accesskey); + } + + /** + * Access key to transfer focus to the input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setAccesskey(String _accesskey) { + getStateHelper().put(PropertyKeys.accesskey, _accesskey); + } + + /** + * Activates AJAX. The default value is false (no AJAX).

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isAjax() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.ajax, false); + } + + /** + * Activates AJAX. The default value is false (no AJAX).

+ * Usually this method is called internally by the JSF engine. + */ + public void setAjax(boolean _ajax) { + getStateHelper().put(PropertyKeys.ajax, _ajax); + } + + /** + * Alternate textual description of the input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getAlt() { + return (String) getStateHelper().eval(PropertyKeys.alt); + } + + /** + * Alternate textual description of the input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setAlt(String _alt) { + getStateHelper().put(PropertyKeys.alt, _alt); + } + + /** + * Controls browser autocomplete behavior.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getAutocomplete() { + return (String) getStateHelper().eval(PropertyKeys.autocomplete); + } + + /** + * Controls browser autocomplete behavior.

+ * Usually this method is called internally by the JSF engine. + */ + public void setAutocomplete(String _autocomplete) { + getStateHelper().put(PropertyKeys.autocomplete, _autocomplete); + } + + /** + * An EL expression referring to a server side UIComponent instance in a backing bean.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public javax.faces.component.UIComponent getBinding() { + return (javax.faces.component.UIComponent) getStateHelper().eval(PropertyKeys.binding); + } + + /** + * An EL expression referring to a server side UIComponent instance in a backing bean.

+ * Usually this method is called internally by the JSF engine. + */ + public void setBinding(javax.faces.component.UIComponent _binding) { + getStateHelper().put(PropertyKeys.binding, _binding); + } + + /** + * Message to display when conversion fails.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getConverterMessage() { + return (String) getStateHelper().eval(PropertyKeys.converterMessage); + } + + /** + * Message to display when conversion fails.

+ * Usually this method is called internally by the JSF engine. + */ + public void setConverterMessage(String _converterMessage) { + getStateHelper().put(PropertyKeys.converterMessage, _converterMessage); + } + + /** + * 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).

+ * @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).

+ * Usually this method is called internally by the JSF engine. + */ + public void setDir(String _dir) { + getStateHelper().put(PropertyKeys.dir, _dir); + } + + /** + * Disables the input element, default is false.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isDisabled() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.disabled, false); + } + + /** + * Disables the input element, default is false.

+ * Usually this method is called internally by the JSF engine. + */ + public void setDisabled(boolean _disabled) { + getStateHelper().put(PropertyKeys.disabled, _disabled); + } + + /** + * The size of the input. Possible values are xs (extra small), sm (small), md (medium) and lg (large) .

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getFieldSize() { + return (String) getStateHelper().eval(PropertyKeys.fieldSize); + } + + /** + * The size of the input. Possible values are xs (extra small), sm (small), md (medium) and lg (large) .

+ * Usually this method is called internally by the JSF engine. + */ + public void setFieldSize(String _fieldSize) { + getStateHelper().put(PropertyKeys.fieldSize, _fieldSize); + } + + /** + * 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.

+ * @return Returns the value of the attribute, or null, 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.

+ * Usually this method is called internally by the JSF engine. + */ + public void setImmediate(boolean _immediate) { + getStateHelper().put(PropertyKeys.immediate, _immediate); + } + + /** + * Inline forms are more compact and put the label to the left hand side of the input field instead of putting it above the input field. Inline applies only to screens that are at least 768 pixels wide.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isInline() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.inline, false); + } + + /** + * Inline forms are more compact and put the label to the left hand side of the input field instead of putting it above the input field. Inline applies only to screens that are at least 768 pixels wide.

+ * Usually this method is called internally by the JSF engine. + */ + public void setInline(boolean _inline) { + getStateHelper().put(PropertyKeys.inline, _inline); + } + + /** + * The label of the field.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getLabel() { + return (String) getStateHelper().eval(PropertyKeys.label); + } + + /** + * The label of the field.

+ * Usually this method is called internally by the JSF engine. + */ + public void setLabel(String _label) { + getStateHelper().put(PropertyKeys.label, _label); + } + + /** + * Code describing the language used in the generated markup for this component.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getLang() { + return (String) getStateHelper().eval(PropertyKeys.lang); + } + + /** + * Code describing the language used in the generated markup for this component.

+ * Usually this method is called internally by the JSF engine. + */ + public void setLang(String _lang) { + getStateHelper().put(PropertyKeys.lang, _lang); + } + + /** + * The maximum length of the input.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public int getMaxlength() { + return (int) (Integer) getStateHelper().eval(PropertyKeys.maxlength, -1); + } + + /** + * The maximum length of the input.

+ * Usually this method is called internally by the JSF engine. + */ + public void setMaxlength(int _maxlength) { + getStateHelper().put(PropertyKeys.maxlength, _maxlength); + } + + /** + * Client side callback to execute when input element loses focus.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnblur() { + return (String) getStateHelper().eval(PropertyKeys.onblur); + } + + /** + * Client side callback to execute when input element loses focus.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnblur(String _onblur) { + getStateHelper().put(PropertyKeys.onblur, _onblur); + } + + /** + * Client side callback to execute when input element loses focus and its value has been modified since gaining focus.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnchange() { + return (String) getStateHelper().eval(PropertyKeys.onchange); + } + + /** + * Client side callback to execute when input element loses focus and its value has been modified since gaining focus.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnchange(String _onchange) { + getStateHelper().put(PropertyKeys.onchange, _onchange); + } + + /** + * OnClick DHTML event .

+ * @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); + } + + /** + * OnClick DHTML event .

+ * 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 with success.

+ * @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 with success.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOncomplete(String _oncomplete) { + getStateHelper().put(PropertyKeys.oncomplete, _oncomplete); + } + + /** + * Client side callback to execute when input element is double clicked.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOndblclick() { + return (String) getStateHelper().eval(PropertyKeys.ondblclick); + } + + /** + * Client side callback to execute when input element is double clicked.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOndblclick(String _ondblclick) { + getStateHelper().put(PropertyKeys.ondblclick, _ondblclick); + } + + /** + * Client side callback to execute when input element receives focus.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnfocus() { + return (String) getStateHelper().eval(PropertyKeys.onfocus); + } + + /** + * Client side callback to execute when input element receives focus.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnfocus(String _onfocus) { + getStateHelper().put(PropertyKeys.onfocus, _onfocus); + } + + /** + * Client side callback to execute when a key is pressed down over input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnkeydown() { + return (String) getStateHelper().eval(PropertyKeys.onkeydown); + } + + /** + * Client side callback to execute when a key is pressed down over input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnkeydown(String _onkeydown) { + getStateHelper().put(PropertyKeys.onkeydown, _onkeydown); + } + + /** + * Client side callback to execute when a key is pressed and released over input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnkeypress() { + return (String) getStateHelper().eval(PropertyKeys.onkeypress); + } + + /** + * Client side callback to execute when a key is pressed and released over input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnkeypress(String _onkeypress) { + getStateHelper().put(PropertyKeys.onkeypress, _onkeypress); + } + + /** + * Client side callback to execute when a key is released over input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnkeyup() { + return (String) getStateHelper().eval(PropertyKeys.onkeyup); + } + + /** + * Client side callback to execute when a key is released over input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnkeyup(String _onkeyup) { + getStateHelper().put(PropertyKeys.onkeyup, _onkeyup); + } + + /** + * Client side callback to execute when a pointer input element is pressed down over input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnmousedown() { + return (String) getStateHelper().eval(PropertyKeys.onmousedown); + } + + /** + * Client side callback to execute when a pointer input element is pressed down over input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnmousedown(String _onmousedown) { + getStateHelper().put(PropertyKeys.onmousedown, _onmousedown); + } + + /** + * Client side callback to execute when a pointer input element is moved within input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnmousemove() { + return (String) getStateHelper().eval(PropertyKeys.onmousemove); + } + + /** + * Client side callback to execute when a pointer input element is moved within input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnmousemove(String _onmousemove) { + getStateHelper().put(PropertyKeys.onmousemove, _onmousemove); + } + + /** + * Client side callback to execute when a pointer input element is moved away from input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnmouseout() { + return (String) getStateHelper().eval(PropertyKeys.onmouseout); + } + + /** + * Client side callback to execute when a pointer input element is moved away from input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnmouseout(String _onmouseout) { + getStateHelper().put(PropertyKeys.onmouseout, _onmouseout); + } + + /** + * Client side callback to execute when a pointer input element is moved onto input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnmouseover() { + return (String) getStateHelper().eval(PropertyKeys.onmouseover); + } + + /** + * Client side callback to execute when a pointer input element is moved onto input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnmouseover(String _onmouseover) { + getStateHelper().put(PropertyKeys.onmouseover, _onmouseover); + } + + /** + * Client side callback to execute when a pointer input element is released over input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnmouseup() { + return (String) getStateHelper().eval(PropertyKeys.onmouseup); + } + + /** + * Client side callback to execute when a pointer input element is released over input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnmouseup(String _onmouseup) { + getStateHelper().put(PropertyKeys.onmouseup, _onmouseup); + } + + /** + * Client side callback to execute when text within input element is selected by user.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnselect() { + return (String) getStateHelper().eval(PropertyKeys.onselect); + } + + /** + * Client side callback to execute when text within input element is selected by user.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnselect(String _onselect) { + getStateHelper().put(PropertyKeys.onselect, _onselect); + } + + /** + * The placeholder attribute shows text in a field until the field is focused upon, then hides the text.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getPlaceholder() { + return (String) getStateHelper().eval(PropertyKeys.placeholder); + } + + /** + * The placeholder attribute shows text in a field until the field is focused upon, then hides the text.

+ * Usually this method is called internally by the JSF engine. + */ + public void setPlaceholder(String _placeholder) { + getStateHelper().put(PropertyKeys.placeholder, _placeholder); + } + + /** + * Comma or space separated list of ids or search expressions denoting which values are to be sent to the server.

+ * @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.

+ * Usually this method is called internally by the JSF engine. + */ + public void setProcess(String _process) { + getStateHelper().put(PropertyKeys.process, _process); + } + + /** + * Flag indicating that this input element will prevent changes by the user.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isReadonly() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.readonly, false); + } + + /** + * Flag indicating that this input element will prevent changes by the user.

+ * Usually this method is called internally by the JSF engine. + */ + public void setReadonly(boolean _readonly) { + getStateHelper().put(PropertyKeys.readonly, _readonly); + } + + /** + * Allows you to suppress automatic rendering of labels. Used by AngularFaces, too.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isRenderLabel() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.renderLabel, + net.bootsfaces.component.ComponentUtils.isRenderLabelDefault()); + } + + /** + * Allows you to suppress automatic rendering of labels. Used by AngularFaces, too.

+ * Usually this method is called internally by the JSF engine. + */ + public void setRenderLabel(boolean _renderLabel) { + getStateHelper().put(PropertyKeys.renderLabel, _renderLabel); + } + + /** + * Boolean value Require input in the component when the form is submitted.

+ * @return Returns the value of the attribute, or null, 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.

+ * 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.

+ * @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.

+ * Usually this method is called internally by the JSF engine. + */ + public void setRequiredMessage(String _requiredMessage) { + getStateHelper().put(PropertyKeys.requiredMessage, _requiredMessage); + } + + /** + * Number of rows

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public int getRows() { + return (int) (Integer) getStateHelper().eval(PropertyKeys.rows, 5); + } + + /** + * Number of rows

+ * Usually this method is called internally by the JSF engine. + */ + public void setRows(int _rows) { + getStateHelper().put(PropertyKeys.rows, _rows); + } + + /** + * Number of characters used to determine the width of the input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public int getSize() { + return (int) (Integer) getStateHelper().eval(PropertyKeys.size, 0); + } + + /** + * Number of characters used to determine the width of the input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setSize(int _size) { + getStateHelper().put(PropertyKeys.size, _size); + } + + /** + * The size of the input specified as number of grid columns.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public int getSpan() { + return (int) (Integer) getStateHelper().eval(PropertyKeys.span, 0); + } + + /** + * The size of the input specified as number of grid columns.

+ * Usually this method is called internally by the JSF engine. + */ + public void setSpan(int _span) { + getStateHelper().put(PropertyKeys.span, _span); + } + + /** + * Inline style of the input element.

+ * @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.

+ * Usually this method is called internally by the JSF engine. + */ + public void setStyle(String _style) { + getStateHelper().put(PropertyKeys.style, _style); + } + + /** + * Style class of the input element.

+ * @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 the input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setStyleClass(String _styleClass) { + getStateHelper().put(PropertyKeys.styleClass, _styleClass); + } + + /** + * Position of this element in the tabbing order for the current document. This value must be an integer between 0 and 32767.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getTabindex() { + return (String) getStateHelper().eval(PropertyKeys.tabindex); + } + + /** + * Position of this element in the tabbing order for the current document. This value must be an integer between 0 and 32767.

+ * Usually this method is called internally by the JSF engine. + */ + public void setTabindex(String _tabindex) { + getStateHelper().put(PropertyKeys.tabindex, _tabindex); + } + + /** + * Advisory tooltip information.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getTitle() { + return (String) getStateHelper().eval(PropertyKeys.title); + } + + /** + * Advisory tooltip information.

+ * Usually this method is called internally by the JSF engine. + */ + public void setTitle(String _title) { + getStateHelper().put(PropertyKeys.title, _title); + } + + /** + * The text of the tooltip.

+ * @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.

+ * 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.

+ * @return Returns the value of the attribute, or null, 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.

+ * 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).

+ * @return Returns the value of the attribute, or null, 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).

+ * 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).

+ * @return Returns the value of the attribute, or null, 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).

+ * 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).

+ * @return Returns the value of the attribute, or null, 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).

+ * 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".

+ * @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".

+ * Usually this method is called internally by the JSF engine. + */ + public void setTooltipPosition(String _tooltipPosition) { + getStateHelper().put(PropertyKeys.tooltipPosition, _tooltipPosition); + } + + /** + * Type of the input. The default is text.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getType() { + return (String) getStateHelper().eval(PropertyKeys.type); + } + + /** + * Type of the input. The default is text.

+ * Usually this method is called internally by the JSF engine. + */ + public void setType(String _type) { + getStateHelper().put(PropertyKeys.type, _type); + } + + /** + * Component(s) to be updated with ajax.

+ * @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.

+ * Usually this method is called internally by the JSF engine. + */ + public void setUpdate(String _update) { + getStateHelper().put(PropertyKeys.update, _update); + } + +} diff --git a/src/main/java/net/bootsfaces/component/selectBooleanCheckbox/SelectBooleanCheckbox.java b/src/main/java/net/bootsfaces/component/selectBooleanCheckbox/SelectBooleanCheckbox.java index 67ee46ab1..6881fd03b 100644 --- a/src/main/java/net/bootsfaces/component/selectBooleanCheckbox/SelectBooleanCheckbox.java +++ b/src/main/java/net/bootsfaces/component/selectBooleanCheckbox/SelectBooleanCheckbox.java @@ -26,7 +26,6 @@ import javax.el.ValueExpression; import javax.faces.component.FacesComponent; -import javax.faces.component.html.HtmlInputText; import net.bootsfaces.component.ajax.IAJAXComponent; import net.bootsfaces.listeners.AddResourcesListener; @@ -35,8 +34,7 @@ /** This class holds the attributes of <b:selectBooleanCheckbox />. */ @FacesComponent("net.bootsfaces.component.selectBooleanCheckbox.SelectBooleanCheckbox") -public class SelectBooleanCheckbox extends HtmlInputText implements net.bootsfaces.render.IHasTooltip, IAJAXComponent { - private String renderLabel = null; +public class SelectBooleanCheckbox extends SelectBooleanCheckboxCore implements net.bootsfaces.render.IHasTooltip, IAJAXComponent { public static final String COMPONENT_TYPE = "net.bootsfaces.component.selectBooleanCheckbox.SelectBooleanCheckbox"; @@ -74,8 +72,6 @@ public String getDefaultEventName() { public SelectBooleanCheckbox() { Tooltip.addResourceFiles(); -// AddResourcesListener.addBasicJSResource("javax.faces", "jsf.js"); -// AddResourcesListener.addBasicJSResource("bsf", "js/bsf.js"); AddResourcesListener.addThemedCSSResource("bsf.css"); AddResourcesListener.addThemedCSSResource("core.css"); setRendererType(DEFAULT_RENDERER); @@ -84,777 +80,4 @@ public SelectBooleanCheckbox() { public String getFamily() { return COMPONENT_FAMILY; } - - protected enum PropertyKeys { - accesskey, - ajax, - alt, - binding, - caption, - converterMessage, - dir, - disabled, - fieldSize, - immediate, - label, - lang, - onblur, - onchange, - onclick, - oncomplete, - ondblclick, - onfocus, - onkeydown, - onkeypress, - onkeyup, - onmousedown, - onmousemove, - onmouseout, - onmouseover, - onmouseup, - onselect, - process, - readonly, - renderLabel, - span, - style, - styleClass, - tabindex, - title, - tooltip, - tooltipContainer, - tooltipDelay, - tooltipDelayHide, - tooltipDelayShow, - tooltipPosition, - update -; - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() {} - - public String toString() { - return ((this.toString != null) ? this.toString : super.toString()); - } - } - - - /** - * Access key to transfer focus to the input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getAccesskey() { - return (String)getStateHelper().eval(PropertyKeys.accesskey); - } - - /** - * Access key to transfer focus to the input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setAccesskey(String _accesskey) { - getStateHelper().put(PropertyKeys.accesskey, _accesskey); - } - - - /** - * Activates AJAX. The default value is false (no AJAX).

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isAjax() { - return (boolean) (Boolean)getStateHelper().eval(PropertyKeys.ajax, false); - } - - /** - * Activates AJAX. The default value is false (no AJAX).

- * Usually this method is called internally by the JSF engine. - */ - public void setAjax(boolean _ajax) { - getStateHelper().put(PropertyKeys.ajax, _ajax); - } - - - /** - * Alternate textual description of the input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getAlt() { - return (String)getStateHelper().eval(PropertyKeys.alt); - } - - /** - * Alternate textual description of the input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setAlt(String _alt) { - getStateHelper().put(PropertyKeys.alt, _alt); - } - - - /** - * An EL expression referring to a server side UIComponent instance in a backing bean.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public javax.faces.component.UIComponent getBinding() { - return (javax.faces.component.UIComponent)getStateHelper().eval(PropertyKeys.binding); - } - - /** - * An EL expression referring to a server side UIComponent instance in a backing bean.

- * Usually this method is called internally by the JSF engine. - */ - public void setBinding(javax.faces.component.UIComponent _binding) { - getStateHelper().put(PropertyKeys.binding, _binding); - } - - - /** - * Caption of the check box (text behind the check box, as opposed to the label, which may be above the check box)

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getCaption() { - return (String)getStateHelper().eval(PropertyKeys.caption); - } - - /** - * Caption of the check box (text behind the check box, as opposed to the label, which may be above the check box)

- * Usually this method is called internally by the JSF engine. - */ - public void setCaption(String _caption) { - getStateHelper().put(PropertyKeys.caption, _caption); - } - - - /** - * Message to display when conversion fails.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getConverterMessage() { - return (String)getStateHelper().eval(PropertyKeys.converterMessage); - } - - /** - * Message to display when conversion fails.

- * Usually this method is called internally by the JSF engine. - */ - public void setConverterMessage(String _converterMessage) { - getStateHelper().put(PropertyKeys.converterMessage, _converterMessage); - } - - - /** - * 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).

- * @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).

- * Usually this method is called internally by the JSF engine. - */ - public void setDir(String _dir) { - getStateHelper().put(PropertyKeys.dir, _dir); - } - - - /** - * Disables the input element, default is false.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isDisabled() { - return (boolean) (Boolean)getStateHelper().eval(PropertyKeys.disabled, false); - } - - /** - * Disables the input element, default is false.

- * Usually this method is called internally by the JSF engine. - */ - public void setDisabled(boolean _disabled) { - getStateHelper().put(PropertyKeys.disabled, _disabled); - } - - - /** - * The size of the input. Possible values are xs (extra small), sm (small), md (medium) and lg (large) .

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getFieldSize() { - return (String)getStateHelper().eval(PropertyKeys.fieldSize); - } - - /** - * The size of the input. Possible values are xs (extra small), sm (small), md (medium) and lg (large) .

- * Usually this method is called internally by the JSF engine. - */ - public void setFieldSize(String _fieldSize) { - getStateHelper().put(PropertyKeys.fieldSize, _fieldSize); - } - - - /** - * 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.

- * @return Returns the value of the attribute, or null, 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.

- * Usually this method is called internally by the JSF engine. - */ - public void setImmediate(boolean _immediate) { - getStateHelper().put(PropertyKeys.immediate, _immediate); - } - - - /** - * The label above of the field .

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getLabel() { - return (String)getStateHelper().eval(PropertyKeys.label); - } - - /** - * The label above of the field .

- * Usually this method is called internally by the JSF engine. - */ - public void setLabel(String _label) { - getStateHelper().put(PropertyKeys.label, _label); - } - - - /** - * Code describing the language used in the generated markup for this component.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getLang() { - return (String)getStateHelper().eval(PropertyKeys.lang); - } - - /** - * Code describing the language used in the generated markup for this component.

- * Usually this method is called internally by the JSF engine. - */ - public void setLang(String _lang) { - getStateHelper().put(PropertyKeys.lang, _lang); - } - - - /** - * Client side callback to execute when input element loses focus.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnblur() { - return (String)getStateHelper().eval(PropertyKeys.onblur); - } - - /** - * Client side callback to execute when input element loses focus.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnblur(String _onblur) { - getStateHelper().put(PropertyKeys.onblur, _onblur); - } - - - /** - * Client side callback to execute when input element loses focus and its value has been modified since gaining focus.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnchange() { - return (String)getStateHelper().eval(PropertyKeys.onchange); - } - - /** - * Client side callback to execute when input element loses focus and its value has been modified since gaining focus.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnchange(String _onchange) { - getStateHelper().put(PropertyKeys.onchange, _onchange); - } - - - /** - * OnClick DHTML event .

- * @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); - } - - /** - * OnClick DHTML event .

- * 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 with success.

- * @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 with success.

- * Usually this method is called internally by the JSF engine. - */ - public void setOncomplete(String _oncomplete) { - getStateHelper().put(PropertyKeys.oncomplete, _oncomplete); - } - - - /** - * Client side callback to execute when input element is double clicked.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOndblclick() { - return (String)getStateHelper().eval(PropertyKeys.ondblclick); - } - - /** - * Client side callback to execute when input element is double clicked.

- * Usually this method is called internally by the JSF engine. - */ - public void setOndblclick(String _ondblclick) { - getStateHelper().put(PropertyKeys.ondblclick, _ondblclick); - } - - - /** - * Client side callback to execute when input element receives focus.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnfocus() { - return (String)getStateHelper().eval(PropertyKeys.onfocus); - } - - /** - * Client side callback to execute when input element receives focus.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnfocus(String _onfocus) { - getStateHelper().put(PropertyKeys.onfocus, _onfocus); - } - - - /** - * Client side callback to execute when a key is pressed down over input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnkeydown() { - return (String)getStateHelper().eval(PropertyKeys.onkeydown); - } - - /** - * Client side callback to execute when a key is pressed down over input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnkeydown(String _onkeydown) { - getStateHelper().put(PropertyKeys.onkeydown, _onkeydown); - } - - - /** - * Client side callback to execute when a key is pressed and released over input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnkeypress() { - return (String)getStateHelper().eval(PropertyKeys.onkeypress); - } - - /** - * Client side callback to execute when a key is pressed and released over input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnkeypress(String _onkeypress) { - getStateHelper().put(PropertyKeys.onkeypress, _onkeypress); - } - - - /** - * Client side callback to execute when a key is released over input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnkeyup() { - return (String)getStateHelper().eval(PropertyKeys.onkeyup); - } - - /** - * Client side callback to execute when a key is released over input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnkeyup(String _onkeyup) { - getStateHelper().put(PropertyKeys.onkeyup, _onkeyup); - } - - - /** - * Client side callback to execute when a pointer input element is pressed down over input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnmousedown() { - return (String)getStateHelper().eval(PropertyKeys.onmousedown); - } - - /** - * Client side callback to execute when a pointer input element is pressed down over input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnmousedown(String _onmousedown) { - getStateHelper().put(PropertyKeys.onmousedown, _onmousedown); - } - - - /** - * Client side callback to execute when a pointer input element is moved within input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnmousemove() { - return (String)getStateHelper().eval(PropertyKeys.onmousemove); - } - - /** - * Client side callback to execute when a pointer input element is moved within input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnmousemove(String _onmousemove) { - getStateHelper().put(PropertyKeys.onmousemove, _onmousemove); - } - - - /** - * Client side callback to execute when a pointer input element is moved away from input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnmouseout() { - return (String)getStateHelper().eval(PropertyKeys.onmouseout); - } - - /** - * Client side callback to execute when a pointer input element is moved away from input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnmouseout(String _onmouseout) { - getStateHelper().put(PropertyKeys.onmouseout, _onmouseout); - } - - - /** - * Client side callback to execute when a pointer input element is moved onto input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnmouseover() { - return (String)getStateHelper().eval(PropertyKeys.onmouseover); - } - - /** - * Client side callback to execute when a pointer input element is moved onto input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnmouseover(String _onmouseover) { - getStateHelper().put(PropertyKeys.onmouseover, _onmouseover); - } - - - /** - * Client side callback to execute when a pointer input element is released over input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnmouseup() { - return (String)getStateHelper().eval(PropertyKeys.onmouseup); - } - - /** - * Client side callback to execute when a pointer input element is released over input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnmouseup(String _onmouseup) { - getStateHelper().put(PropertyKeys.onmouseup, _onmouseup); - } - - - /** - * Client side callback to execute when text within input element is selected by user.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnselect() { - return (String)getStateHelper().eval(PropertyKeys.onselect); - } - - /** - * Client side callback to execute when text within input element is selected by user.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnselect(String _onselect) { - getStateHelper().put(PropertyKeys.onselect, _onselect); - } - - - /** - * Comma or space separated list of ids or search expressions denoting which values are to be sent to the server.

- * @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.

- * Usually this method is called internally by the JSF engine. - */ - public void setProcess(String _process) { - getStateHelper().put(PropertyKeys.process, _process); - } - - - /** - * Flag indicating that this input element will prevent changes by the user.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isReadonly() { - return (boolean) (Boolean)getStateHelper().eval(PropertyKeys.readonly, false); - } - - /** - * Flag indicating that this input element will prevent changes by the user.

- * Usually this method is called internally by the JSF engine. - */ - public void setReadonly(boolean _readonly) { - getStateHelper().put(PropertyKeys.readonly, _readonly); - } - - - /** - * Allows you to suppress automatic rendering of labels. Used by AngularFaces, too.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isRenderLabel() { - return (boolean) (Boolean)getStateHelper().eval(PropertyKeys.renderLabel, true); - } - - /** - * Allows you to suppress automatic rendering of labels. Used by AngularFaces, too.

- * Usually this method is called internally by the JSF engine. - */ - public void setRenderLabel(boolean _renderLabel) { - getStateHelper().put(PropertyKeys.renderLabel, _renderLabel); - } - - - /** - * The size of the input specified as number of grid columns.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public int getSpan() { - return (int) (Integer)getStateHelper().eval(PropertyKeys.span, 0); - } - - /** - * The size of the input specified as number of grid columns.

- * Usually this method is called internally by the JSF engine. - */ - public void setSpan(int _span) { - getStateHelper().put(PropertyKeys.span, _span); - } - - - /** - * Inline style of the input element.

- * @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.

- * Usually this method is called internally by the JSF engine. - */ - public void setStyle(String _style) { - getStateHelper().put(PropertyKeys.style, _style); - } - - - /** - * Style class of the input element.

- * @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 the input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setStyleClass(String _styleClass) { - getStateHelper().put(PropertyKeys.styleClass, _styleClass); - } - - - /** - * Position of this element in the tabbing order for the current document. This value must be an integer between 0 and 32767.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getTabindex() { - return (String)getStateHelper().eval(PropertyKeys.tabindex); - } - - /** - * Position of this element in the tabbing order for the current document. This value must be an integer between 0 and 32767.

- * Usually this method is called internally by the JSF engine. - */ - public void setTabindex(String _tabindex) { - getStateHelper().put(PropertyKeys.tabindex, _tabindex); - } - - - /** - * Advisory tooltip information.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getTitle() { - return (String)getStateHelper().eval(PropertyKeys.title); - } - - /** - * Advisory tooltip information.

- * Usually this method is called internally by the JSF engine. - */ - public void setTitle(String _title) { - getStateHelper().put(PropertyKeys.title, _title); - } - - - /** - * The text of the tooltip.

- * @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.

- * 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.

- * @return Returns the value of the attribute, or null, 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.

- * 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).

- * @return Returns the value of the attribute, or null, 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).

- * 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).

- * @return Returns the value of the attribute, or null, 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).

- * 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).

- * @return Returns the value of the attribute, or null, 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).

- * 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".

- * @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".

- * 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.

- * @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.

- * Usually this method is called internally by the JSF engine. - */ - public void setUpdate(String _update) { - getStateHelper().put(PropertyKeys.update, _update); - } - } - diff --git a/src/main/java/net/bootsfaces/component/selectBooleanCheckbox/SelectBooleanCheckboxCore.java b/src/main/java/net/bootsfaces/component/selectBooleanCheckbox/SelectBooleanCheckboxCore.java new file mode 100644 index 000000000..135b73049 --- /dev/null +++ b/src/main/java/net/bootsfaces/component/selectBooleanCheckbox/SelectBooleanCheckboxCore.java @@ -0,0 +1,757 @@ +/** + * Copyright 2014-16 by Riccardo Massera (TheCoder4.Eu), Dario D'Urzo and Stephan Rauh (http://www.beyondjava.net). + * + * This file is part of BootsFaces. + * + * BootsFaces is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * BootsFaces is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with BootsFaces. If not, see . + */ + +package net.bootsfaces.component.selectBooleanCheckbox; + +import javax.faces.component.html.HtmlInputText; + +/** This class holds the attributes of <b:selectBooleanCheckbox />. */ +public abstract class SelectBooleanCheckboxCore extends HtmlInputText implements net.bootsfaces.render.IHasTooltip { + + protected enum PropertyKeys { + accesskey, + ajax, + alt, + binding, + caption, + converterMessage, + dir, + disabled, + fieldSize, + immediate, + label, + lang, + onblur, + onchange, + onclick, + oncomplete, + ondblclick, + onfocus, + onkeydown, + onkeypress, + onkeyup, + onmousedown, + onmousemove, + onmouseout, + onmouseover, + onmouseup, + onselect, + process, + readonly, + renderLabel, + span, + style, + styleClass, + tabindex, + title, + tooltip, + tooltipContainer, + tooltipDelay, + tooltipDelayHide, + tooltipDelayShow, + tooltipPosition, + update; + String toString; + + PropertyKeys(String toString) { + this.toString = toString; + } + + PropertyKeys() { + } + + public String toString() { + return ((this.toString != null) ? this.toString : super.toString()); + } + } + + /** + * Access key to transfer focus to the input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getAccesskey() { + return (String) getStateHelper().eval(PropertyKeys.accesskey); + } + + /** + * Access key to transfer focus to the input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setAccesskey(String _accesskey) { + getStateHelper().put(PropertyKeys.accesskey, _accesskey); + } + + /** + * Activates AJAX. The default value is false (no AJAX).

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isAjax() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.ajax, false); + } + + /** + * Activates AJAX. The default value is false (no AJAX).

+ * Usually this method is called internally by the JSF engine. + */ + public void setAjax(boolean _ajax) { + getStateHelper().put(PropertyKeys.ajax, _ajax); + } + + /** + * Alternate textual description of the input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getAlt() { + return (String) getStateHelper().eval(PropertyKeys.alt); + } + + /** + * Alternate textual description of the input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setAlt(String _alt) { + getStateHelper().put(PropertyKeys.alt, _alt); + } + + /** + * An EL expression referring to a server side UIComponent instance in a backing bean.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public javax.faces.component.UIComponent getBinding() { + return (javax.faces.component.UIComponent) getStateHelper().eval(PropertyKeys.binding); + } + + /** + * An EL expression referring to a server side UIComponent instance in a backing bean.

+ * Usually this method is called internally by the JSF engine. + */ + public void setBinding(javax.faces.component.UIComponent _binding) { + getStateHelper().put(PropertyKeys.binding, _binding); + } + + /** + * Caption of the check box (text behind the check box, as opposed to the label, which may be above the check box)

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getCaption() { + return (String) getStateHelper().eval(PropertyKeys.caption); + } + + /** + * Caption of the check box (text behind the check box, as opposed to the label, which may be above the check box)

+ * Usually this method is called internally by the JSF engine. + */ + public void setCaption(String _caption) { + getStateHelper().put(PropertyKeys.caption, _caption); + } + + /** + * Message to display when conversion fails.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getConverterMessage() { + return (String) getStateHelper().eval(PropertyKeys.converterMessage); + } + + /** + * Message to display when conversion fails.

+ * Usually this method is called internally by the JSF engine. + */ + public void setConverterMessage(String _converterMessage) { + getStateHelper().put(PropertyKeys.converterMessage, _converterMessage); + } + + /** + * 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).

+ * @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).

+ * Usually this method is called internally by the JSF engine. + */ + public void setDir(String _dir) { + getStateHelper().put(PropertyKeys.dir, _dir); + } + + /** + * Disables the input element, default is false.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isDisabled() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.disabled, false); + } + + /** + * Disables the input element, default is false.

+ * Usually this method is called internally by the JSF engine. + */ + public void setDisabled(boolean _disabled) { + getStateHelper().put(PropertyKeys.disabled, _disabled); + } + + /** + * The size of the input. Possible values are xs (extra small), sm (small), md (medium) and lg (large) .

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getFieldSize() { + return (String) getStateHelper().eval(PropertyKeys.fieldSize); + } + + /** + * The size of the input. Possible values are xs (extra small), sm (small), md (medium) and lg (large) .

+ * Usually this method is called internally by the JSF engine. + */ + public void setFieldSize(String _fieldSize) { + getStateHelper().put(PropertyKeys.fieldSize, _fieldSize); + } + + /** + * 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.

+ * @return Returns the value of the attribute, or null, 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.

+ * Usually this method is called internally by the JSF engine. + */ + public void setImmediate(boolean _immediate) { + getStateHelper().put(PropertyKeys.immediate, _immediate); + } + + /** + * The label above of the field .

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getLabel() { + return (String) getStateHelper().eval(PropertyKeys.label); + } + + /** + * The label above of the field .

+ * Usually this method is called internally by the JSF engine. + */ + public void setLabel(String _label) { + getStateHelper().put(PropertyKeys.label, _label); + } + + /** + * Code describing the language used in the generated markup for this component.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getLang() { + return (String) getStateHelper().eval(PropertyKeys.lang); + } + + /** + * Code describing the language used in the generated markup for this component.

+ * Usually this method is called internally by the JSF engine. + */ + public void setLang(String _lang) { + getStateHelper().put(PropertyKeys.lang, _lang); + } + + /** + * Client side callback to execute when input element loses focus.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnblur() { + return (String) getStateHelper().eval(PropertyKeys.onblur); + } + + /** + * Client side callback to execute when input element loses focus.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnblur(String _onblur) { + getStateHelper().put(PropertyKeys.onblur, _onblur); + } + + /** + * Client side callback to execute when input element loses focus and its value has been modified since gaining focus.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnchange() { + return (String) getStateHelper().eval(PropertyKeys.onchange); + } + + /** + * Client side callback to execute when input element loses focus and its value has been modified since gaining focus.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnchange(String _onchange) { + getStateHelper().put(PropertyKeys.onchange, _onchange); + } + + /** + * OnClick DHTML event .

+ * @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); + } + + /** + * OnClick DHTML event .

+ * 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 with success.

+ * @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 with success.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOncomplete(String _oncomplete) { + getStateHelper().put(PropertyKeys.oncomplete, _oncomplete); + } + + /** + * Client side callback to execute when input element is double clicked.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOndblclick() { + return (String) getStateHelper().eval(PropertyKeys.ondblclick); + } + + /** + * Client side callback to execute when input element is double clicked.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOndblclick(String _ondblclick) { + getStateHelper().put(PropertyKeys.ondblclick, _ondblclick); + } + + /** + * Client side callback to execute when input element receives focus.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnfocus() { + return (String) getStateHelper().eval(PropertyKeys.onfocus); + } + + /** + * Client side callback to execute when input element receives focus.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnfocus(String _onfocus) { + getStateHelper().put(PropertyKeys.onfocus, _onfocus); + } + + /** + * Client side callback to execute when a key is pressed down over input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnkeydown() { + return (String) getStateHelper().eval(PropertyKeys.onkeydown); + } + + /** + * Client side callback to execute when a key is pressed down over input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnkeydown(String _onkeydown) { + getStateHelper().put(PropertyKeys.onkeydown, _onkeydown); + } + + /** + * Client side callback to execute when a key is pressed and released over input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnkeypress() { + return (String) getStateHelper().eval(PropertyKeys.onkeypress); + } + + /** + * Client side callback to execute when a key is pressed and released over input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnkeypress(String _onkeypress) { + getStateHelper().put(PropertyKeys.onkeypress, _onkeypress); + } + + /** + * Client side callback to execute when a key is released over input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnkeyup() { + return (String) getStateHelper().eval(PropertyKeys.onkeyup); + } + + /** + * Client side callback to execute when a key is released over input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnkeyup(String _onkeyup) { + getStateHelper().put(PropertyKeys.onkeyup, _onkeyup); + } + + /** + * Client side callback to execute when a pointer input element is pressed down over input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnmousedown() { + return (String) getStateHelper().eval(PropertyKeys.onmousedown); + } + + /** + * Client side callback to execute when a pointer input element is pressed down over input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnmousedown(String _onmousedown) { + getStateHelper().put(PropertyKeys.onmousedown, _onmousedown); + } + + /** + * Client side callback to execute when a pointer input element is moved within input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnmousemove() { + return (String) getStateHelper().eval(PropertyKeys.onmousemove); + } + + /** + * Client side callback to execute when a pointer input element is moved within input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnmousemove(String _onmousemove) { + getStateHelper().put(PropertyKeys.onmousemove, _onmousemove); + } + + /** + * Client side callback to execute when a pointer input element is moved away from input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnmouseout() { + return (String) getStateHelper().eval(PropertyKeys.onmouseout); + } + + /** + * Client side callback to execute when a pointer input element is moved away from input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnmouseout(String _onmouseout) { + getStateHelper().put(PropertyKeys.onmouseout, _onmouseout); + } + + /** + * Client side callback to execute when a pointer input element is moved onto input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnmouseover() { + return (String) getStateHelper().eval(PropertyKeys.onmouseover); + } + + /** + * Client side callback to execute when a pointer input element is moved onto input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnmouseover(String _onmouseover) { + getStateHelper().put(PropertyKeys.onmouseover, _onmouseover); + } + + /** + * Client side callback to execute when a pointer input element is released over input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnmouseup() { + return (String) getStateHelper().eval(PropertyKeys.onmouseup); + } + + /** + * Client side callback to execute when a pointer input element is released over input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnmouseup(String _onmouseup) { + getStateHelper().put(PropertyKeys.onmouseup, _onmouseup); + } + + /** + * Client side callback to execute when text within input element is selected by user.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnselect() { + return (String) getStateHelper().eval(PropertyKeys.onselect); + } + + /** + * Client side callback to execute when text within input element is selected by user.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnselect(String _onselect) { + getStateHelper().put(PropertyKeys.onselect, _onselect); + } + + /** + * Comma or space separated list of ids or search expressions denoting which values are to be sent to the server.

+ * @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.

+ * Usually this method is called internally by the JSF engine. + */ + public void setProcess(String _process) { + getStateHelper().put(PropertyKeys.process, _process); + } + + /** + * Flag indicating that this input element will prevent changes by the user.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isReadonly() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.readonly, false); + } + + /** + * Flag indicating that this input element will prevent changes by the user.

+ * Usually this method is called internally by the JSF engine. + */ + public void setReadonly(boolean _readonly) { + getStateHelper().put(PropertyKeys.readonly, _readonly); + } + + /** + * Allows you to suppress automatic rendering of labels. Used by AngularFaces, too.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isRenderLabel() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.renderLabel, + net.bootsfaces.component.ComponentUtils.isRenderLabelDefault()); + } + + /** + * Allows you to suppress automatic rendering of labels. Used by AngularFaces, too.

+ * Usually this method is called internally by the JSF engine. + */ + public void setRenderLabel(boolean _renderLabel) { + getStateHelper().put(PropertyKeys.renderLabel, _renderLabel); + } + + /** + * The size of the input specified as number of grid columns.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public int getSpan() { + return (int) (Integer) getStateHelper().eval(PropertyKeys.span, 0); + } + + /** + * The size of the input specified as number of grid columns.

+ * Usually this method is called internally by the JSF engine. + */ + public void setSpan(int _span) { + getStateHelper().put(PropertyKeys.span, _span); + } + + /** + * Inline style of the input element.

+ * @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.

+ * Usually this method is called internally by the JSF engine. + */ + public void setStyle(String _style) { + getStateHelper().put(PropertyKeys.style, _style); + } + + /** + * Style class of the input element.

+ * @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 the input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setStyleClass(String _styleClass) { + getStateHelper().put(PropertyKeys.styleClass, _styleClass); + } + + /** + * Position of this element in the tabbing order for the current document. This value must be an integer between 0 and 32767.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getTabindex() { + return (String) getStateHelper().eval(PropertyKeys.tabindex); + } + + /** + * Position of this element in the tabbing order for the current document. This value must be an integer between 0 and 32767.

+ * Usually this method is called internally by the JSF engine. + */ + public void setTabindex(String _tabindex) { + getStateHelper().put(PropertyKeys.tabindex, _tabindex); + } + + /** + * Advisory tooltip information.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getTitle() { + return (String) getStateHelper().eval(PropertyKeys.title); + } + + /** + * Advisory tooltip information.

+ * Usually this method is called internally by the JSF engine. + */ + public void setTitle(String _title) { + getStateHelper().put(PropertyKeys.title, _title); + } + + /** + * The text of the tooltip.

+ * @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.

+ * 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.

+ * @return Returns the value of the attribute, or null, 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.

+ * 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).

+ * @return Returns the value of the attribute, or null, 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).

+ * 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).

+ * @return Returns the value of the attribute, or null, 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).

+ * 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).

+ * @return Returns the value of the attribute, or null, 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).

+ * 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".

+ * @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".

+ * 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.

+ * @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.

+ * Usually this method is called internally by the JSF engine. + */ + public void setUpdate(String _update) { + getStateHelper().put(PropertyKeys.update, _update); + } + +} diff --git a/src/main/java/net/bootsfaces/component/selectMultiMenu/SelectMultiMenu.java b/src/main/java/net/bootsfaces/component/selectMultiMenu/SelectMultiMenu.java index b02ef3c17..7f81503e2 100644 --- a/src/main/java/net/bootsfaces/component/selectMultiMenu/SelectMultiMenu.java +++ b/src/main/java/net/bootsfaces/component/selectMultiMenu/SelectMultiMenu.java @@ -1,8 +1,8 @@ /** * Copyright 2014-16 by Riccardo Massera (TheCoder4.Eu) and Stephan Rauh (http://www.beyondjava.net). - * + * * This file is part of BootsFaces. - * + * * BootsFaces is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -23,7 +23,6 @@ import javax.faces.application.ResourceDependencies; import javax.faces.application.ResourceDependency; import javax.faces.component.FacesComponent; -import javax.faces.component.html.HtmlInputText; import net.bootsfaces.listeners.AddResourcesListener; import net.bootsfaces.render.Tooltip; @@ -34,8 +33,7 @@ @ResourceDependency(library = "bsf", name = "js/dropdown.js", target = "body"), }) @FacesComponent("net.bootsfaces.component.selectMultiMenu.SelectMultiMenu") -public class SelectMultiMenu extends HtmlInputText implements net.bootsfaces.render.IHasTooltip { - private String renderLabel = null; +public class SelectMultiMenu extends SelectMultiMenuCore implements net.bootsfaces.render.IHasTooltip { public static final String COMPONENT_TYPE = "net.bootsfaces.component.selectMultiMenu.SelectMultiMenu"; @@ -59,802 +57,4 @@ public void setValueExpression(String name, ValueExpression binding) { public String getFamily() { return COMPONENT_FAMILY; } - - protected enum PropertyKeys { - accesskey, - allSelectedText, - alt, - binding, - buttonContainer, - buttonWidth, - buttonClass, - dir, - disableIfEmpty, - disabled, - dropRight, - enableCaseInsensitiveFiltering, - enableFiltering, - fieldSize, - filterPlaceholder, - immediate, - includeSelectAllOption, - inline, - label, - lang, - maxHeight, - nSelectedText, - nonSelectedText, - numberDisplayed, - onchange, - ondropdownhide, - ondropdownshow, - placeholder, - radiobuttons, - readonly, - renderLabel, - required, - requiredMessage, - selectAllText, - size, - span, - style, - styleClass, - tabindex, - title, - tooltip, - tooltipContainer, - tooltipDelay, - tooltipDelayHide, - tooltipDelayShow, - tooltipPosition; - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - public String toString() { - return ((this.toString != null) ? this.toString : super.toString()); - } - } - - /** - * Access key to transfer focus to the input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getAccesskey() { - return (String) getStateHelper().eval(PropertyKeys.accesskey); - } - - /** - * Access key to transfer focus to the input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setAccesskey(String _accesskey) { - getStateHelper().put(PropertyKeys.accesskey, _accesskey); - } - - /** - * Text which is displayed if every option has been selected.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getAllSelectedText() { - return (String) getStateHelper().eval(PropertyKeys.allSelectedText); - } - - /** - * Text which is displayed if every option has been selected.

- * Usually this method is called internally by the JSF engine. - */ - public void setAllSelectedText(String _allSelectedText) { - getStateHelper().put(PropertyKeys.allSelectedText, _allSelectedText); - } - - /** - * Alternate textual description of the input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getAlt() { - return (String) getStateHelper().eval(PropertyKeys.alt); - } - - /** - * Alternate textual description of the input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setAlt(String _alt) { - getStateHelper().put(PropertyKeys.alt, _alt); - } - - /** - * An EL expression referring to a server side UIComponent instance in a backing bean.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public javax.faces.component.UIComponent getBinding() { - return (javax.faces.component.UIComponent) getStateHelper().eval(PropertyKeys.binding); - } - - /** - * An EL expression referring to a server side UIComponent instance in a backing bean.

- * Usually this method is called internally by the JSF engine. - */ - public void setBinding(javax.faces.component.UIComponent _binding) { - getStateHelper().put(PropertyKeys.binding, _binding); - } - - /** - * HTML snippet of the container holding both the button as well as the dropdown. Default: <div class='btn-group' style='display:block' />. Note that the original definition of the widget doesn't use the style definition. We've added it to fix a rendering bug.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getButtonContainer() { - return (String) getStateHelper().eval(PropertyKeys.buttonContainer); - } - - /** - * HTML snippet of the container holding both the button as well as the dropdown. Default: <div class='btn-group' style='display:block' />. Note that the original definition of the widget doesn't use the style definition. We've added it to fix a rendering bug.

- * Usually this method is called internally by the JSF engine. - */ - public void setButtonContainer(String _buttonContainer) { - getStateHelper().put(PropertyKeys.buttonContainer, _buttonContainer); - } - - /** - * The width of the multiselect button may be fixed using this option.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public int getButtonWidth() { - return (int) (Integer) getStateHelper().eval(PropertyKeys.buttonWidth, 0); - } - - /** - * The width of the multiselect button may be fixed using this option.

- * Usually this method is called internally by the JSF engine. - */ - public void setButtonWidth(int _buttonWidth) { - getStateHelper().put(PropertyKeys.buttonWidth, _buttonWidth); - } - - /** - * The CSS class of the button.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getButtonClass() { - return (String) getStateHelper().eval(PropertyKeys.buttonClass); - } - - /** - * The CSS class of the button.

- * Usually this method is called internally by the JSF engine. - */ - public void setButtonClass(String _buttonClass) { - getStateHelper().put(PropertyKeys.buttonClass, _buttonClass); - } - - /** - * 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).

- * @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).

- * Usually this method is called internally by the JSF engine. - */ - public void setDir(String _dir) { - getStateHelper().put(PropertyKeys.dir, _dir); - } - - /** - * If true, the button is disabled if no options are given.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isDisableIfEmpty() { - return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.disableIfEmpty, false); - } - - /** - * If true, the button is disabled if no options are given.

- * Usually this method is called internally by the JSF engine. - */ - public void setDisableIfEmpty(boolean _disableIfEmpty) { - getStateHelper().put(PropertyKeys.disableIfEmpty, _disableIfEmpty); - } - - /** - * Disables the input element, default is false.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isDisabled() { - return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.disabled, false); - } - - /** - * Disables the input element, default is false.

- * Usually this method is called internally by the JSF engine. - */ - public void setDisabled(boolean _disabled) { - getStateHelper().put(PropertyKeys.disabled, _disabled); - } - - /** - * Moves the drop-down-area from the left hand side to the right hand side.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isDropRight() { - return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.dropRight, false); - } - - /** - * Moves the drop-down-area from the left hand side to the right hand side.

- * Usually this method is called internally by the JSF engine. - */ - public void setDropRight(boolean _dropRight) { - getStateHelper().put(PropertyKeys.dropRight, _dropRight); - } - - /** - * If set to true, the filter is case-insensitive.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isEnableCaseInsensitiveFiltering() { - return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.enableCaseInsensitiveFiltering, false); - } - - /** - * If set to true, the filter is case-insensitive.

- * Usually this method is called internally by the JSF engine. - */ - public void setEnableCaseInsensitiveFiltering(boolean _enableCaseInsensitiveFiltering) { - getStateHelper().put(PropertyKeys.enableCaseInsensitiveFiltering, _enableCaseInsensitiveFiltering); - } - - /** - * Set to true or false to enable or disable the filter. A filter input will be added to dynamically filter all options.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isEnableFiltering() { - return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.enableFiltering, false); - } - - /** - * Set to true or false to enable or disable the filter. A filter input will be added to dynamically filter all options.

- * Usually this method is called internally by the JSF engine. - */ - public void setEnableFiltering(boolean _enableFiltering) { - getStateHelper().put(PropertyKeys.enableFiltering, _enableFiltering); - } - - /** - * The size of the input.Possible values are xs (extra small), sm (small), md (medium) and lg (large) .

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getFieldSize() { - return (String) getStateHelper().eval(PropertyKeys.fieldSize); - } - - /** - * The size of the input.Possible values are xs (extra small), sm (small), md (medium) and lg (large) .

- * Usually this method is called internally by the JSF engine. - */ - public void setFieldSize(String _fieldSize) { - getStateHelper().put(PropertyKeys.fieldSize, _fieldSize); - } - - /** - * The placeholder used for the filter input.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getFilterPlaceholder() { - return (String) getStateHelper().eval(PropertyKeys.filterPlaceholder); - } - - /** - * The placeholder used for the filter input.

- * Usually this method is called internally by the JSF engine. - */ - public void setFilterPlaceholder(String _filterPlaceholder) { - getStateHelper().put(PropertyKeys.filterPlaceholder, _filterPlaceholder); - } - - /** - * 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.

- * @return Returns the value of the attribute, or null, 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.

- * Usually this method is called internally by the JSF engine. - */ - public void setImmediate(boolean _immediate) { - getStateHelper().put(PropertyKeys.immediate, _immediate); - } - - /** - * If true, you can select every option with a single click.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isIncludeSelectAllOption() { - return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.includeSelectAllOption, false); - } - - /** - * If true, you can select every option with a single click.

- * Usually this method is called internally by the JSF engine. - */ - public void setIncludeSelectAllOption(boolean _includeSelectAllOption) { - getStateHelper().put(PropertyKeys.includeSelectAllOption, _includeSelectAllOption); - } - - /** - * Inline forms are more compact and put the label to the left hand side of the input field instead of putting it above the input field. Inline applies only to screens that are at least 768 pixels wide.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isInline() { - return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.inline, false); - } - - /** - * Inline forms are more compact and put the label to the left hand side of the input field instead of putting it above the input field. Inline applies only to screens that are at least 768 pixels wide.

- * Usually this method is called internally by the JSF engine. - */ - public void setInline(boolean _inline) { - getStateHelper().put(PropertyKeys.inline, _inline); - } - - /** - * The Label of the field .

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getLabel() { - return (String) getStateHelper().eval(PropertyKeys.label); - } - - /** - * The Label of the field .

- * Usually this method is called internally by the JSF engine. - */ - public void setLabel(String _label) { - getStateHelper().put(PropertyKeys.label, _label); - } - - /** - * Code describing the language used in the generated markup for this component.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getLang() { - return (String) getStateHelper().eval(PropertyKeys.lang); - } - - /** - * Code describing the language used in the generated markup for this component.

- * Usually this method is called internally by the JSF engine. - */ - public void setLang(String _lang) { - getStateHelper().put(PropertyKeys.lang, _lang); - } - - /** - * Maximum height of the options panel.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public int getMaxHeight() { - return (int) (Integer) getStateHelper().eval(PropertyKeys.maxHeight, 0); - } - - /** - * Maximum height of the options panel.

- * Usually this method is called internally by the JSF engine. - */ - public void setMaxHeight(int _maxHeight) { - getStateHelper().put(PropertyKeys.maxHeight, _maxHeight); - } - - /** - * Text which is displayed if more than numberDisplayed options have been selected.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getNSelectedText() { - return (String) getStateHelper().eval(PropertyKeys.nSelectedText); - } - - /** - * Text which is displayed if more than numberDisplayed options have been selected.

- * Usually this method is called internally by the JSF engine. - */ - public void setNSelectedText(String _nSelectedText) { - getStateHelper().put(PropertyKeys.nSelectedText, _nSelectedText); - } - - /** - * Text which is displayed if no option has been selected.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getNonSelectedText() { - return (String) getStateHelper().eval(PropertyKeys.nonSelectedText); - } - - /** - * Text which is displayed if no option has been selected.

- * Usually this method is called internally by the JSF engine. - */ - public void setNonSelectedText(String _nonSelectedText) { - getStateHelper().put(PropertyKeys.nonSelectedText, _nonSelectedText); - } - - /** - * Maximum number of options displayed in the button.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public int getNumberDisplayed() { - return (int) (Integer) getStateHelper().eval(PropertyKeys.numberDisplayed, 0); - } - - /** - * Maximum number of options displayed in the button.

- * Usually this method is called internally by the JSF engine. - */ - public void setNumberDisplayed(int _numberDisplayed) { - getStateHelper().put(PropertyKeys.numberDisplayed, _numberDisplayed); - } - - /** - * Client side callback to execute when input element loses focus and its value has been modified since gaining focus.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnchange() { - return (String) getStateHelper().eval(PropertyKeys.onchange); - } - - /** - * Client side callback to execute when input element loses focus and its value has been modified since gaining focus.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnchange(String _onchange) { - getStateHelper().put(PropertyKeys.onchange, _onchange); - } - - /** - * Client side callback called when the drop-down area is hidden.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOndropdownhide() { - return (String) getStateHelper().eval(PropertyKeys.ondropdownhide); - } - - /** - * Client side callback called when the drop-down area is hidden.

- * Usually this method is called internally by the JSF engine. - */ - public void setOndropdownhide(String _ondropdownhide) { - getStateHelper().put(PropertyKeys.ondropdownhide, _ondropdownhide); - } - - /** - * Client side callback called when the drop-down area is shown.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOndropdownshow() { - return (String) getStateHelper().eval(PropertyKeys.ondropdownshow); - } - - /** - * Client side callback called when the drop-down area is shown.

- * Usually this method is called internally by the JSF engine. - */ - public void setOndropdownshow(String _ondropdownshow) { - getStateHelper().put(PropertyKeys.ondropdownshow, _ondropdownshow); - } - - /** - * The placeholder attribute shows text in a field until the field is focused upon, then hides the text.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getPlaceholder() { - return (String) getStateHelper().eval(PropertyKeys.placeholder); - } - - /** - * The placeholder attribute shows text in a field until the field is focused upon, then hides the text.

- * Usually this method is called internally by the JSF engine. - */ - public void setPlaceholder(String _placeholder) { - getStateHelper().put(PropertyKeys.placeholder, _placeholder); - } - - /** - * Set to true to display radiobuttons instead of checkboxes. Of course, in this case you can only select one option, so the widget's name is sort of a misnomer.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isRadiobuttons() { - return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.radiobuttons, false); - } - - /** - * Set to true to display radiobuttons instead of checkboxes. Of course, in this case you can only select one option, so the widget's name is sort of a misnomer.

- * Usually this method is called internally by the JSF engine. - */ - public void setRadiobuttons(boolean _radiobuttons) { - getStateHelper().put(PropertyKeys.radiobuttons, _radiobuttons); - } - - /** - * Flag indicating that this input element will prevent changes by the user.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isReadonly() { - return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.readonly, false); - } - - /** - * Flag indicating that this input element will prevent changes by the user.

- * Usually this method is called internally by the JSF engine. - */ - public void setReadonly(boolean _readonly) { - getStateHelper().put(PropertyKeys.readonly, _readonly); - } - - /** - * Allows you to suppress automatic rendering of labels. Used by AngularFaces, too.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isRenderLabel() { - return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.renderLabel, true); - } - - /** - * Allows you to suppress automatic rendering of labels. Used by AngularFaces, too.

- * Usually this method is called internally by the JSF engine. - */ - public void setRenderLabel(boolean _renderLabel) { - getStateHelper().put(PropertyKeys.renderLabel, _renderLabel); - } - - /** - * Boolean value Require input in the component when the form is submitted.

- * @return Returns the value of the attribute, or null, 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.

- * 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.

- * @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.

- * Usually this method is called internally by the JSF engine. - */ - public void setRequiredMessage(String _requiredMessage) { - getStateHelper().put(PropertyKeys.requiredMessage, _requiredMessage); - } - - /** - * The text displayed for the select all option.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getSelectAllText() { - return (String) getStateHelper().eval(PropertyKeys.selectAllText); - } - - /** - * The text displayed for the select all option.

- * Usually this method is called internally by the JSF engine. - */ - public void setSelectAllText(String _selectAllText) { - getStateHelper().put(PropertyKeys.selectAllText, _selectAllText); - } - - /** - * Number of characters used to determine the width of the input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public int getSize() { - return (int) (Integer) getStateHelper().eval(PropertyKeys.size, 0); - } - - /** - * Number of characters used to determine the width of the input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setSize(int _size) { - getStateHelper().put(PropertyKeys.size, _size); - } - - /** - * The size of the input specified as number of grid columns.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public int getSpan() { - return (int) (Integer) getStateHelper().eval(PropertyKeys.span, 0); - } - - /** - * The size of the input specified as number of grid columns.

- * Usually this method is called internally by the JSF engine. - */ - public void setSpan(int _span) { - getStateHelper().put(PropertyKeys.span, _span); - } - - /** - * Inline style of the input element.

- * @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.

- * Usually this method is called internally by the JSF engine. - */ - public void setStyle(String _style) { - getStateHelper().put(PropertyKeys.style, _style); - } - - /** - * Style class of the input element. Is translated to the buttonContainer attribute.

- * @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 the input element. Is translated to the buttonContainer attribute.

- * Usually this method is called internally by the JSF engine. - */ - public void setStyleClass(String _styleClass) { - getStateHelper().put(PropertyKeys.styleClass, _styleClass); - } - - /** - * Position of this element in the tabbing order for the current document. This value must be an integer between 0 and 32767.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getTabindex() { - return (String) getStateHelper().eval(PropertyKeys.tabindex); - } - - /** - * Position of this element in the tabbing order for the current document. This value must be an integer between 0 and 32767.

- * Usually this method is called internally by the JSF engine. - */ - public void setTabindex(String _tabindex) { - getStateHelper().put(PropertyKeys.tabindex, _tabindex); - } - - /** - * Advisory tooltip information.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getTitle() { - return (String) getStateHelper().eval(PropertyKeys.title); - } - - /** - * Advisory tooltip information.

- * Usually this method is called internally by the JSF engine. - */ - public void setTitle(String _title) { - getStateHelper().put(PropertyKeys.title, _title); - } - - /** - * The text of the tooltip.

- * @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.

- * 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.

- * @return Returns the value of the attribute, or null, 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.

- * 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).

- * @return Returns the value of the attribute, or null, 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).

- * 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).

- * @return Returns the value of the attribute, or null, 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).

- * 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).

- * @return Returns the value of the attribute, or null, 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).

- * 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".

- * @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".

- * Usually this method is called internally by the JSF engine. - */ - public void setTooltipPosition(String _tooltipPosition) { - getStateHelper().put(PropertyKeys.tooltipPosition, _tooltipPosition); - } - } diff --git a/src/main/java/net/bootsfaces/component/selectMultiMenu/SelectMultiMenuCore.java b/src/main/java/net/bootsfaces/component/selectMultiMenu/SelectMultiMenuCore.java new file mode 100644 index 000000000..519987d29 --- /dev/null +++ b/src/main/java/net/bootsfaces/component/selectMultiMenu/SelectMultiMenuCore.java @@ -0,0 +1,825 @@ +/** + * Copyright 2014-16 by Riccardo Massera (TheCoder4.Eu), Dario D'Urzo and Stephan Rauh (http://www.beyondjava.net). + * + * This file is part of BootsFaces. + * + * BootsFaces is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * BootsFaces is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with BootsFaces. If not, see . + */ + +package net.bootsfaces.component.selectMultiMenu; + +import javax.faces.component.html.HtmlInputText; + +/** This class holds the attributes of <b:selectMultiMenu />. */ +public abstract class SelectMultiMenuCore extends HtmlInputText implements net.bootsfaces.render.IHasTooltip { + + protected enum PropertyKeys { + accesskey, + allSelectedText, + alt, + binding, + buttonContainer, + buttonWidth, + buttonClass, + dir, + disableIfEmpty, + disabled, + dropRight, + enableCaseInsensitiveFiltering, + enableFiltering, + fieldSize, + filterPlaceholder, + immediate, + includeSelectAllOption, + inline, + label, + lang, + maxHeight, + nSelectedText, + nonSelectedText, + numberDisplayed, + onchange, + ondropdownhide, + ondropdownshow, + placeholder, + radiobuttons, + readonly, + renderLabel, + required, + requiredMessage, + selectAllText, + size, + span, + style, + styleClass, + tabindex, + title, + tooltip, + tooltipContainer, + tooltipDelay, + tooltipDelayHide, + tooltipDelayShow, + tooltipPosition; + String toString; + + PropertyKeys(String toString) { + this.toString = toString; + } + + PropertyKeys() { + } + + public String toString() { + return ((this.toString != null) ? this.toString : super.toString()); + } + } + + /** + * Access key to transfer focus to the input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getAccesskey() { + return (String) getStateHelper().eval(PropertyKeys.accesskey); + } + + /** + * Access key to transfer focus to the input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setAccesskey(String _accesskey) { + getStateHelper().put(PropertyKeys.accesskey, _accesskey); + } + + /** + * Text which is displayed if every option has been selected.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getAllSelectedText() { + return (String) getStateHelper().eval(PropertyKeys.allSelectedText); + } + + /** + * Text which is displayed if every option has been selected.

+ * Usually this method is called internally by the JSF engine. + */ + public void setAllSelectedText(String _allSelectedText) { + getStateHelper().put(PropertyKeys.allSelectedText, _allSelectedText); + } + + /** + * Alternate textual description of the input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getAlt() { + return (String) getStateHelper().eval(PropertyKeys.alt); + } + + /** + * Alternate textual description of the input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setAlt(String _alt) { + getStateHelper().put(PropertyKeys.alt, _alt); + } + + /** + * An EL expression referring to a server side UIComponent instance in a backing bean.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public javax.faces.component.UIComponent getBinding() { + return (javax.faces.component.UIComponent) getStateHelper().eval(PropertyKeys.binding); + } + + /** + * An EL expression referring to a server side UIComponent instance in a backing bean.

+ * Usually this method is called internally by the JSF engine. + */ + public void setBinding(javax.faces.component.UIComponent _binding) { + getStateHelper().put(PropertyKeys.binding, _binding); + } + + /** + * HTML snippet of the container holding both the button as well as the dropdown. Default: <div class='btn-group' style='display:block' />. Note that the original definition of the widget doesn't use the style definition. We've added it to fix a rendering bug.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getButtonContainer() { + return (String) getStateHelper().eval(PropertyKeys.buttonContainer); + } + + /** + * HTML snippet of the container holding both the button as well as the dropdown. Default: <div class='btn-group' style='display:block' />. Note that the original definition of the widget doesn't use the style definition. We've added it to fix a rendering bug.

+ * Usually this method is called internally by the JSF engine. + */ + public void setButtonContainer(String _buttonContainer) { + getStateHelper().put(PropertyKeys.buttonContainer, _buttonContainer); + } + + /** + * The width of the multiselect button may be fixed using this option.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public int getButtonWidth() { + return (int) (Integer) getStateHelper().eval(PropertyKeys.buttonWidth, 0); + } + + /** + * The width of the multiselect button may be fixed using this option.

+ * Usually this method is called internally by the JSF engine. + */ + public void setButtonWidth(int _buttonWidth) { + getStateHelper().put(PropertyKeys.buttonWidth, _buttonWidth); + } + + /** + * The CSS class of the button.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getButtonClass() { + return (String) getStateHelper().eval(PropertyKeys.buttonClass); + } + + /** + * The CSS class of the button.

+ * Usually this method is called internally by the JSF engine. + */ + public void setButtonClass(String _buttonClass) { + getStateHelper().put(PropertyKeys.buttonClass, _buttonClass); + } + + /** + * 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).

+ * @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).

+ * Usually this method is called internally by the JSF engine. + */ + public void setDir(String _dir) { + getStateHelper().put(PropertyKeys.dir, _dir); + } + + /** + * If true, the button is disabled if no options are given.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isDisableIfEmpty() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.disableIfEmpty, false); + } + + /** + * If true, the button is disabled if no options are given.

+ * Usually this method is called internally by the JSF engine. + */ + public void setDisableIfEmpty(boolean _disableIfEmpty) { + getStateHelper().put(PropertyKeys.disableIfEmpty, _disableIfEmpty); + } + + /** + * Disables the input element, default is false.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isDisabled() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.disabled, false); + } + + /** + * Disables the input element, default is false.

+ * Usually this method is called internally by the JSF engine. + */ + public void setDisabled(boolean _disabled) { + getStateHelper().put(PropertyKeys.disabled, _disabled); + } + + /** + * Moves the drop-down-area from the left hand side to the right hand side.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isDropRight() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.dropRight, false); + } + + /** + * Moves the drop-down-area from the left hand side to the right hand side.

+ * Usually this method is called internally by the JSF engine. + */ + public void setDropRight(boolean _dropRight) { + getStateHelper().put(PropertyKeys.dropRight, _dropRight); + } + + /** + * If set to true, the filter is case-insensitive.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isEnableCaseInsensitiveFiltering() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.enableCaseInsensitiveFiltering, false); + } + + /** + * If set to true, the filter is case-insensitive.

+ * Usually this method is called internally by the JSF engine. + */ + public void setEnableCaseInsensitiveFiltering(boolean _enableCaseInsensitiveFiltering) { + getStateHelper().put(PropertyKeys.enableCaseInsensitiveFiltering, _enableCaseInsensitiveFiltering); + } + + /** + * Set to true or false to enable or disable the filter. A filter input will be added to dynamically filter all options.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isEnableFiltering() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.enableFiltering, false); + } + + /** + * Set to true or false to enable or disable the filter. A filter input will be added to dynamically filter all options.

+ * Usually this method is called internally by the JSF engine. + */ + public void setEnableFiltering(boolean _enableFiltering) { + getStateHelper().put(PropertyKeys.enableFiltering, _enableFiltering); + } + + /** + * The size of the input.Possible values are xs (extra small), sm (small), md (medium) and lg (large) .

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getFieldSize() { + return (String) getStateHelper().eval(PropertyKeys.fieldSize); + } + + /** + * The size of the input.Possible values are xs (extra small), sm (small), md (medium) and lg (large) .

+ * Usually this method is called internally by the JSF engine. + */ + public void setFieldSize(String _fieldSize) { + getStateHelper().put(PropertyKeys.fieldSize, _fieldSize); + } + + /** + * The placeholder used for the filter input.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getFilterPlaceholder() { + return (String) getStateHelper().eval(PropertyKeys.filterPlaceholder); + } + + /** + * The placeholder used for the filter input.

+ * Usually this method is called internally by the JSF engine. + */ + public void setFilterPlaceholder(String _filterPlaceholder) { + getStateHelper().put(PropertyKeys.filterPlaceholder, _filterPlaceholder); + } + + /** + * 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.

+ * @return Returns the value of the attribute, or null, 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.

+ * Usually this method is called internally by the JSF engine. + */ + public void setImmediate(boolean _immediate) { + getStateHelper().put(PropertyKeys.immediate, _immediate); + } + + /** + * If true, you can select every option with a single click.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isIncludeSelectAllOption() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.includeSelectAllOption, false); + } + + /** + * If true, you can select every option with a single click.

+ * Usually this method is called internally by the JSF engine. + */ + public void setIncludeSelectAllOption(boolean _includeSelectAllOption) { + getStateHelper().put(PropertyKeys.includeSelectAllOption, _includeSelectAllOption); + } + + /** + * Inline forms are more compact and put the label to the left hand side of the input field instead of putting it above the input field. Inline applies only to screens that are at least 768 pixels wide.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isInline() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.inline, false); + } + + /** + * Inline forms are more compact and put the label to the left hand side of the input field instead of putting it above the input field. Inline applies only to screens that are at least 768 pixels wide.

+ * Usually this method is called internally by the JSF engine. + */ + public void setInline(boolean _inline) { + getStateHelper().put(PropertyKeys.inline, _inline); + } + + /** + * The Label of the field .

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getLabel() { + return (String) getStateHelper().eval(PropertyKeys.label); + } + + /** + * The Label of the field .

+ * Usually this method is called internally by the JSF engine. + */ + public void setLabel(String _label) { + getStateHelper().put(PropertyKeys.label, _label); + } + + /** + * Code describing the language used in the generated markup for this component.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getLang() { + return (String) getStateHelper().eval(PropertyKeys.lang); + } + + /** + * Code describing the language used in the generated markup for this component.

+ * Usually this method is called internally by the JSF engine. + */ + public void setLang(String _lang) { + getStateHelper().put(PropertyKeys.lang, _lang); + } + + /** + * Maximum height of the options panel.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public int getMaxHeight() { + return (int) (Integer) getStateHelper().eval(PropertyKeys.maxHeight, 0); + } + + /** + * Maximum height of the options panel.

+ * Usually this method is called internally by the JSF engine. + */ + public void setMaxHeight(int _maxHeight) { + getStateHelper().put(PropertyKeys.maxHeight, _maxHeight); + } + + /** + * Text which is displayed if more than numberDisplayed options have been selected.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getNSelectedText() { + return (String) getStateHelper().eval(PropertyKeys.nSelectedText); + } + + /** + * Text which is displayed if more than numberDisplayed options have been selected.

+ * Usually this method is called internally by the JSF engine. + */ + public void setNSelectedText(String _nSelectedText) { + getStateHelper().put(PropertyKeys.nSelectedText, _nSelectedText); + } + + /** + * Text which is displayed if no option has been selected.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getNonSelectedText() { + return (String) getStateHelper().eval(PropertyKeys.nonSelectedText); + } + + /** + * Text which is displayed if no option has been selected.

+ * Usually this method is called internally by the JSF engine. + */ + public void setNonSelectedText(String _nonSelectedText) { + getStateHelper().put(PropertyKeys.nonSelectedText, _nonSelectedText); + } + + /** + * Maximum number of options displayed in the button.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public int getNumberDisplayed() { + return (int) (Integer) getStateHelper().eval(PropertyKeys.numberDisplayed, 0); + } + + /** + * Maximum number of options displayed in the button.

+ * Usually this method is called internally by the JSF engine. + */ + public void setNumberDisplayed(int _numberDisplayed) { + getStateHelper().put(PropertyKeys.numberDisplayed, _numberDisplayed); + } + + /** + * Client side callback to execute when input element loses focus and its value has been modified since gaining focus.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnchange() { + return (String) getStateHelper().eval(PropertyKeys.onchange); + } + + /** + * Client side callback to execute when input element loses focus and its value has been modified since gaining focus.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnchange(String _onchange) { + getStateHelper().put(PropertyKeys.onchange, _onchange); + } + + /** + * Client side callback called when the drop-down area is hidden.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOndropdownhide() { + return (String) getStateHelper().eval(PropertyKeys.ondropdownhide); + } + + /** + * Client side callback called when the drop-down area is hidden.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOndropdownhide(String _ondropdownhide) { + getStateHelper().put(PropertyKeys.ondropdownhide, _ondropdownhide); + } + + /** + * Client side callback called when the drop-down area is shown.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOndropdownshow() { + return (String) getStateHelper().eval(PropertyKeys.ondropdownshow); + } + + /** + * Client side callback called when the drop-down area is shown.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOndropdownshow(String _ondropdownshow) { + getStateHelper().put(PropertyKeys.ondropdownshow, _ondropdownshow); + } + + /** + * The placeholder attribute shows text in a field until the field is focused upon, then hides the text.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getPlaceholder() { + return (String) getStateHelper().eval(PropertyKeys.placeholder); + } + + /** + * The placeholder attribute shows text in a field until the field is focused upon, then hides the text.

+ * Usually this method is called internally by the JSF engine. + */ + public void setPlaceholder(String _placeholder) { + getStateHelper().put(PropertyKeys.placeholder, _placeholder); + } + + /** + * Set to true to display radiobuttons instead of checkboxes. Of course, in this case you can only select one option, so the widget's name is sort of a misnomer.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isRadiobuttons() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.radiobuttons, false); + } + + /** + * Set to true to display radiobuttons instead of checkboxes. Of course, in this case you can only select one option, so the widget's name is sort of a misnomer.

+ * Usually this method is called internally by the JSF engine. + */ + public void setRadiobuttons(boolean _radiobuttons) { + getStateHelper().put(PropertyKeys.radiobuttons, _radiobuttons); + } + + /** + * Flag indicating that this input element will prevent changes by the user.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isReadonly() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.readonly, false); + } + + /** + * Flag indicating that this input element will prevent changes by the user.

+ * Usually this method is called internally by the JSF engine. + */ + public void setReadonly(boolean _readonly) { + getStateHelper().put(PropertyKeys.readonly, _readonly); + } + + /** + * Allows you to suppress automatic rendering of labels. Used by AngularFaces, too.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isRenderLabel() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.renderLabel, + net.bootsfaces.component.ComponentUtils.isRenderLabelDefault()); + } + + /** + * Allows you to suppress automatic rendering of labels. Used by AngularFaces, too.

+ * Usually this method is called internally by the JSF engine. + */ + public void setRenderLabel(boolean _renderLabel) { + getStateHelper().put(PropertyKeys.renderLabel, _renderLabel); + } + + /** + * Boolean value Require input in the component when the form is submitted.

+ * @return Returns the value of the attribute, or null, 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.

+ * 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.

+ * @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.

+ * Usually this method is called internally by the JSF engine. + */ + public void setRequiredMessage(String _requiredMessage) { + getStateHelper().put(PropertyKeys.requiredMessage, _requiredMessage); + } + + /** + * The text displayed for the select all option.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getSelectAllText() { + return (String) getStateHelper().eval(PropertyKeys.selectAllText); + } + + /** + * The text displayed for the select all option.

+ * Usually this method is called internally by the JSF engine. + */ + public void setSelectAllText(String _selectAllText) { + getStateHelper().put(PropertyKeys.selectAllText, _selectAllText); + } + + /** + * Number of characters used to determine the width of the input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public int getSize() { + return (int) (Integer) getStateHelper().eval(PropertyKeys.size, 0); + } + + /** + * Number of characters used to determine the width of the input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setSize(int _size) { + getStateHelper().put(PropertyKeys.size, _size); + } + + /** + * The size of the input specified as number of grid columns.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public int getSpan() { + return (int) (Integer) getStateHelper().eval(PropertyKeys.span, 0); + } + + /** + * The size of the input specified as number of grid columns.

+ * Usually this method is called internally by the JSF engine. + */ + public void setSpan(int _span) { + getStateHelper().put(PropertyKeys.span, _span); + } + + /** + * Inline style of the input element.

+ * @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.

+ * Usually this method is called internally by the JSF engine. + */ + public void setStyle(String _style) { + getStateHelper().put(PropertyKeys.style, _style); + } + + /** + * Style class of the input element. Is translated to the buttonContainer attribute.

+ * @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 the input element. Is translated to the buttonContainer attribute.

+ * Usually this method is called internally by the JSF engine. + */ + public void setStyleClass(String _styleClass) { + getStateHelper().put(PropertyKeys.styleClass, _styleClass); + } + + /** + * Position of this element in the tabbing order for the current document. This value must be an integer between 0 and 32767.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getTabindex() { + return (String) getStateHelper().eval(PropertyKeys.tabindex); + } + + /** + * Position of this element in the tabbing order for the current document. This value must be an integer between 0 and 32767.

+ * Usually this method is called internally by the JSF engine. + */ + public void setTabindex(String _tabindex) { + getStateHelper().put(PropertyKeys.tabindex, _tabindex); + } + + /** + * Advisory tooltip information.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getTitle() { + return (String) getStateHelper().eval(PropertyKeys.title); + } + + /** + * Advisory tooltip information.

+ * Usually this method is called internally by the JSF engine. + */ + public void setTitle(String _title) { + getStateHelper().put(PropertyKeys.title, _title); + } + + /** + * The text of the tooltip.

+ * @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.

+ * 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.

+ * @return Returns the value of the attribute, or null, 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.

+ * 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).

+ * @return Returns the value of the attribute, or null, 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).

+ * 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).

+ * @return Returns the value of the attribute, or null, 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).

+ * 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).

+ * @return Returns the value of the attribute, or null, 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).

+ * 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".

+ * @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".

+ * Usually this method is called internally by the JSF engine. + */ + public void setTooltipPosition(String _tooltipPosition) { + getStateHelper().put(PropertyKeys.tooltipPosition, _tooltipPosition); + } + +} diff --git a/src/main/java/net/bootsfaces/component/selectOneMenu/SelectOneMenu.java b/src/main/java/net/bootsfaces/component/selectOneMenu/SelectOneMenu.java index 331d5897e..d400545ce 100644 --- a/src/main/java/net/bootsfaces/component/selectOneMenu/SelectOneMenu.java +++ b/src/main/java/net/bootsfaces/component/selectOneMenu/SelectOneMenu.java @@ -1,8 +1,8 @@ /** * Copyright 2014-16 by Riccardo Massera (TheCoder4.Eu) and Stephan Rauh (http://www.beyondjava.net). - * + * * This file is part of BootsFaces. - * + * * BootsFaces is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -26,7 +26,6 @@ import javax.el.ValueExpression; import javax.faces.component.FacesComponent; -import javax.faces.component.html.HtmlInputText; import javax.faces.context.FacesContext; import net.bootsfaces.component.ajax.IAJAXComponent; @@ -36,8 +35,7 @@ /** This class holds the attributes of <b:selectOneMenu />. */ @FacesComponent("net.bootsfaces.component.selectOneMenu.SelectOneMenu") -public class SelectOneMenu extends HtmlInputText implements net.bootsfaces.render.IHasTooltip, IAJAXComponent { - private String renderLabel = null; +public class SelectOneMenu extends SelectOneMenuCore implements net.bootsfaces.render.IHasTooltip, IAJAXComponent { public static final String COMPONENT_TYPE = "net.bootsfaces.component.selectOneMenu.SelectOneMenu"; @@ -66,7 +64,7 @@ public void setValueExpression(String name, ValueExpression binding) { * returns the subset of AJAX requests that are implemented by jQuery * callback or other non-standard means (such as the onclick event of * b:tabView, which has to be implemented manually). - * + * * @return */ public Map getJQueryEvents() { @@ -88,831 +86,4 @@ public void validateValue(FacesContext context, Object newValue) { public String getFamily() { return COMPONENT_FAMILY; } - - protected enum PropertyKeys { - accesskey, - ajax, - alt, - binding, - dir, - disabled, - fieldSize, - immediate, - inline, - label, - lang, - onblur, - onchange, - onclick, - oncomplete, - ondblclick, - onfocus, - onkeydown, - onkeypress, - onkeyup, - onmousedown, - onmousemove, - onmouseout, - onmouseover, - onmouseup, - onselect, - placeholder, - process, - readonly, - renderLabel, - required, - requiredMessage, - size, - span, - style, - styleClass, - tabindex, - title, - tooltip, - tooltipContainer, - tooltipDelay, - tooltipDelayHide, - tooltipDelayShow, - tooltipPosition, - update -; - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() {} - - public String toString() { - return ((this.toString != null) ? this.toString : super.toString()); - } - } - - - /** - * Access key to transfer focus to the input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getAccesskey() { - return (String)getStateHelper().eval(PropertyKeys.accesskey); - } - - /** - * Access key to transfer focus to the input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setAccesskey(String _accesskey) { - getStateHelper().put(PropertyKeys.accesskey, _accesskey); - } - - - /** - * Activates AJAX. The default value is false (no AJAX).

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isAjax() { - return (boolean) (Boolean)getStateHelper().eval(PropertyKeys.ajax, false); - } - - /** - * Activates AJAX. The default value is false (no AJAX).

- * Usually this method is called internally by the JSF engine. - */ - public void setAjax(boolean _ajax) { - getStateHelper().put(PropertyKeys.ajax, _ajax); - } - - - /** - * Alternate textual description of the input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getAlt() { - return (String)getStateHelper().eval(PropertyKeys.alt); - } - - /** - * Alternate textual description of the input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setAlt(String _alt) { - getStateHelper().put(PropertyKeys.alt, _alt); - } - - - /** - * An EL expression referring to a server side UIComponent instance in a backing bean.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public javax.faces.component.UIComponent getBinding() { - return (javax.faces.component.UIComponent)getStateHelper().eval(PropertyKeys.binding); - } - - /** - * An EL expression referring to a server side UIComponent instance in a backing bean.

- * Usually this method is called internally by the JSF engine. - */ - public void setBinding(javax.faces.component.UIComponent _binding) { - getStateHelper().put(PropertyKeys.binding, _binding); - } - - - /** - * 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).

- * @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).

- * Usually this method is called internally by the JSF engine. - */ - public void setDir(String _dir) { - getStateHelper().put(PropertyKeys.dir, _dir); - } - - - /** - * Disables the input element, default is false.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isDisabled() { - return (boolean) (Boolean)getStateHelper().eval(PropertyKeys.disabled, false); - } - - /** - * Disables the input element, default is false.

- * Usually this method is called internally by the JSF engine. - */ - public void setDisabled(boolean _disabled) { - getStateHelper().put(PropertyKeys.disabled, _disabled); - } - - - /** - * The size of the input. Possible values are xs (extra small), sm (small), md (medium) and lg (large) .

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getFieldSize() { - return (String)getStateHelper().eval(PropertyKeys.fieldSize); - } - - /** - * The size of the input. Possible values are xs (extra small), sm (small), md (medium) and lg (large) .

- * Usually this method is called internally by the JSF engine. - */ - public void setFieldSize(String _fieldSize) { - getStateHelper().put(PropertyKeys.fieldSize, _fieldSize); - } - - - /** - * 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.

- * @return Returns the value of the attribute, or null, 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.

- * Usually this method is called internally by the JSF engine. - */ - public void setImmediate(boolean _immediate) { - getStateHelper().put(PropertyKeys.immediate, _immediate); - } - - - /** - * Inline forms are more compact and put the label to the left hand side of the input field instead of putting it above the input field. Inline applies only to screens that are at least 768 pixels wide.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isInline() { - return (boolean) (Boolean)getStateHelper().eval(PropertyKeys.inline, false); - } - - /** - * Inline forms are more compact and put the label to the left hand side of the input field instead of putting it above the input field. Inline applies only to screens that are at least 768 pixels wide.

- * Usually this method is called internally by the JSF engine. - */ - public void setInline(boolean _inline) { - getStateHelper().put(PropertyKeys.inline, _inline); - } - - - /** - * The label of the field.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getLabel() { - return (String)getStateHelper().eval(PropertyKeys.label); - } - - /** - * The label of the field.

- * Usually this method is called internally by the JSF engine. - */ - public void setLabel(String _label) { - getStateHelper().put(PropertyKeys.label, _label); - } - - - /** - * Code describing the language used in the generated markup for this component.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getLang() { - return (String)getStateHelper().eval(PropertyKeys.lang); - } - - /** - * Code describing the language used in the generated markup for this component.

- * Usually this method is called internally by the JSF engine. - */ - public void setLang(String _lang) { - getStateHelper().put(PropertyKeys.lang, _lang); - } - - - /** - * Client side callback to execute when input element loses focus.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnblur() { - return (String)getStateHelper().eval(PropertyKeys.onblur); - } - - /** - * Client side callback to execute when input element loses focus.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnblur(String _onblur) { - getStateHelper().put(PropertyKeys.onblur, _onblur); - } - - - /** - * Client side callback to execute when input element loses focus and its value has been modified since gaining focus.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnchange() { - return (String)getStateHelper().eval(PropertyKeys.onchange); - } - - /** - * Client side callback to execute when input element loses focus and its value has been modified since gaining focus.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnchange(String _onchange) { - getStateHelper().put(PropertyKeys.onchange, _onchange); - } - - - /** - * OnClick DHTML event .

- * @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); - } - - /** - * OnClick DHTML event .

- * 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 with success.

- * @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 with success.

- * Usually this method is called internally by the JSF engine. - */ - public void setOncomplete(String _oncomplete) { - getStateHelper().put(PropertyKeys.oncomplete, _oncomplete); - } - - - /** - * Client side callback to execute when input element is double clicked.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOndblclick() { - return (String)getStateHelper().eval(PropertyKeys.ondblclick); - } - - /** - * Client side callback to execute when input element is double clicked.

- * Usually this method is called internally by the JSF engine. - */ - public void setOndblclick(String _ondblclick) { - getStateHelper().put(PropertyKeys.ondblclick, _ondblclick); - } - - - /** - * Client side callback to execute when input element receives focus.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnfocus() { - return (String)getStateHelper().eval(PropertyKeys.onfocus); - } - - /** - * Client side callback to execute when input element receives focus.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnfocus(String _onfocus) { - getStateHelper().put(PropertyKeys.onfocus, _onfocus); - } - - - /** - * Client side callback to execute when a key is pressed down over input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnkeydown() { - return (String)getStateHelper().eval(PropertyKeys.onkeydown); - } - - /** - * Client side callback to execute when a key is pressed down over input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnkeydown(String _onkeydown) { - getStateHelper().put(PropertyKeys.onkeydown, _onkeydown); - } - - - /** - * Client side callback to execute when a key is pressed and released over input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnkeypress() { - return (String)getStateHelper().eval(PropertyKeys.onkeypress); - } - - /** - * Client side callback to execute when a key is pressed and released over input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnkeypress(String _onkeypress) { - getStateHelper().put(PropertyKeys.onkeypress, _onkeypress); - } - - - /** - * Client side callback to execute when a key is released over input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnkeyup() { - return (String)getStateHelper().eval(PropertyKeys.onkeyup); - } - - /** - * Client side callback to execute when a key is released over input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnkeyup(String _onkeyup) { - getStateHelper().put(PropertyKeys.onkeyup, _onkeyup); - } - - - /** - * Client side callback to execute when a pointer input element is pressed down over input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnmousedown() { - return (String)getStateHelper().eval(PropertyKeys.onmousedown); - } - - /** - * Client side callback to execute when a pointer input element is pressed down over input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnmousedown(String _onmousedown) { - getStateHelper().put(PropertyKeys.onmousedown, _onmousedown); - } - - - /** - * Client side callback to execute when a pointer input element is moved within input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnmousemove() { - return (String)getStateHelper().eval(PropertyKeys.onmousemove); - } - - /** - * Client side callback to execute when a pointer input element is moved within input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnmousemove(String _onmousemove) { - getStateHelper().put(PropertyKeys.onmousemove, _onmousemove); - } - - - /** - * Client side callback to execute when a pointer input element is moved away from input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnmouseout() { - return (String)getStateHelper().eval(PropertyKeys.onmouseout); - } - - /** - * Client side callback to execute when a pointer input element is moved away from input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnmouseout(String _onmouseout) { - getStateHelper().put(PropertyKeys.onmouseout, _onmouseout); - } - - - /** - * Client side callback to execute when a pointer input element is moved onto input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnmouseover() { - return (String)getStateHelper().eval(PropertyKeys.onmouseover); - } - - /** - * Client side callback to execute when a pointer input element is moved onto input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnmouseover(String _onmouseover) { - getStateHelper().put(PropertyKeys.onmouseover, _onmouseover); - } - - - /** - * Client side callback to execute when a pointer input element is released over input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnmouseup() { - return (String)getStateHelper().eval(PropertyKeys.onmouseup); - } - - /** - * Client side callback to execute when a pointer input element is released over input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnmouseup(String _onmouseup) { - getStateHelper().put(PropertyKeys.onmouseup, _onmouseup); - } - - - /** - * Client side callback to execute when text within input element is selected by user.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getOnselect() { - return (String)getStateHelper().eval(PropertyKeys.onselect); - } - - /** - * Client side callback to execute when text within input element is selected by user.

- * Usually this method is called internally by the JSF engine. - */ - public void setOnselect(String _onselect) { - getStateHelper().put(PropertyKeys.onselect, _onselect); - } - - - /** - * The placeholder attribute shows text in a field until the field is focused upon, then hides the text.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getPlaceholder() { - return (String)getStateHelper().eval(PropertyKeys.placeholder); - } - - /** - * The placeholder attribute shows text in a field until the field is focused upon, then hides the text.

- * Usually this method is called internally by the JSF engine. - */ - public void setPlaceholder(String _placeholder) { - getStateHelper().put(PropertyKeys.placeholder, _placeholder); - } - - - /** - * Comma or space separated list of ids or search expressions denoting which values are to be sent to the server.

- * @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.

- * Usually this method is called internally by the JSF engine. - */ - public void setProcess(String _process) { - getStateHelper().put(PropertyKeys.process, _process); - } - - - /** - * Flag indicating that this input element will prevent changes by the user.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isReadonly() { - return (boolean) (Boolean)getStateHelper().eval(PropertyKeys.readonly, false); - } - - /** - * Flag indicating that this input element will prevent changes by the user.

- * Usually this method is called internally by the JSF engine. - */ - public void setReadonly(boolean _readonly) { - getStateHelper().put(PropertyKeys.readonly, _readonly); - } - - - /** - * Allows you to suppress automatic rendering of labels. Used by AngularFaces, too.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public boolean isRenderLabel() { - return (boolean) (Boolean)getStateHelper().eval(PropertyKeys.renderLabel, true); - } - - /** - * Allows you to suppress automatic rendering of labels. Used by AngularFaces, too.

- * Usually this method is called internally by the JSF engine. - */ - public void setRenderLabel(boolean _renderLabel) { - getStateHelper().put(PropertyKeys.renderLabel, _renderLabel); - } - - - /** - * Boolean value Require input in the component when the form is submitted.

- * @return Returns the value of the attribute, or null, 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.

- * 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.

- * @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.

- * Usually this method is called internally by the JSF engine. - */ - public void setRequiredMessage(String _requiredMessage) { - getStateHelper().put(PropertyKeys.requiredMessage, _requiredMessage); - } - - - /** - * Number of characters used to determine the width of the input element.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public int getSize() { - return (int) (Integer)getStateHelper().eval(PropertyKeys.size, 0); - } - - /** - * Number of characters used to determine the width of the input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setSize(int _size) { - getStateHelper().put(PropertyKeys.size, _size); - } - - - /** - * The size of the input specified as number of grid columns.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public int getSpan() { - return (int) (Integer)getStateHelper().eval(PropertyKeys.span, 0); - } - - /** - * The size of the input specified as number of grid columns.

- * Usually this method is called internally by the JSF engine. - */ - public void setSpan(int _span) { - getStateHelper().put(PropertyKeys.span, _span); - } - - - /** - * Inline style of the input element.

- * @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.

- * Usually this method is called internally by the JSF engine. - */ - public void setStyle(String _style) { - getStateHelper().put(PropertyKeys.style, _style); - } - - - /** - * Style class of the input element.

- * @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 the input element.

- * Usually this method is called internally by the JSF engine. - */ - public void setStyleClass(String _styleClass) { - getStateHelper().put(PropertyKeys.styleClass, _styleClass); - } - - - /** - * Position of this element in the tabbing order for the current document. This value must be an integer between 0 and 32767.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getTabindex() { - return (String)getStateHelper().eval(PropertyKeys.tabindex); - } - - /** - * Position of this element in the tabbing order for the current document. This value must be an integer between 0 and 32767.

- * Usually this method is called internally by the JSF engine. - */ - public void setTabindex(String _tabindex) { - getStateHelper().put(PropertyKeys.tabindex, _tabindex); - } - - - /** - * Advisory tooltip information.

- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. - */ - public String getTitle() { - return (String)getStateHelper().eval(PropertyKeys.title); - } - - /** - * Advisory tooltip information.

- * Usually this method is called internally by the JSF engine. - */ - public void setTitle(String _title) { - getStateHelper().put(PropertyKeys.title, _title); - } - - - /** - * The text of the tooltip.

- * @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.

- * 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.

- * @return Returns the value of the attribute, or null, 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.

- * 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).

- * @return Returns the value of the attribute, or null, 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).

- * 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).

- * @return Returns the value of the attribute, or null, 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).

- * 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).

- * @return Returns the value of the attribute, or null, 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).

- * 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".

- * @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".

- * 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.

- * @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.

- * Usually this method is called internally by the JSF engine. - */ - public void setUpdate(String _update) { - getStateHelper().put(PropertyKeys.update, _update); - } - } - diff --git a/src/main/java/net/bootsfaces/component/selectOneMenu/SelectOneMenuCore.java b/src/main/java/net/bootsfaces/component/selectOneMenu/SelectOneMenuCore.java new file mode 100644 index 000000000..6da9d61bd --- /dev/null +++ b/src/main/java/net/bootsfaces/component/selectOneMenu/SelectOneMenuCore.java @@ -0,0 +1,808 @@ +/** + * Copyright 2014-16 by Riccardo Massera (TheCoder4.Eu), Dario D'Urzo and Stephan Rauh (http://www.beyondjava.net). + * + * This file is part of BootsFaces. + * + * BootsFaces is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * BootsFaces is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with BootsFaces. If not, see . + */ + +package net.bootsfaces.component.selectOneMenu; + +import javax.faces.component.html.HtmlInputText; + +/** This class holds the attributes of <b:selectOneMenu />. */ +public abstract class SelectOneMenuCore extends HtmlInputText implements net.bootsfaces.render.IHasTooltip { + + protected enum PropertyKeys { + accesskey, + ajax, + alt, + binding, + dir, + disabled, + fieldSize, + immediate, + inline, + label, + lang, + onblur, + onchange, + onclick, + oncomplete, + ondblclick, + onfocus, + onkeydown, + onkeypress, + onkeyup, + onmousedown, + onmousemove, + onmouseout, + onmouseover, + onmouseup, + onselect, + placeholder, + process, + readonly, + renderLabel, + required, + requiredMessage, + size, + span, + style, + styleClass, + tabindex, + title, + tooltip, + tooltipContainer, + tooltipDelay, + tooltipDelayHide, + tooltipDelayShow, + tooltipPosition, + update; + String toString; + + PropertyKeys(String toString) { + this.toString = toString; + } + + PropertyKeys() { + } + + public String toString() { + return ((this.toString != null) ? this.toString : super.toString()); + } + } + + /** + * Access key to transfer focus to the input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getAccesskey() { + return (String) getStateHelper().eval(PropertyKeys.accesskey); + } + + /** + * Access key to transfer focus to the input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setAccesskey(String _accesskey) { + getStateHelper().put(PropertyKeys.accesskey, _accesskey); + } + + /** + * Activates AJAX. The default value is false (no AJAX).

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isAjax() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.ajax, false); + } + + /** + * Activates AJAX. The default value is false (no AJAX).

+ * Usually this method is called internally by the JSF engine. + */ + public void setAjax(boolean _ajax) { + getStateHelper().put(PropertyKeys.ajax, _ajax); + } + + /** + * Alternate textual description of the input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getAlt() { + return (String) getStateHelper().eval(PropertyKeys.alt); + } + + /** + * Alternate textual description of the input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setAlt(String _alt) { + getStateHelper().put(PropertyKeys.alt, _alt); + } + + /** + * An EL expression referring to a server side UIComponent instance in a backing bean.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public javax.faces.component.UIComponent getBinding() { + return (javax.faces.component.UIComponent) getStateHelper().eval(PropertyKeys.binding); + } + + /** + * An EL expression referring to a server side UIComponent instance in a backing bean.

+ * Usually this method is called internally by the JSF engine. + */ + public void setBinding(javax.faces.component.UIComponent _binding) { + getStateHelper().put(PropertyKeys.binding, _binding); + } + + /** + * 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).

+ * @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).

+ * Usually this method is called internally by the JSF engine. + */ + public void setDir(String _dir) { + getStateHelper().put(PropertyKeys.dir, _dir); + } + + /** + * Disables the input element, default is false.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isDisabled() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.disabled, false); + } + + /** + * Disables the input element, default is false.

+ * Usually this method is called internally by the JSF engine. + */ + public void setDisabled(boolean _disabled) { + getStateHelper().put(PropertyKeys.disabled, _disabled); + } + + /** + * The size of the input. Possible values are xs (extra small), sm (small), md (medium) and lg (large) .

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getFieldSize() { + return (String) getStateHelper().eval(PropertyKeys.fieldSize); + } + + /** + * The size of the input. Possible values are xs (extra small), sm (small), md (medium) and lg (large) .

+ * Usually this method is called internally by the JSF engine. + */ + public void setFieldSize(String _fieldSize) { + getStateHelper().put(PropertyKeys.fieldSize, _fieldSize); + } + + /** + * 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.

+ * @return Returns the value of the attribute, or null, 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.

+ * Usually this method is called internally by the JSF engine. + */ + public void setImmediate(boolean _immediate) { + getStateHelper().put(PropertyKeys.immediate, _immediate); + } + + /** + * Inline forms are more compact and put the label to the left hand side of the input field instead of putting it above the input field. Inline applies only to screens that are at least 768 pixels wide.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isInline() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.inline, false); + } + + /** + * Inline forms are more compact and put the label to the left hand side of the input field instead of putting it above the input field. Inline applies only to screens that are at least 768 pixels wide.

+ * Usually this method is called internally by the JSF engine. + */ + public void setInline(boolean _inline) { + getStateHelper().put(PropertyKeys.inline, _inline); + } + + /** + * The label of the field.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getLabel() { + return (String) getStateHelper().eval(PropertyKeys.label); + } + + /** + * The label of the field.

+ * Usually this method is called internally by the JSF engine. + */ + public void setLabel(String _label) { + getStateHelper().put(PropertyKeys.label, _label); + } + + /** + * Code describing the language used in the generated markup for this component.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getLang() { + return (String) getStateHelper().eval(PropertyKeys.lang); + } + + /** + * Code describing the language used in the generated markup for this component.

+ * Usually this method is called internally by the JSF engine. + */ + public void setLang(String _lang) { + getStateHelper().put(PropertyKeys.lang, _lang); + } + + /** + * Client side callback to execute when input element loses focus.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnblur() { + return (String) getStateHelper().eval(PropertyKeys.onblur); + } + + /** + * Client side callback to execute when input element loses focus.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnblur(String _onblur) { + getStateHelper().put(PropertyKeys.onblur, _onblur); + } + + /** + * Client side callback to execute when input element loses focus and its value has been modified since gaining focus.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnchange() { + return (String) getStateHelper().eval(PropertyKeys.onchange); + } + + /** + * Client side callback to execute when input element loses focus and its value has been modified since gaining focus.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnchange(String _onchange) { + getStateHelper().put(PropertyKeys.onchange, _onchange); + } + + /** + * OnClick DHTML event .

+ * @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); + } + + /** + * OnClick DHTML event .

+ * 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 with success.

+ * @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 with success.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOncomplete(String _oncomplete) { + getStateHelper().put(PropertyKeys.oncomplete, _oncomplete); + } + + /** + * Client side callback to execute when input element is double clicked.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOndblclick() { + return (String) getStateHelper().eval(PropertyKeys.ondblclick); + } + + /** + * Client side callback to execute when input element is double clicked.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOndblclick(String _ondblclick) { + getStateHelper().put(PropertyKeys.ondblclick, _ondblclick); + } + + /** + * Client side callback to execute when input element receives focus.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnfocus() { + return (String) getStateHelper().eval(PropertyKeys.onfocus); + } + + /** + * Client side callback to execute when input element receives focus.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnfocus(String _onfocus) { + getStateHelper().put(PropertyKeys.onfocus, _onfocus); + } + + /** + * Client side callback to execute when a key is pressed down over input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnkeydown() { + return (String) getStateHelper().eval(PropertyKeys.onkeydown); + } + + /** + * Client side callback to execute when a key is pressed down over input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnkeydown(String _onkeydown) { + getStateHelper().put(PropertyKeys.onkeydown, _onkeydown); + } + + /** + * Client side callback to execute when a key is pressed and released over input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnkeypress() { + return (String) getStateHelper().eval(PropertyKeys.onkeypress); + } + + /** + * Client side callback to execute when a key is pressed and released over input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnkeypress(String _onkeypress) { + getStateHelper().put(PropertyKeys.onkeypress, _onkeypress); + } + + /** + * Client side callback to execute when a key is released over input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnkeyup() { + return (String) getStateHelper().eval(PropertyKeys.onkeyup); + } + + /** + * Client side callback to execute when a key is released over input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnkeyup(String _onkeyup) { + getStateHelper().put(PropertyKeys.onkeyup, _onkeyup); + } + + /** + * Client side callback to execute when a pointer input element is pressed down over input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnmousedown() { + return (String) getStateHelper().eval(PropertyKeys.onmousedown); + } + + /** + * Client side callback to execute when a pointer input element is pressed down over input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnmousedown(String _onmousedown) { + getStateHelper().put(PropertyKeys.onmousedown, _onmousedown); + } + + /** + * Client side callback to execute when a pointer input element is moved within input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnmousemove() { + return (String) getStateHelper().eval(PropertyKeys.onmousemove); + } + + /** + * Client side callback to execute when a pointer input element is moved within input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnmousemove(String _onmousemove) { + getStateHelper().put(PropertyKeys.onmousemove, _onmousemove); + } + + /** + * Client side callback to execute when a pointer input element is moved away from input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnmouseout() { + return (String) getStateHelper().eval(PropertyKeys.onmouseout); + } + + /** + * Client side callback to execute when a pointer input element is moved away from input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnmouseout(String _onmouseout) { + getStateHelper().put(PropertyKeys.onmouseout, _onmouseout); + } + + /** + * Client side callback to execute when a pointer input element is moved onto input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnmouseover() { + return (String) getStateHelper().eval(PropertyKeys.onmouseover); + } + + /** + * Client side callback to execute when a pointer input element is moved onto input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnmouseover(String _onmouseover) { + getStateHelper().put(PropertyKeys.onmouseover, _onmouseover); + } + + /** + * Client side callback to execute when a pointer input element is released over input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnmouseup() { + return (String) getStateHelper().eval(PropertyKeys.onmouseup); + } + + /** + * Client side callback to execute when a pointer input element is released over input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnmouseup(String _onmouseup) { + getStateHelper().put(PropertyKeys.onmouseup, _onmouseup); + } + + /** + * Client side callback to execute when text within input element is selected by user.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnselect() { + return (String) getStateHelper().eval(PropertyKeys.onselect); + } + + /** + * Client side callback to execute when text within input element is selected by user.

+ * Usually this method is called internally by the JSF engine. + */ + public void setOnselect(String _onselect) { + getStateHelper().put(PropertyKeys.onselect, _onselect); + } + + /** + * The placeholder attribute shows text in a field until the field is focused upon, then hides the text.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getPlaceholder() { + return (String) getStateHelper().eval(PropertyKeys.placeholder); + } + + /** + * The placeholder attribute shows text in a field until the field is focused upon, then hides the text.

+ * Usually this method is called internally by the JSF engine. + */ + public void setPlaceholder(String _placeholder) { + getStateHelper().put(PropertyKeys.placeholder, _placeholder); + } + + /** + * Comma or space separated list of ids or search expressions denoting which values are to be sent to the server.

+ * @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.

+ * Usually this method is called internally by the JSF engine. + */ + public void setProcess(String _process) { + getStateHelper().put(PropertyKeys.process, _process); + } + + /** + * Flag indicating that this input element will prevent changes by the user.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isReadonly() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.readonly, false); + } + + /** + * Flag indicating that this input element will prevent changes by the user.

+ * Usually this method is called internally by the JSF engine. + */ + public void setReadonly(boolean _readonly) { + getStateHelper().put(PropertyKeys.readonly, _readonly); + } + + /** + * Allows you to suppress automatic rendering of labels. Used by AngularFaces, too.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public boolean isRenderLabel() { + return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.renderLabel, + net.bootsfaces.component.ComponentUtils.isRenderLabelDefault()); + } + + /** + * Allows you to suppress automatic rendering of labels. Used by AngularFaces, too.

+ * Usually this method is called internally by the JSF engine. + */ + public void setRenderLabel(boolean _renderLabel) { + getStateHelper().put(PropertyKeys.renderLabel, _renderLabel); + } + + /** + * Boolean value Require input in the component when the form is submitted.

+ * @return Returns the value of the attribute, or null, 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.

+ * 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.

+ * @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.

+ * Usually this method is called internally by the JSF engine. + */ + public void setRequiredMessage(String _requiredMessage) { + getStateHelper().put(PropertyKeys.requiredMessage, _requiredMessage); + } + + /** + * Number of characters used to determine the width of the input element.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public int getSize() { + return (int) (Integer) getStateHelper().eval(PropertyKeys.size, 0); + } + + /** + * Number of characters used to determine the width of the input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setSize(int _size) { + getStateHelper().put(PropertyKeys.size, _size); + } + + /** + * The size of the input specified as number of grid columns.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public int getSpan() { + return (int) (Integer) getStateHelper().eval(PropertyKeys.span, 0); + } + + /** + * The size of the input specified as number of grid columns.

+ * Usually this method is called internally by the JSF engine. + */ + public void setSpan(int _span) { + getStateHelper().put(PropertyKeys.span, _span); + } + + /** + * Inline style of the input element.

+ * @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.

+ * Usually this method is called internally by the JSF engine. + */ + public void setStyle(String _style) { + getStateHelper().put(PropertyKeys.style, _style); + } + + /** + * Style class of the input element.

+ * @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 the input element.

+ * Usually this method is called internally by the JSF engine. + */ + public void setStyleClass(String _styleClass) { + getStateHelper().put(PropertyKeys.styleClass, _styleClass); + } + + /** + * Position of this element in the tabbing order for the current document. This value must be an integer between 0 and 32767.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getTabindex() { + return (String) getStateHelper().eval(PropertyKeys.tabindex); + } + + /** + * Position of this element in the tabbing order for the current document. This value must be an integer between 0 and 32767.

+ * Usually this method is called internally by the JSF engine. + */ + public void setTabindex(String _tabindex) { + getStateHelper().put(PropertyKeys.tabindex, _tabindex); + } + + /** + * Advisory tooltip information.

+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getTitle() { + return (String) getStateHelper().eval(PropertyKeys.title); + } + + /** + * Advisory tooltip information.

+ * Usually this method is called internally by the JSF engine. + */ + public void setTitle(String _title) { + getStateHelper().put(PropertyKeys.title, _title); + } + + /** + * The text of the tooltip.

+ * @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.

+ * 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.

+ * @return Returns the value of the attribute, or null, 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.

+ * 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).

+ * @return Returns the value of the attribute, or null, 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).

+ * 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).

+ * @return Returns the value of the attribute, or null, 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).

+ * 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).

+ * @return Returns the value of the attribute, or null, 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).

+ * 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".

+ * @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".

+ * 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.

+ * @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.

+ * Usually this method is called internally by the JSF engine. + */ + public void setUpdate(String _update) { + getStateHelper().put(PropertyKeys.update, _update); + } + +} diff --git a/xtext/BootsFaces.jsfdsl b/xtext/BootsFaces.jsfdsl index b6d1c21d2..bd9fe7f75 100644 --- a/xtext/BootsFaces.jsfdsl +++ b/xtext/BootsFaces.jsfdsl @@ -884,7 +884,7 @@ widget inputSecret placeholder "The placeholder attribute shows text in a field until the field is focused upon, then hides the text." process "Comma or space separated list of ids or search expressions denoting which values are to be sent to the server." readonly Boolean "Flag indicating that this input element will prevent changes by the user." - render-label Boolean default "true" "Allows you to suppress automatic rendering of labels. Used by AngularFaces, too." + render-label Boolean default "net.bootsfaces.component.ComponentUtils.isRenderLabelDefault()" "Allows you to suppress automatic rendering of labels. Used by AngularFaces, too." rendered Boolean inherited "Boolean value to specify the rendering of the component, when set to false the component will not be rendered." required Boolean "Boolean value Require input in the component when the form is submitted." required-message "Message to show if the user did not specify a value and the attribute required is set to true." @@ -950,7 +950,7 @@ widget inputText placeholder "The placeholder attribute shows text in a field until the field is focused upon, then hides the text." process "Comma or space separated list of ids or search expressions denoting which values are to be sent to the server." readonly Boolean "Flag indicating that this input element will prevent changes by the user." - render-label Boolean default "false" "Allows you to suppress automatic rendering of labels. Used by AngularFaces, too." + render-label Boolean default "net.bootsfaces.component.ComponentUtils.isRenderLabelDefault()" "Allows you to suppress automatic rendering of labels. Used by AngularFaces, too." rendered Boolean inherited "Boolean value to specify the rendering of the component, when set to false the component will not be rendered." required Boolean "Boolean value Require input in the component when the form is submitted." required-message "Message to show if the user did not specify a value and the attribute required is set to true." @@ -1015,7 +1015,7 @@ widget inputTextarea placeholder "The placeholder attribute shows text in a field until the field is focused upon, then hides the text." process "Comma or space separated list of ids or search expressions denoting which values are to be sent to the server." readonly Boolean "Flag indicating that this input element will prevent changes by the user." - render-label Boolean default "false" "Allows you to suppress automatic rendering of labels. Used by AngularFaces, too." + render-label Boolean default "net.bootsfaces.component.ComponentUtils.isRenderLabelDefault()" "Allows you to suppress automatic rendering of labels. Used by AngularFaces, too." rendered Boolean inherited "Boolean value to specify the rendering of the component, when set to false the component will not be rendered." required Boolean "Boolean value Require input in the component when the form is submitted." required-message "Message to show if the user did not specify a value and the attribute required is set to true." @@ -1619,7 +1619,7 @@ widget selectBooleanCheckbox onselect "Client side callback to execute when text within input element is selected by user." process "Comma or space separated list of ids or search expressions denoting which values are to be sent to the server." readonly Boolean "Flag indicating that this input element will prevent changes by the user." - render-label Boolean default "true" "Allows you to suppress automatic rendering of labels. Used by AngularFaces, too." + render-label Boolean default "net.bootsfaces.component.ComponentUtils.isRenderLabelDefault()" "Allows you to suppress automatic rendering of labels. Used by AngularFaces, too." rendered Boolean inherited "Boolean value to specify the rendering of the component, when set to false the component will not be rendered." span Integer "The size of the input specified as number of grid columns." style "Inline style of the input element." @@ -1691,7 +1691,7 @@ widget switch on-text "Optional label of the active switch. The default value is 'on'." off-text "Optional label of the inactive switch. The default value is 'off'." readonly Boolean inherited "Flag indicating that this input element will prevent changes by the user." - render-label Boolean default "true" inherited "Allows you to suppress automatic rendering of labels. Used by AngularFaces, too." + render-label Boolean default "net.bootsfaces.component.ComponentUtils.isRenderLabelDefault()" inherited "Allows you to suppress automatic rendering of labels. Used by AngularFaces, too." rendered Boolean inherited "Boolean value to specify the rendering of the component, when set to false the component will not be rendered." span Integer inherited "The size of the input specified as number of grid columns." style inherited "Inline style of the input element." @@ -1721,6 +1721,7 @@ widget switch widget selectMultiMenu + extends HtmlInputText has_tooltip description "Similar to a traditional combobox, but with the option to select multiple values." { @@ -1759,7 +1760,7 @@ widget selectMultiMenu placeholder "The placeholder attribute shows text in a field until the field is focused upon, then hides the text." readonly Boolean "Flag indicating that this input element will prevent changes by the user." - render-label Boolean default "true" "Allows you to suppress automatic rendering of labels. Used by AngularFaces, too." + render-label Boolean default "net.bootsfaces.component.ComponentUtils.isRenderLabelDefault()" "Allows you to suppress automatic rendering of labels. Used by AngularFaces, too." rendered Boolean inherited "Boolean value to specify the rendering of the component, when set to false the component will not be rendered." required Boolean "Boolean value Require input in the component when the form is submitted." required-message "Message to show if the user did not specify a value and the attribute required is set to true." @@ -1813,7 +1814,7 @@ widget selectOneMenu placeholder "The placeholder attribute shows text in a field until the field is focused upon, then hides the text." process "Comma or space separated list of ids or search expressions denoting which values are to be sent to the server." readonly Boolean "Flag indicating that this input element will prevent changes by the user." - render-label Boolean default "true" "Allows you to suppress automatic rendering of labels. Used by AngularFaces, too." + render-label Boolean default "net.bootsfaces.component.ComponentUtils.isRenderLabelDefault()" "Allows you to suppress automatic rendering of labels. Used by AngularFaces, too." rendered Boolean inherited "Boolean value to specify the rendering of the component, when set to false the component will not be rendered." required Boolean "Boolean value Require input in the component when the form is submitted." required-message "Message to show if the user did not specify a value and the attribute required is set to true."