<PUBLIC:METHOD NAME="select"/><!--全选。由于参照编辑框由INPUT、IMG组成,所以需要改写(重载)select方法--> <PUBLIC:METHOD NAME="focus"><!--置焦点。由于参照编辑框由INPUT、IMG组成,所以需要改写(重载)focus方法--> <PUBLIC:PROPERTY NAME="input" GET="getInput"/> <PUBLIC:PROPERTY NAME="value" GET="getValue" PUT="setValue"/> <PUBLIC:METHOD NAME="cellDataCheck"/> </PUBLIC:COMPONENT> <script language="javascript"> var id = null;
//参照一般有两个值,一个是显示的Text,一个是id。idColumn指明id的Grid列 var idColumn = null;
var refUrl = null; var refIdColumn = null; var refNameColumn = null;
var extendedProp = element.extendedProperties; if(extendedProp!= null && typeof(extendedProp) != "undefined") { var dom = new ActiveXObject("MSXML.DOMDocument"); dom.loadXML(extendedProp);
var btn = element.getElementsByTagName("IMG")[0]; btn.onclick = btnClick; function btnClick() { var ret = window.showModalDialog(refUrl,self,'scrolling:no;resizable:no;status:no;dialogWidth:550px;dialogHeight:450px;center:1');
if(ret != null) { var el = ret.documentElement.firstChild; if(el != null) { input.value = el.getAttribute(refNameColumn);