+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnsuccess(); + + /** + * JavaScript to be executed when ajax results on an error (including both network errors and Java exceptions).
+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. + */ + public String getOnerror(); +} diff --git a/src/main/java/net/bootsfaces/component/commandButton/CommandButton.java b/src/main/java/net/bootsfaces/component/commandButton/CommandButton.java index 97ff51cd8..bf1670144 100644 --- a/src/main/java/net/bootsfaces/component/commandButton/CommandButton.java +++ b/src/main/java/net/bootsfaces/component/commandButton/CommandButton.java @@ -1,8 +1,8 @@ /** * Copyright 2014-2016 Riccardo Massera (TheCoder4.Eu) - * + * * 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,11 +26,10 @@ import javax.el.ValueExpression; import javax.faces.component.FacesComponent; -import javax.faces.component.UICommand; import javax.faces.component.behavior.ClientBehaviorHolder; -import javax.faces.context.FacesContext; import net.bootsfaces.component.ajax.IAJAXComponent; +import net.bootsfaces.component.ajax.IAJAXComponent2; import net.bootsfaces.listeners.AddResourcesListener; import net.bootsfaces.render.IHasTooltip; import net.bootsfaces.render.Tooltip; @@ -41,7 +40,7 @@ * @author thecoder4.eu */ @FacesComponent(CommandButton.COMPONENT_TYPE) -public class CommandButton extends UICommand implements ClientBehaviorHolder, IHasTooltip, IAJAXComponent { +public class CommandButton extends CommandButtonCore implements ClientBehaviorHolder, IHasTooltip, IAJAXComponent, IAJAXComponent2 { /** *
@@ -86,7 +85,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
- * @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);
- }
-
-
- /**
- * Whether the Button submits the form with 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);
- }
-
- /**
- * Whether the Button submits the form with AJAX.
- * Usually this method is called internally by the JSF engine.
- */
- public void setAjax(boolean _ajax) {
- getStateHelper().put(PropertyKeys.ajax, _ajax);
- }
-
-
- /**
- * 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);
- }
-
-
- /**
- * Boolean value to specify if the button is disabled.
- * @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);
- }
-
- /**
- * Boolean value to specify if the button is disabled.
- * Usually this method is called internally by the JSF engine.
- */
- public void setDisabled(boolean _disabled) {
- getStateHelper().put(PropertyKeys.disabled, _disabled);
- }
-
-
- /**
- * Button Icon, can be one of the Bootstrap icon names. Alignment can be specified with icon-align attribute.
- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
- */
- public String getIcon() {
- return (String)getStateHelper().eval(PropertyKeys.icon);
- }
-
- /**
- * Button Icon, can be one of the Bootstrap icon names. Alignment can be specified with icon-align attribute.
- * Usually this method is called internally by the JSF engine.
- */
- public void setIcon(String _icon) {
- getStateHelper().put(PropertyKeys.icon, _icon);
- }
-
-
- /**
- * Alignment can be right or left.
- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
- */
- public String getIconAlign() {
- return (String)getStateHelper().eval(PropertyKeys.iconAlign);
- }
-
- /**
- * Alignment can be right or left.
- * Usually this method is called internally by the JSF engine.
- */
- public void setIconAlign(String _iconAlign) {
- getStateHelper().put(PropertyKeys.iconAlign, _iconAlign);
- }
-
-
- /**
- * Font Awesome Icon to show in this CommandButton, can be one of the Font Awesome icon names. Alignment can be specified with the icon-align attribute.
- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
- */
- public String getIconAwesome() {
- return (String)getStateHelper().eval(PropertyKeys.iconAwesome);
- }
-
- /**
- * Font Awesome Icon to show in this CommandButton, can be one of the Font Awesome icon names. Alignment can be specified with the icon-align attribute.
- * Usually this method is called internally by the JSF engine.
- */
- public void setIconAwesome(String _iconAwesome) {
- getStateHelper().put(PropertyKeys.iconAwesome, _iconAwesome);
- }
-
-
- /**
- * 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);
- }
-
-
- /**
- * 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);
- }
-
-
- /**
- * Look of the Button, can be primary, block, info, success, warning, important, danger. If not specified, Standard gray button with gradient is rendered.
- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
- */
- public String getLook() {
- return (String)getStateHelper().eval(PropertyKeys.look);
- }
-
- /**
- * Look of the Button, can be primary, block, info, success, warning, important, danger. If not specified, Standard gray button with gradient is rendered.
- * Usually this method is called internally by the JSF engine.
- */
- public void setLook(String _look) {
- getStateHelper().put(PropertyKeys.look, _look);
- }
-
-
- /**
- * 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);
- }
-
-
- /**
- * The onclick attribute.
- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
- */
- public String getOnclick() {
- return (String)getStateHelper().eval(PropertyKeys.onclick);
- }
-
- /**
- * The onclick attribute.
- * 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);
- }
-
-
- /**
- * Size of the Button, can be large, small, mini. If not specified, Standard size button is rendered.
- * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
- */
- public String getSize() {
- return (String)getStateHelper().eval(PropertyKeys.size);
- }
-
- /**
- * Size of the Button, can be large, small, mini. If not specified, Standard size button is rendered.
- * Usually this method is called internally by the JSF engine.
- */
- public void setSize(String _size) {
- getStateHelper().put(PropertyKeys.size, _size);
- }
-
-
- /**
- * 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 this 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 this 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);
- }
-
-
- /**
- * The button type, can be submit, button, reset ; default submit.
- * @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);
- }
-
- /**
- * The button type, can be submit, button, reset ; default submit.
- * 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/commandButton/CommandButtonCore.java b/src/main/java/net/bootsfaces/component/commandButton/CommandButtonCore.java
new file mode 100644
index 000000000..92549fa02
--- /dev/null
+++ b/src/main/java/net/bootsfaces/component/commandButton/CommandButtonCore.java
@@ -0,0 +1,756 @@
+/**
+ * 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
+ * @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);
+ }
+
+ /**
+ * Whether the Button submits the form with 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);
+ }
+
+ /**
+ * Whether the Button submits the form with AJAX.
+ * Usually this method is called internally by the JSF engine.
+ */
+ public void setAjax(boolean _ajax) {
+ getStateHelper().put(PropertyKeys.ajax, _ajax);
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ * Boolean value to specify if the button is disabled.
+ * @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);
+ }
+
+ /**
+ * Boolean value to specify if the button is disabled.
+ * Usually this method is called internally by the JSF engine.
+ */
+ public void setDisabled(boolean _disabled) {
+ getStateHelper().put(PropertyKeys.disabled, _disabled);
+ }
+
+ /**
+ * Button Icon, can be one of the Bootstrap icon names. Alignment can be specified with icon-align attribute.
+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
+ */
+ public String getIcon() {
+ return (String) getStateHelper().eval(PropertyKeys.icon);
+ }
+
+ /**
+ * Button Icon, can be one of the Bootstrap icon names. Alignment can be specified with icon-align attribute.
+ * Usually this method is called internally by the JSF engine.
+ */
+ public void setIcon(String _icon) {
+ getStateHelper().put(PropertyKeys.icon, _icon);
+ }
+
+ /**
+ * Alignment can be right or left.
+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
+ */
+ public String getIconAlign() {
+ return (String) getStateHelper().eval(PropertyKeys.iconAlign);
+ }
+
+ /**
+ * Alignment can be right or left.
+ * Usually this method is called internally by the JSF engine.
+ */
+ public void setIconAlign(String _iconAlign) {
+ getStateHelper().put(PropertyKeys.iconAlign, _iconAlign);
+ }
+
+ /**
+ * Font Awesome Icon to show in this CommandButton, can be one of the Font Awesome icon names. Alignment can be specified with the icon-align attribute.
+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
+ */
+ public String getIconAwesome() {
+ return (String) getStateHelper().eval(PropertyKeys.iconAwesome);
+ }
+
+ /**
+ * Font Awesome Icon to show in this CommandButton, can be one of the Font Awesome icon names. Alignment can be specified with the icon-align attribute.
+ * Usually this method is called internally by the JSF engine.
+ */
+ public void setIconAwesome(String _iconAwesome) {
+ getStateHelper().put(PropertyKeys.iconAwesome, _iconAwesome);
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ * Look of the Button, can be primary, block, info, success, warning, important, danger. If not specified, Standard gray button with gradient is rendered.
+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
+ */
+ public String getLook() {
+ return (String) getStateHelper().eval(PropertyKeys.look);
+ }
+
+ /**
+ * Look of the Button, can be primary, block, info, success, warning, important, danger. If not specified, Standard gray button with gradient is rendered.
+ * Usually this method is called internally by the JSF engine.
+ */
+ public void setLook(String _look) {
+ getStateHelper().put(PropertyKeys.look, _look);
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ * The onclick attribute.
+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
+ */
+ public String getOnclick() {
+ return (String) getStateHelper().eval(PropertyKeys.onclick);
+ }
+
+ /**
+ * The onclick attribute.
+ * 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.
+ * @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.
+ * 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);
+ }
+
+ /**
+ * JavaScript to be executed when ajax results on an error (including both network errors and Java exceptions).
+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
+ */
+ public String getOnerror() {
+ return (String) getStateHelper().eval(PropertyKeys.onerror);
+ }
+
+ /**
+ * JavaScript to be executed when ajax results on an error (including both network errors and Java exceptions).
+ * Usually this method is called internally by the JSF engine.
+ */
+ public void setOnerror(String _onerror) {
+ getStateHelper().put(PropertyKeys.onerror, _onerror);
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ * JavaScript to be executed when ajax completes with success (i.e. there's neither a network error nor a Java exception).
+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
+ */
+ public String getOnsuccess() {
+ return (String) getStateHelper().eval(PropertyKeys.onsuccess);
+ }
+
+ /**
+ * JavaScript to be executed when ajax completes with success (i.e. there's neither a network error nor a Java exception).
+ * Usually this method is called internally by the JSF engine.
+ */
+ public void setOnsuccess(String _onsuccess) {
+ getStateHelper().put(PropertyKeys.onsuccess, _onsuccess);
+ }
+
+ /**
+ * Comma or space separated list of ids or search expressions denoting which values are to be sent to the server.
+ * @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);
+ }
+
+ /**
+ * Size of the Button, can be large, small, mini. If not specified, Standard size button is rendered.
+ * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
+ */
+ public String getSize() {
+ return (String) getStateHelper().eval(PropertyKeys.size);
+ }
+
+ /**
+ * Size of the Button, can be large, small, mini. If not specified, Standard size button is rendered.
+ * Usually this method is called internally by the JSF engine.
+ */
+ public void setSize(String _size) {
+ getStateHelper().put(PropertyKeys.size, _size);
+ }
+
+ /**
+ * 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 this 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 this 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);
+ }
+
+ /**
+ * The button type, can be submit, button, reset ; default submit.
+ * @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);
+ }
+
+ /**
+ * The button type, can be submit, button, reset ; default submit.
+ * 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/dataTable/DataTableRenderer.java b/src/main/java/net/bootsfaces/component/dataTable/DataTableRenderer.java
index c1d4a4638..0347fb823 100644
--- a/src/main/java/net/bootsfaces/component/dataTable/DataTableRenderer.java
+++ b/src/main/java/net/bootsfaces/component/dataTable/DataTableRenderer.java
@@ -329,21 +329,21 @@ public void encodeEnd(FacesContext context, UIComponent component) throws IOExce
rw.writeText(widgetVar +".on('page.dt', function(event, settings, len){" +
"var info = table.page.info();" +
"try {" +
- " BsF.ajax.callAjax(this, event, null, null, null, " +
+ " BsF.ajax.callAjax(this, event, null, null, null, null, null," +
"'" + DataTablePropertyType.currentPage + ":'+info.page);" +
"} catch(e) { console.warn(workInProgressErrorMessage, e); }" +
"});", null);
//# Event setup: https://datatables.net/reference/event/length
rw.writeText(widgetVar +".on('length.dt', function(event, settings, len) {" +
"try {" +
- " BsF.ajax.callAjax(this, event, null, null, null, " +
+ " BsF.ajax.callAjax(this, event, null, null, null, null, null," +
"'" + DataTablePropertyType.pageLength + ":'+len);" +
"} catch(e) { console.warn(workInProgressErrorMessage, e); }" +
"});", null);
//# Event setup: https://datatables.net/reference/event/search
rw.writeText(widgetVar +".on('search.dt', function(event, settings, len) {" +
"try {" +
- " BsF.ajax.callAjax(this, event, null, null, null, " +
+ " BsF.ajax.callAjax(this, event, null, null, null, null, null," +
"'" + DataTablePropertyType.searchTerm + ":'+table.search());" +
"} catch(e) { console.warn(workInProgressErrorMessage, e); }" +
"});", null);
diff --git a/src/main/java/net/bootsfaces/component/scrollSpy/ScrollSpyRenderer.java b/src/main/java/net/bootsfaces/component/scrollSpy/ScrollSpyRenderer.java
index d911a4e23..5b0d413b4 100644
--- a/src/main/java/net/bootsfaces/component/scrollSpy/ScrollSpyRenderer.java
+++ b/src/main/java/net/bootsfaces/component/scrollSpy/ScrollSpyRenderer.java
@@ -1,8 +1,8 @@
/**
* Copyright 2014-15 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
@@ -37,7 +37,7 @@
/** This class generates the HTML code of <b:scrollSpy />. */
@FacesRenderer(componentFamily = "net.bootsfaces.component", rendererType = "net.bootsfaces.component.scrollSpy.ScrollSpy")
public class ScrollSpyRenderer extends CoreRenderer {
-
+
/**
* Decode ajax behaviours specific to the components
*/
@@ -67,13 +67,13 @@ public void decode(FacesContext context, UIComponent component) {
}
}
}
-
+
/**
* This methods generates the HTML code of the current b:scrollSpy.
* @param context the FacesContext.
* @param component the current b:scrollSpy.
* @throws IOException thrown if something goes wrong when writing the HTML code.
- */
+ */
@Override
public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
// do nothing
@@ -87,22 +87,22 @@ public void encodeEnd(FacesContext context, UIComponent component) throws IOExce
ScrollSpy scrollSpy = (ScrollSpy) component;
ResponseWriter rw = context.getResponseWriter();
String clientId = scrollSpy.getClientId();
-
+
// Get attributes
String container = scrollSpy.getContainer();
if(!BsfUtils.isStringValued(container)) {
container = "body";
} else container = "#" + decodeAndEscapeSelectors(context, component, container);
-
+
String target = scrollSpy.getTarget();
if(!BsfUtils.isStringValued(target)) {
target = ".navbar";
} else target = "#" + decodeAndEscapeSelectors(context, component, target);
-
+
int offset = scrollSpy.getOffset();
if(!BsfUtils.isStringValued(target)) {
offset = 20;
- }
+ }
boolean smooth = scrollSpy.isSmooth();
int smoothSpeed = scrollSpy.getSmoothSpeed();
boolean hasListeners = (scrollSpy.getSelectionListener() != null);
@@ -117,7 +117,7 @@ public void encodeEnd(FacesContext context, UIComponent component) throws IOExce
throw new FacesException("The scrollspy component must be inside a form if an actionlistener is defined", null);
}
}
-
+
rw.startElement("script", component);
rw.writeText("" +
"$(document).ready(function() { " +
@@ -128,29 +128,29 @@ public void encodeEnd(FacesContext context, UIComponent component) throws IOExce
" var hash = this.hash; " +
" $('" + ("body".equals(container) ? "html, body": container) + "').animate({ " +
" scrollTop: $(hash).parent().scrollTop() + $(hash).offset().top - $(hash).parent().offset().top " +
- " }, { " +
- " duration: " + smoothSpeed + ", " +
- " specialEasing: { " +
- " width: 'linear', " +
- " height: 'easeOutBounce' " +
+ " }, { " +
+ " duration: " + smoothSpeed + ", " +
+ " specialEasing: { " +
+ " width: 'linear', " +
+ " height: 'easeOutBounce' " +
" } "+
" }); " +
" event.preventDefault(); " +
"}); ", null);
}
-
+
if(hasListeners) {
- rw.writeText("" +
- "$('" + target + "').on('activate.bs.scrollspy', function() { " +
+ rw.writeText("" +
+ "$('" + target + "').on('activate.bs.scrollspy', function() { " +
" var x = $('" + target + " li.active > a').text(); " +
- " BsF.ajax.callAjax(this, 'action', '" + updateItems + "', '" + clientId + "', null, 'itemSelected:' + x); " +
+ " BsF.ajax.callAjax(this, 'action', '" + updateItems + "', '" + clientId + "', null, null, null, 'itemSelected:' + x); " +
"}); ", null);
}
-
+
rw.writeText("});", null);
rw.endElement("script");
}
-
+
/**
* Decode and escape selectors if necessary
* @param context
@@ -161,7 +161,7 @@ public void encodeEnd(FacesContext context, UIComponent component) throws IOExce
private String decodeAndEscapeSelectors(FacesContext context, UIComponent component, String selector) {
selector = ExpressionResolver.getComponentIDs(context, component, selector);
selector = BsfUtils.escapeJQuerySpecialCharsInSelector(selector);
-
+
return selector;
}
}
diff --git a/src/main/java/net/bootsfaces/component/tree/TreeRenderer.java b/src/main/java/net/bootsfaces/component/tree/TreeRenderer.java
index b9e138643..ec524c8ba 100644
--- a/src/main/java/net/bootsfaces/component/tree/TreeRenderer.java
+++ b/src/main/java/net/bootsfaces/component/tree/TreeRenderer.java
@@ -1,8 +1,8 @@
/**
* Copyright 2014-2016 Dario D'Urzo
- *
+ *
* 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
@@ -41,7 +41,7 @@
/** This class provide the rendering logic of the <b:tree />. */
@FacesRenderer(componentFamily = C.BSFCOMPONENT, rendererType = "net.bootsfaces.component.tree.Tree")
public class TreeRenderer extends CoreRenderer {
-
+
/**
* Decode ajax behaviours specific to the components
*/
@@ -65,7 +65,7 @@ public void decode(FacesContext context, UIComponent component) {
Node n = TreeModelUtils.mapDataToModel(value);
TreeModelUtils.updateNodeById(tree.getValue(), n.getNodeId(), n);
// tree.setSubmittedValue(tree.getValue());
-
+
// execute listener only for listened events
if ("nodeSelected".equals(key)) {
Node n2 = checkNodeIsSelected(tree.getValue(), tree);
@@ -110,7 +110,7 @@ public void encodeBegin(FacesContext context, UIComponent component) throws IOEx
Tree tree = (Tree) component;
ResponseWriter rw = context.getResponseWriter();
String clientId = tree.getClientId();
-
+
// check is inside form (MyFaces requires to be)
final UIForm form = BsfUtils.getClosestForm(tree);
if(form == null) {
@@ -132,7 +132,7 @@ public void encodeEnd(FacesContext context, UIComponent component) throws IOExce
String clientId = tree.getClientId();
String jqClientId = BsfUtils.escapeJQuerySpecialCharsInSelector(clientId);
ResponseWriter rw = context.getResponseWriter();
-
+
final UIForm form = BsfUtils.getClosestForm(tree);
if(form == null) {
throw new FacesException("The tree component must be inside a form", null);
@@ -149,7 +149,7 @@ public void encodeEnd(FacesContext context, UIComponent component) throws IOExce
rw.writeText("function getTreeData() { " +
" return '" + TreeModelUtils.renderModelAsJson(tree.getValue(), tree.isRenderRoot()) + "'; " +
"} " +
-
+
// build tree structure
"$('#tree_" + jqClientId + "').treeview({ " +
(tree.isShowTags() ? "showTags: true," : "") +
@@ -163,30 +163,30 @@ public void encodeEnd(FacesContext context, UIComponent component) throws IOExce
(BsfUtils.isStringValued(tree.getHoverColor()) ? "onhoverColor: '" + tree.getHoverColor() + "'," : "") +
(BsfUtils.isStringValued(tree.getSelectedColor()) ? "selectedColor: '" + tree.getSelectedColor() + "'," : "") +
(BsfUtils.isStringValued(tree.getBorderColor()) ? "borderColor: '" + tree.getBorderColor() + "'," : "") +
- " data: getTreeData(), " +
+ " data: getTreeData(), " +
// enable nodeSelected event callback
" onNodeSelected: function(event, data) { " +
- " BsF.ajax.callAjax(this, event, '" + updateItems + "', '" + clientId + "', null, 'nodeSelected:' + treeDataMapper(data));" + // @all
+ " BsF.ajax.callAjax(this, event, '" + updateItems + "', '" + clientId + "', null, null, null, 'nodeSelected:' + treeDataMapper(data));" + // @all
" }," +
// enable nodeUnselected event callback
" onNodeUnselected: function(event, data) { " +
- " BsF.ajax.callAjax(this, event, '" + updateItems + "', '" + clientId + "', null, 'nodeUnselected:' + treeDataMapper(data));" + // @all
+ " BsF.ajax.callAjax(this, event, '" + updateItems + "', '" + clientId + "', null, null, null, 'nodeUnselected:' + treeDataMapper(data));" + // @all
" }," +
//enable nodeChecked event callback
" onNodeChecked: function(event, data) { " +
- " BsF.ajax.callAjax(this, event, '" + updateItems + "', '" + clientId + "', null, 'nodeChecked:' + treeDataMapper(data));" + // @all
+ " BsF.ajax.callAjax(this, event, '" + updateItems + "', '" + clientId + "', null, null, null, 'nodeChecked:' + treeDataMapper(data));" + // @all
" }," +
//enable nodeUnchecked event callback
" onNodeUnchecked: function(event, data) { " +
- " BsF.ajax.callAjax(this, event, '" + updateItems + "', '" + clientId + "', null, 'nodeUnchecked:' + treeDataMapper(data));" + // @all
+ " BsF.ajax.callAjax(this, event, '" + updateItems + "', '" + clientId + "', null, null, null, 'nodeUnchecked:' + treeDataMapper(data));" + // @all
" }," +
// enable nodeCollapsed event callback
" onNodeCollapsed: function(event, data) { " +
- " BsF.ajax.callAjax(this, event, '" + updateItems + "', '" + clientId + "', null, 'nodeCollapsed:' + treeDataMapper(data));" + // @all
+ " BsF.ajax.callAjax(this, event, '" + updateItems + "', '" + clientId + "', null, null, null, 'nodeCollapsed:' + treeDataMapper(data));" + // @all
" }," +
// enable nodeExpanded event callback
" onNodeExpanded: function(event, data) { " +
- " BsF.ajax.callAjax(this, event, '" + updateItems + "', '" + clientId + "', null, 'nodeExpanded:' + treeDataMapper(data));" + // @all
+ " BsF.ajax.callAjax(this, event, '" + updateItems + "', '" + clientId + "', null, null, null, 'nodeExpanded:' + treeDataMapper(data));" + // @all
" }" +
"}); ", null);
rw.writeText("});", null);
diff --git a/src/main/meta/META-INF/bootsfaces-b.taglib.xml b/src/main/meta/META-INF/bootsfaces-b.taglib.xml
index 5028f8b29..8fa924d9d 100644
--- a/src/main/meta/META-INF/bootsfaces-b.taglib.xml
+++ b/src/main/meta/META-INF/bootsfaces-b.taglib.xml
@@ -2841,7 +2841,7 @@