📄 grid.editorgridpanel.tag
字号:
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="onBodyresize"
type="java.lang.Integer"
required="false"
description="
( Ext.Panel p, Number width, Number height )Fires after the Panel has been resized.
" %>
<%@ attribute
name="onBodyscroll"
type="java.lang.Integer"
required="false"
description="
( Number scrollLeft, Number scrollTop )Fires when the body element is scrolled
" %>
<%@ attribute
name="onCellclick"
type="java.lang.Object"
required="false"
description="
( Grid this, Number rowIndex, Number columnIndex, Ext.EventObject e )Fires when a cell is clicked.The data for the cell is drawn from the Recordfor this row. To access the data in the listener function use thefollowing technique:
function(grid, rowIndex, columnIndex, e) {var record = grid.getStore().getAt(rowIndex);// Get the Recordvar fieldName = grid.getColumnModel().getDataIndex(columnIndex); // Get field namevar data = record.get(fieldName);}
" %>
<%@ attribute
name="onCellcontextmenu"
type="java.lang.Object"
required="false"
description="
( Grid this, Number rowIndex, Number cellIndex, Ext.EventObject e )Fires when a cell is right clicked
" %>
<%@ attribute
name="onCelldblclick"
type="java.lang.Object"
required="false"
description="
( Grid this, Number rowIndex, Number columnIndex, Ext.EventObject e )Fires when a cell is double clicked
" %>
<%@ attribute
name="onCellmousedown"
type="java.lang.Object"
required="false"
description="
( Grid this, Number rowIndex, Number columnIndex, Ext.EventObject e )Fires before a cell is clicked
" %>
<%@ attribute
name="onClick"
type="java.lang.Object"
required="false"
description="
( Ext.EventObject e )The raw click event for the entire grid.
" %>
<%@ attribute
name="onClose"
type="java.lang.String"
required="false"
description="
( Ext.Panel p )Fires after the Panel is closed.Note that Panels do not directly support being closed, but somePanel subclasses do (like Ext.Window).
" %>
<%@ attribute
name="onCollapse"
type="java.lang.String"
required="false"
description="
( Ext.Panel p )Fires after the Panel has been collapsed.
" %>
<%@ attribute
name="onColumnmove"
type="java.lang.Integer"
required="false"
description="
( Number oldIndex, Number newIndex )Fires when the user moves a column
" %>
<%@ attribute
name="onColumnresize"
type="java.lang.Integer"
required="false"
description="
( Number columnIndex, Number newSize )Fires when the user resizes a column
" %>
<%@ attribute
name="onContextmenu"
type="java.lang.Object"
required="false"
description="
( Ext.EventObject e )The raw contextmenu event for the entire grid.
" %>
<%@ attribute
name="onDblclick"
type="java.lang.Object"
required="false"
description="
( Ext.EventObject e )The raw dblclick event for the entire grid.
" %>
<%@ attribute
name="onDeactivate"
type="java.lang.String"
required="false"
description="
( Ext.Panel p )Fires after the Panel has been visually deactivated.Note that Panels do not directly support being deactivated, but some Panel subclassesdo (like Ext.Window). Panels which are child Components of a TabPanel fire theactivate and deactivate events under the control of the TabPanel.
" %>
<%@ 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.Panel p )Fires after the Panel has been expanded.
" %>
<%@ attribute
name="onHeaderclick"
type="java.lang.Object"
required="false"
description="
( Grid this, Number columnIndex, Ext.EventObject e )Fires when a header is clicked
" %>
<%@ attribute
name="onHeadercontextmenu"
type="java.lang.Object"
required="false"
description="
( Grid this, Number columnIndex, Ext.EventObject e )Fires when a header is right clicked
" %>
<%@ attribute
name="onHeaderdblclick"
type="java.lang.Object"
required="false"
description="
( Grid this, Number columnIndex, Ext.EventObject e )Fires when a header cell is double clicked
" %>
<%@ attribute
name="onHeadermousedown"
type="java.lang.Object"
required="false"
description="
( Grid this, Number columnIndex, Ext.EventObject e )Fires before a header is clicked
" %>
<%@ attribute
name="onHide"
type="java.lang.String"
required="false"
description="
( Ext.Component this )Fires after the component is hidden.
" %>
<%@ attribute
name="onKeydown"
type="java.lang.Object"
required="false"
description="
( Ext.EventObject e )The raw keydown event for the entire grid.
" %>
<%@ attribute
name="onKeypress"
type="java.lang.Object"
required="false"
description="
( Ext.EventObject e )The raw keypress event for the entire grid.
" %>
<%@ attribute
name="onMousedown"
type="java.lang.Object"
required="false"
description="
( Ext.EventObject e )The raw mousedown event for the entire grid.
" %>
<%@ attribute
name="onMouseout"
type="java.lang.Object"
required="false"
description="
( Ext.EventObject e )The raw mouseout event for the entire grid.
" %>
<%@ attribute
name="onMouseover"
type="java.lang.Object"
required="false"
description="
( Ext.EventObject e )The raw mouseover event for the entire grid.
" %>
<%@ attribute
name="onMouseup"
type="java.lang.Object"
required="false"
description="
( Ext.EventObject e )The raw mouseup event for the entire grid.
" %>
<%@ 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="onRemove"
type="java.lang.String"
required="false"
description="
( Ext.Container this, Ext.Component component )Fires after any Ext.Component is removed from the container.
" %>
<%@ 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="onRowclick"
type="java.lang.Object"
required="false"
description="
( Grid this, Number rowIndex, Ext.EventObject e )Fires when a row is clicked
" %>
<%@ attribute
name="onRowcontextmenu"
type="java.lang.Object"
required="false"
description="
( Grid this, Number rowIndex, Ext.EventObject e )Fires when a row is right clicked
" %>
<%@ attribute
name="onRowdblclick"
type="java.lang.Object"
required="false"
description="
( Grid this, Number rowIndex, Ext.EventObject e )Fires when a row is double clicked
" %>
<%@ attribute
name="onRowmousedown"
type="java.lang.Object"
required="false"
description="
( Grid this, Number rowIndex, Ext.EventObject e )Fires before a row is clicked
" %>
<%@ attribute
name="onShow"
type="java.lang.String"
required="false"
description="
( Ext.Component this )Fires after the component is shown.
" %>
<%@ attribute
name="onSortchange"
type="java.lang.Object"
required="false"
description="
( Grid this, Object sortInfo )Fires when the grid's store sort changes
" %>
<%@ 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="onTitlechange"
type="java.lang.String"
required="false"
description="
( Ext.Panel p, String The )Fires after the Panel title has been set or changed.
" %>
<%@ attribute
name="onValidateedit"
type="java.lang.Object"
required="false"
description="
( Object e )Fires after a cell is edited, but before the value is set in the record. Return falseto cancel the change. The edit event object has the following properties
* grid - This grid
* record - The record being edited
* field - The field name being edited
* value - The value being set
* originalValue - The original value for the field, before the edit.
* row - The grid row index
* column - The grid column index
* cancel - Set this to true to cancel the edit or return false from your handler.
" %>
<%-- Events _____________________________END --%>
<%-- Added attriutes _________________START --%>
<%@ attribute
name="fields"
type="java.lang.String"
required="false"
description="(String) Fields definition, generated automatically."
%>
<%@ attribute
name="data"
type="java.lang.String"
required="false"
description="(String) generated automatically"
%>
<%-- Added attriutes _________________END --%>
<%@ include file="inc/taglibs.jsp" %>
<%@ tag
import="org.apache.commons.beanutils.BeanUtils"
dynamic-attributes="dynamicAttributes"
description="Class for creating and editable grid. " %>
<extutil:processTagAttributes
configVar="configMap"
eventsVar="eventsMap"
include="*"
exclude="items"
tagJspContext="<%=jspContext %>"
dynamicAttributes="${dynamicAttributes}" />
<jsp:doBody />
<%-- Process JSP body --%>
<c:set var="item">
new Ext.grid.EditorGridPanel({
<c:forEach items="${configMap}" var="config">
${config.key}:${config.value},
</c:forEach>
<% String data = BeanUtils.getProperty(this,"data"); %>
<% String fields = BeanUtils.getProperty(this,"fields"); %>
<c:if test="<%= data!=null %>">
store:new Ext.data.SimpleStore({
fields: [<%= fields %>],
data: [<%= data.substring(0,data.length()-1) %>]
}),
</c:if>
cm:new Ext.grid.ColumnModel([
<%= BeanUtils.getProperty(this,"colModel") %>
]),
<c:if test="<%= BeanUtils.getProperty(this,"tbar")!=null %>">
tbar:[
<%
String tbar = BeanUtils.getProperty(this,"tbar");
jspContext.getOut().write(tbar.substring(0,tbar.length()-1));
%>
],
</c:if>
<c:if test="<%= BeanUtils.getProperty(this,"sm")!=null %>">
sm:<%=BeanUtils.getProperty(this,"sm") %>,
</c:if>
<c:if test="<%= BeanUtils.getProperty(this,"bbar")!=null %>">
bbar:[
<%
String bbar = BeanUtils.getProperty(this,"bbar");
jspContext.getOut().write(bbar.substring(0,bbar.length()-1));
%>
],
</c:if>
<c:if test="<%= BeanUtils.getProperty(this,"buttons")!=null %>">
buttons:[
<%
String buttons = BeanUtils.getProperty(this,"buttons");
jspContext.getOut().write(buttons.substring(0,buttons.length()-1));
%>
],
</c:if>
<c:if test="<%= BeanUtils.getProperty(this,"tools")!=null %>">
tools:[
<%
String tools = BeanUtils.getProperty(this,"tools");
jspContext.getOut().write(tools.substring(0,tools.length()-1));
%>
],
</c:if>
<c:if test="<%= BeanUtils.getProperty(this,"viewConfig")!=null %>">
viewConfig:<%= BeanUtils.getProperty(this,"viewConfig") %>,
</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 + -