attachmentSimple点图标调用自己的js方法

平台默认的attachmentSimple组件点图标调用的是$model.previewOrRemoveItem.bind($model)打开附件查看 如果要调用自己当前.w对应的js中的方法,可以如下修改 $model.getModel().preview.bind($model.getModel(),$model,$object) 其中preview是js中的函数名,$model,$object是传的参数 默认的附件删除的时候也是找的这个方法,所以在自己定义的时候要判断一下是否执行的函数 js文件中定义如下: Model.prototype.preview = function(owner,event) { var state = owner.$state.get(); var realFileName = event.realFileName.get(); var storeFileName = event.storeFileName.get(); var ownerID = owner.getOwnerID(); var operateType = 'browse'; var url = '$UI/system/service/doc/common/simpleFileStore.j?realFileName=' [...]

如何设置grid表头固定

grid中的数据多时会出现滚动条,再滑动滚动条时不同的布局导致表头也会滑动,可以用下面的方式设置表头固定,只是数据滑动 方案一:设置grid的高度为固定高度 方案二:使用容器布局,设置grid height=100%,使grid充满容器 如把grid放到panel组件的content中或者放一个div,把grid放到div中

js中如何调用标准的queryAction

标准的queryAction一般情况下是设置bizData的reader属性用的,如果需要自己js调用,需要注意参数的赋值,如下: var param = new biz.Request.ActionParam(); param.setInteger("limit", -1); param.setInteger("offset",0) biz.Request.sendBizRequest({ "context" : this.getContext(), "action" : "queryAP_RQAction", "parameters" : param, "callback" : function(callbackData) { if (callbackData.state) { alert("执行成功"); } else alert("执行失败"); } }); [...]

如何修改默认语言

平台是支持国际化设置的,那么就需要在登录的时候有语言的设置,如果没有设置默认是用的中文,如果需要修改默认的语言,参考如下: \runtime\UIServer\WEB-INF\web.xml文件中有如下配置 <context-param> <param-name>mobile.login.path</param-name> <param-value>/UI2/portal/mobile/index.w?device=m</param-value> </context-param> <context-param> <param-name>pc.login.path</param-name> <param-value>/UI2/portal/pc3/index.w?device=pc</param-value> </context-param> <context-param> <param-name>pad.login.path</param-name> <param-value>/UI2/portal/pc3/index.w?device=pc</param-value> </context-param> 可以在相关的param-value配置项的url上加上语言参数,如下: <context-param> <param-name>pc.login.path</param-name> <param-value>/UI2/portal/pc3/index.w?device=pc&amp;language=en_US</param-value> </context-param>

如何修改pc端默认门户

V3.6版本中PC端平台提供的3套默认分配是pc、pc2、pc3在/UI2/portal下就可以看到 默认的输入ip和端口后跳转的是pc3门户的index页,如果修改修改默认的门户页可以在runtime\UIServer\WEB-INF\web.xml中修改配置 <context-param> <param-name>pc.login.path</param-name> <param-value>/UI2/portal/pc3/index.w?device=pc</param-value> </context-param> 修改param-value的配置路径即可,如下把pc3改为pc: <param-value>/UI2/portal/pc/index.w?device=pc</param-value>

orgDialog如何过滤数据

orgDialogPC可以通过给data设置filter进行数据过滤,但是orgDialog不能通过设置data的filter过滤数据 因为orgDialog的数据是缓存到前端的,如果要对orgDialog过滤数据可以设置showFilter属性 如下:   或者在调用open方法打开的设置设置showFilter,如下: this.comp("orgDialog1").open({"showFilter":"$row.val('sCode')== '001' || $row.val('sCode')=='JUSTEP'"});

grid中设置单元格的焦点

grid中给单元格设置焦点可以调用grid的editCell (TD cell) 单元格进入编辑状态,受列上定义的editable属性和data的readonly规则影响 具体实现如下: Model.prototype.button10Click = function(event) { var data = this.comp("bizData1"); var rowID = data.getCurrentRowID(); var grid = this.comp("grid1"); setTimeout(function() { grid.editCell(grid.getCell(rowID, "fSZ")); }, 5); };

如何在线查看自己的office文件

平台默认的附件查看功能只能查看附件上传的,如果不是附件上传,自己从第三方传过来的地址或者自己服务端的office就不能用附件,可以参考下面的方式实现用ocx打开查看 1.js定义的define中引用 var officeViewer = require('$UI/system/components/justep/docCommon/officeViewer'); var $OV = officeViewer.$OV; var OV = officeViewer.OV; 2.在.w中定义一个div <div xid="officeViewer" /> 3.在div中创建ocx并打开文件 var url ="http://192.168.1.97:8080/x5/UI2/appdemo/test/process/attachmentEditor2/aaa.doc"; var divID = this.getIDByXID("officeViewer"); var ocxID = divID [...]

pc3打开功能时默认隐藏功能树

BeX5中的功能树默认都是现实的,如果需要在从功能树上打开功能时隐藏功能数据,可以在创建功能树的代码中控制 /UI2/portal/pc3/index.js文件Model.prototype.doCreateFunctionTree = function(event){方法的实现中找到 me.showPage(pageKey);在其下面调用$(".sidebar-toggle").click();即可实现从功能树中打开功能隐藏功能 具体修改如下: //设置main的显示名 $content.find('li>.x-portal-showMain>.title').html(this._cfg.main.title); var me = this; $('li>a', $content).click(function(){ var el = $(this),pageKey=el.attr('pageKey'); if(pageKey){ $(".func-open", $content).removeClass("func-open"); el.parent().addClass("func-open"); me.showPage(pageKey); $(".sidebar-toggle").click(); } });