📄 form.numberfield.tag
字号:
<%@ attribute
name="msgTarget"
type="java.lang.String"
required="false"
description="
(String)The location where error text should display. Should be one of the following values (defaults to 'qtip'):
Value Description----------- ----------------------------------------------------------------------qtipDisplay a quick tip when the user hovers over the fieldtitle Display a default browser title attribute popupunder Add a block div beneath the field containing the error textsideAdd an error icon to the right of the field with a popup on hover[element id]Add the error text directly to the innerHTML of the specified element
" %>
<%@ attribute
name="name"
type="java.lang.String"
required="false"
description="
(String)The field's HTML name attribute.
" %>
<%@ attribute
name="nanText"
type="java.lang.String"
required="false"
description="
(String)Error text to display if the value is not a valid number. For example, this can happen if a valid character like '.' or '-' is left in the field with no number (defaults to '{value} is not a valid number')
" %>
<%@ attribute
name="plugins"
type="java.lang.Object"
required="false"
description="
(Object/Array)An object or array of objects that will provide custom functionality for this component. The only requirement for a valid plugin is that it contain an init method that accepts a reference of type Ext.Component. When a component is created, if any plugins are available, the component will call the init method on each plugin, passing a reference to itself. Each plugin can then call methods or respond to events on the component as needed to provide its functionality.
" %>
<%@ attribute
name="readOnly"
type="java.lang.Boolean"
required="false"
description="
(Boolean)True to mark the field as readOnly in HTML (defaults to false) -- Note: this only sets the element's readOnly DOM attribute.
" %>
<%@ attribute
name="regex"
type="java.lang.String"
required="false"
description="
(RegExp)A JavaScript RegExp object to be tested against the field value during validation (defaults to null). If available, this regex will be evaluated only after the basic validators all return true, and will be passed the current field value. If the test fails, the field will be marked invalid using regexText.
" %>
<%@ attribute
name="regexText"
type="java.lang.String"
required="false"
description="
(String)The error text to display if regex is used and the test fails during validation (defaults to '')
" %>
<%@ attribute
name="renderTo"
type="java.lang.String"
required="false"
description="
(Mixed)The id of the node, a DOM node or an existing Element that will be the container to render this component into. Using this config, a call to render() is not required.
" %>
<%@ attribute
name="selectOnFocus"
type="java.lang.Boolean"
required="false"
description="
(Boolean)True to automatically select any existing field text when the field receives input focus (defaults to false)
" %>
<%@ attribute
name="stateEvents"
type="java.lang.String"
required="false"
description="
(Array)An array of events that, when fired, should trigger this component to save its state (defaults to none). These can be any types of events supported by this component, including browser or custom events (e.g., ['click', 'customerchange']).
" %>
<%@ attribute
name="stateId"
type="java.lang.String"
required="false"
description="
(String)The unique id for this component to use for state management purposes (defaults to the component id).
" %>
<%@ attribute
name="style"
type="java.lang.String"
required="false"
description="
(String)A custom style specification to be applied to this component's Element. Should be a valid argument to Ext.Element.applyStyles.
" %>
<%@ attribute
name="tabIndex"
type="java.lang.Integer"
required="false"
description="
(Number)The tabIndex for this field. Note this only applies to fields that are rendered, not those which are built via applyTo (defaults to undefined).
" %>
<%@ attribute
name="validateOnBlur"
type="java.lang.Boolean"
required="false"
description="
(Boolean)Whether the field should validate when it loses focus (defaults to true).
" %>
<%@ attribute
name="validationDelay"
type="java.lang.Integer"
required="false"
description="
(Number)The length of time in milliseconds after user input begins until validation is initiated (defaults to 250)
" %>
<%@ attribute
name="validationEvent"
type="java.lang.String"
required="false"
description="
(String/Boolean)The event that should initiate field validation. Set to false to disable automatic validation (defaults to 'keyup').
" %>
<%@ attribute
name="validator"
type="java.lang.String"
required="false"
description="
(Function)A custom validation function to be called during field validation (defaults to null). If available, this function will be called only after the basic validators all return true, and will be passed the current field value and expected to return boolean true if the value is valid or a string error message if invalid.
" %>
<%@ attribute
name="value"
type="java.lang.String"
required="false"
description="
(Mixed)A value to initialize this field with.
" %>
<%@ attribute
name="vtype"
type="java.lang.String"
required="false"
description="
(String)A validation type name as defined in Ext.form.VTypes (defaults to null)
" %>
<%@ attribute
name="vtypeText"
type="java.lang.String"
required="false"
description="
(String)A custom error message to display in place of the default message provided for the vtype currently set for this field (defaults to ''). Only applies if vtype is set, else ignored.
" %>
<%@ attribute
name="width"
type="java.lang.Integer"
required="false"
description="
(Number)The width of this component in pixels (defaults to auto).
" %>
<%@ attribute
name="xtype"
type="java.lang.String"
required="false"
description="
(String)The registered xtype to create. This config option is not used when passing a config object into a constructor. This config option is used only when lazy instantiation is being used, and a child item of a Container is being specified not as a fully instantiated Component, but as a Component config object. The xtype will be looked up at render time up to determine what type of child Component to create.
The predefined xtypes are listed here.
If you subclass Components to create your own Components, you may register them using Ext.ComponentMgr.registerType in order to be able to take advantage of lazy instantiation and rendering.
" %>
<%-- Config params _____________________________END --%>
<%-- Events _____________________________START --%>
<%@ attribute
name="onAutosize"
type="java.lang.Integer"
required="false"
description="
( Ext.form.Field this, Number width )Fires when the autosize function is triggered.The field may or may not have actually changed sizeaccording to the default logic, but this event provides a hook for the developer to apply additionallogic at runtime to resize the field if needed.
" %>
<%@ attribute
name="onBeforedestroy"
type="java.lang.String"
required="false"
description="
( Ext.Component this )Fires before the component is destroyed. Return false to stop the destroy.
" %>
<%@ attribute
name="onBeforehide"
type="java.lang.String"
required="false"
description="
( Ext.Component this )Fires before the component is hidden. Return false to stop the hide.
" %>
<%@ attribute
name="onBeforerender"
type="java.lang.String"
required="false"
description="
( Ext.Component this )Fires before the component is rendered. Return false to stop the render.
" %>
<%@ attribute
name="onBeforeshow"
type="java.lang.String"
required="false"
description="
( Ext.Component this )Fires before the component is shown. Return false to stop the show.
" %>
<%@ attribute
name="onBeforestaterestore"
type="java.lang.Object"
required="false"
description="
( Ext.Component this, Object state )Fires before the state of the component is restored. Return false to stop the restore.
" %>
<%@ attribute
name="onBeforestatesave"
type="java.lang.Object"
required="false"
description="
( Ext.Component this, Object state )Fires before the state of the component is saved to the configured state provider. Return false to stop the save.
" %>
<%@ attribute
name="onBlur"
type="java.lang.String"
required="false"
description="
( Ext.form.Field this )Fires when this field loses input focus.
" %>
<%@ attribute
name="onChange"
type="java.lang.String"
required="false"
description="
( Ext.form.Field this, Mixed newValue, Mixed oldValue )Fires just before the field blurs if the field value has changed.
" %>
<%@ attribute
name="onDestroy"
type="java.lang.String"
required="false"
description="
( Ext.Component this )Fires after the component is destroyed.
" %>
<%@ attribute
name="onDisable"
type="java.lang.String"
required="false"
description="
( Ext.Component this )Fires after the component is disabled.
" %>
<%@ attribute
name="onEnable"
type="java.lang.String"
required="false"
description="
( Ext.Component this )Fires after the component is enabled.
" %>
<%@ attribute
name="onFocus"
type="java.lang.String"
required="false"
description="
( Ext.form.Field this )Fires when this field receives input focus.
" %>
<%@ attribute
name="onHide"
type="java.lang.String"
required="false"
description="
( Ext.Component this )Fires after the component is hidden.
" %>
<%@ attribute
name="onInvalid"
type="java.lang.String"
required="false"
description="
( Ext.form.Field this, String msg )Fires after the field has been marked as invalid.
" %>
<%@ attribute
name="onMove"
type="java.lang.Integer"
required="false"
description="
( Ext.Component this, Number x, Number y )Fires after the component is moved.
" %>
<%@ attribute
name="onRender"
type="java.lang.String"
required="false"
description="
( Ext.Component this )Fires after the component is rendered.
" %>
<%@ attribute
name="onResize"
type="java.lang.Integer"
required="false"
description="
( Ext.Component this, Number adjWidth, Number adjHeight, Number rawWidth, Number rawHeight )Fires after the component is resized.
" %>
<%@ attribute
name="onShow"
type="java.lang.String"
required="false"
description="
( Ext.Component this )Fires after the component is shown.
" %>
<%@ attribute
name="onSpecialkey"
type="java.lang.Object"
required="false"
description="
( Ext.form.Field this, Ext.EventObject e )Fires when any key related to navigation (arrows, tab, enter, esc, etc.) is pressed.You can checkExt.EventObject.getKey to determine which key was pressed.
" %>
<%@ attribute
name="onStaterestore"
type="java.lang.Object"
required="false"
description="
( Ext.Component this, Object state )Fires after the state of the component is restored.
" %>
<%@ attribute
name="onStatesave"
type="java.lang.Object"
required="false"
description="
( Ext.Component this, Object state )Fires after the state of the component is saved to the configured state provider.
" %>
<%@ attribute
name="onValid"
type="java.lang.String"
required="false"
description="
( Ext.form.Field this )Fires after the field has been validated with no errors.
" %>
<%-- Events _____________________________END --%>
<%@ include file="inc/taglibs.jsp" %>
<%@ tag
import="org.apache.commons.beanutils.BeanUtils"
dynamic-attributes="dynamicAttributes"
description="Numeric text field that provides automatic keystroke filtering and numeric validation." %>
<c:if test="${empty(value)}">
<jsp:doBody var="value" scope="page" />
</c:if>
<extutil:processTagAttributes
configVar="configMap"
eventsVar="eventsMap"
include="*"
exclude="items"
tagJspContext="<%=jspContext %>"
dynamicAttributes="${dynamicAttributes}" />
<%-- Process JSP body --%>
<c:set var="item">
new Ext.form.NumberField({
<c:forEach items="${configMap}" var="config">
${config.key}:${config.value},
</c:forEach>
listeners:{
<c:forEach items="${eventsMap}" var="event" varStatus="status">
<c:if test="${fn:indexOf(event.value,'function(')==-1}">
${event.key}:function(){${event.value}}
</c:if>
<c:if test="${fn:indexOf(event.value,'function(')>-1}">
${event.key}:${event.value}
</c:if>
${status.last?'':','}
</c:forEach>
}
}),
</c:set>
<extutil:setParentProperties
tag="<%=this%>"
items="${item}" />
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -