⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form.combobox.tag

📁 基于Jscript实现在类库,集成了现流行的ajax,重载select组件库
💻 TAG
📖 第 1 页 / 共 3 页
字号:

<%@ attribute
	name="value"
	type="java.lang.String"
	required="false"
	description="
(Mixed)A value to initialize this field with.
" %>

<%@ attribute
	name="valueField"
	type="java.lang.String"
	required="false"
	description="
(String)The underlying data value name to bind to this ComboBox (defaults to undefined if mode = 'remote' or 'value' if transforming a select) Note: use of a valueField requires the user to make a selection in order for a value to be mapped.
" %>

<%@ attribute
	name="valueNotFoundText"
	type="java.lang.String"
	required="false"
	description="
(String)When using a name/value combo, if the value passed to setValue is not found in the store, valueNotFoundText will be displayed as the field text if defined (defaults to undefined)
" %>

<%@ 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="onBeforequery"
	type="java.lang.Object"
	required="false"
	description="
( Object queryEvent )Fires before all queries are processed. Return false to cancel the query or set the queryEvent'scancel property to true.
" %>

<%@ 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="onBeforeselect"
	type="java.lang.Integer"
	required="false"
	description="
( Ext.form.ComboBox combo, Ext.data.Record record, Number index )Fires before a list item is selected. Return false to cancel the selection.
" %>

<%@ 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="onCollapse"
	type="java.lang.String"
	required="false"
	description="
( Ext.form.ComboBox combo )Fires when the dropdown list is collapsed
" %>

<%@ 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="onExpand"
	type="java.lang.String"
	required="false"
	description="
( Ext.form.ComboBox combo )Fires when the dropdown list is expanded
" %>

<%@ 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="onSelect"
	type="java.lang.Integer"
	required="false"
	description="
( Ext.form.ComboBox combo, Ext.data.Record record, Number index )Fires when a list item is selected
" %>

<%@ 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 --%>


<%-- Added params _____________________________START --%>

<%@ attribute
	name="items"
	type="java.lang.String"
	required="false"
	description="(String) Local attribute used for handling items from formOption tags"
 %>
<%-- Added params _____________________________END --%>


<%@ include file="inc/taglibs.jsp" %>
<%@ tag 
	import="org.apache.commons.beanutils.BeanUtils"
	dynamic-attributes="dynamicAttributes"
	description="A combobox control with support for autocomplete, remote-loading, paging and many other features." %>
	
	<jsp:doBody />
	
	<extutil:processTagAttributes 
		configVar="configMap" 
		eventsVar="eventsMap" 
		include="*" 
		exclude="items"
		tagJspContext="<%=jspContext %>"
		dynamicAttributes="${dynamicAttributes}" />	
	
	<%-- Process JSP body --%>
	<c:set var="item">
		    new Ext.form.ComboBox({
		  		<c:forEach items="${configMap}" var="config">
		  			${config.key}:${config.value},
		  		</c:forEach>
		  		<c:if test="<%= BeanUtils.getProperty(this,"items")!=null %>">
			  		mode:'local',
			  		displayField:'text',
			  		valueField:'value',
				    triggerAction: 'all',
			  		store:new Ext.data.SimpleStore({
						fields: ['value', 'text'],
						data: [<%= BeanUtils.getProperty(this,"items").substring(0,items.length()-1) %>]
			  		}),
			  	</c:if>
			  	<c:if test="<%= BeanUtils.getProperty(this,"store")!=null %>">
			  		store: <%= BeanUtils.getProperty(this,"store") %>,
			  	</c:if>
		  		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 + -