Class HiddenItem
- All Implemented Interfaces:
Focusable<HiddenItem>
Hidden item
A hidden item is a special form item, that does not appear for the user, thus the user cannot modify it, but it is placed on the form. Hidden items are used if the form is sent in a POST request to an external servlet or there is a servlet in the application which is able to receive data this way. The value of the hidden item can be set through code.
If the form is saved to the database with the framework, the use of the hidden item is redundant.
The component supports no events.
- Since:
- 4.0
- Author:
- JBStrap
-
Field Summary
Fields inherited from class com.jbstrap.ui.components.form.FormItem
appends, clearButton, column, defaultState, defaultValue, description, formItemSize, helpIcon, label, labelPosition, labelSizes, modified, originalValue, params, prepends, required, showLabel, state, tabIndex, value, visible
Fields inherited from class com.jbstrap.ui.Component
animation, attributes, backgroundColor, borderColor, color, defaultHotKeyHandler, handlers, hotKeys, styleClasses, textAlign, toolTip, toolTipPosition
-
Constructor Summary
ConstructorDescriptionHiddenItem
(DataDescriptorColumn column) Creates a hidden item, based on the specified DataDescriptor column.HiddenItem
(DataDescriptorColumn column, String value) Creates a hidden item, based on the specified DataDescriptor column, with the specified valueHiddenItem
(String name) Creates an empty hidden item, with the specified name.HiddenItem
(String name, String value) Creates a hidden item, with the specified name and value. -
Method Summary
Modifier and TypeMethodDescriptionvoid
drawEditor
(StringWriter writer) Draws the editor component.setDefaultValue
(Object defaultValue) Sets the default value of the itemsetVisible
(boolean visible) This method does nothing, since the item is not visible on the interfaceMethods inherited from class com.jbstrap.ui.components.form.FormItem
_addComponent, _setReverseShow, _setState, addComponent, addRecalcOnChangeColumn, addRecalcOnChangeColumns, addRecalcOnChangeColumns, addValueChangeHandler, afterDraw, clearValue, convertValueToJavaScript, convertValueToJavaScript, drawComponent, enableClearButton, eraseValue, getCalculateValue, getColumn, getComponents, getDataType, getDefaultState, getDescription, getFormItemSize, getLabel, getLabelPosition, getLabelSize, getLabelSize, getName, getOriginalValue, getParam, getParamAsBoolean, getParamAsDate, getParamAsDate, getParamAsDouble, getParamAsInteger, getParamAsLong, getParamAsNumber, getParamAsString, getRecalcOnChangeColumnsList, getState, getTabIndex, getValue, getValueAsBoolean, getValueAsDate, getValueAsDouble, getValueAsFloat, getValueAsInteger, getValueAsLong, getValueAsString, init, isAssignable, isAutoCalculate, isModified, isReadOnly, isRequired, isReverseShow, isShowLabel, isVisible, onFormItemValueChanged, onHotKeyEventHandler, onShow, redraw, removeParam, resetState, runAfterDrawOnAddon, runOnHideOnAddon, runOnShowOnAddon, setCalculateValue, setDataType, setDataType, setDescription, setEnabled, setFocus, setFormItemSize, setLabel, setLabelPosition, setLabelSize, setLabelSize, setMargin, setModified, setObjectValue, setOriginalObjectValue, setOriginalValue, setPadding, setParam, setParams, setReadOnly, setRequired, setShowLabel, setState, setTabIndex, setValue, triggerFormChange, writeHTML
Methods inherited from class com.jbstrap.ui.Component
_hide, _setAttribute, addAllowedRole, addComponent, addComponents, addDeniedRole, addHandler, addStyle, addStyleClass, addStyleClasses, clearfix, closeTag, combinateAccess, containsStyle, containsStyleClass, draw, drawSubComponents, error, flattendComponentTree, getAccess, getAccessMode, getAllowedRoles, getAttribute, getAttributes, getBackgroundColor, getBorderColor, getClient, getComponentById, getComponents, getComponentsByClass, getData, getDeniedRoles, getHandlers, getId, getLanguageCode, getParent, getParent, getRegisteredEvents, getStyle, getStyleClasses, getTextAlign, getTextColor, getToolTip, getToolTipPosition, getTypeName, getUI, insertComponentAfter, insertComponentBefore, isAccess, isDrawn, isEnabled, isEventBubbling, onHide, openTag, removeAllComponents, removeAllowedRole, removeAllStyleClasses, removeAttribute, removeComponent, removeComponent, removeComponents, removeDeniedRole, removeHandler, removeStyle, removeStyle, removeStyleClass, removeStyleClasses, replaceComponent, replaceStyleClass, runAfterDraw, runJavaScript, runJavaScript, runJavaScript, runOnHide, runOnShow, say, setAttribute, setBackgroundColor, setBorder, setBorderColor, setData, setDisplayType, setEventBubbling, setFlex, setFloating, setHeight100, setHeight25, setHeight50, setHeight75, setHeightAuto, setLanguage, setName, setOverflow, setParent, setScrollable, setSelectionType, setShadow, setStyle, setTextAlign, setTextColor, setToolTip, setToolTipPosition, setWidth100, setWidth25, setWidth50, setWidth75, setWidthAuto, showNotification, showNotification, showProcessIndicator, toggleStyleClass
Methods inherited from class com.jbstrap.core.messagebus.MessageBus
closeMessageBus, messageBusOpened, openMessageBus, renewSubscription, sendMessageToMessageBus, subscribeMessageBus, unsubscribeAllListeners, unsubscribeMessageBus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.jbstrap.ui.Focusable
addFocusHandler, addFocusInHandler, addFocusOutHandler, addLosesFocusHandler
-
Constructor Details
-
HiddenItem
Creates an empty hidden item, with the specified name.- Parameters:
name
- The name of the field- Throws:
NullPointerException
- If the name isnull
-
HiddenItem
Creates a hidden item, with the specified name and value.- Parameters:
name
- The name of the fieldvalue
- The value of the item- Throws:
NullPointerException
- If the name isnull
-
HiddenItem
Creates a hidden item, based on the specified DataDescriptor column.- Parameters:
column
- The DataDescriptor column, that will be used for the operation- Throws:
NullPointerException
- If the column isnull
-
HiddenItem
Creates a hidden item, based on the specified DataDescriptor column, with the specified value- Parameters:
column
- The DataDescriptor column, that will be used for the operationvalue
- The hidden item value- Throws:
NullPointerException
- If the column isnull
-
-
Method Details
-
drawEditor
Description copied from class:FormItem
Draws the editor component.
You do not need to use this method during development, but all components extending the form item must implement it. Use the method to generate the input field’s HTML code. This code is then inserted into the corresponding DOM code when drawing the form item.
- Specified by:
drawEditor
in classFormItem<String,
HiddenItem> - Parameters:
writer
- The HTML string writer class instance; write here the HTML code for the input field
-
setDefaultValue
Sets the default value of the item- Specified by:
setDefaultValue
in classFormItem<String,
HiddenItem> - Parameters:
defaultValue
- The default value- Returns:
- The hidden item component
-
setVisible
This method does nothing, since the item is not visible on the interface- Overrides:
setVisible
in classFormItem<String,
HiddenItem> - Parameters:
visible
- Iftrue
is set, the form element is displayed; if code>false is created, but not visible to the user- Returns:
- The hidden item component
-