起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2122|回复: 13

[结贴] 重写standardProcessQueryBar组件问题

[复制链接]

46

主题

189

帖子

1218

积分

金牌会员

Rank: 6Rank: 6

积分
1218
QQ
发表于 2014-7-9 17:24:09 | 显示全部楼层 |阅读模式
本帖最后由 lxl8611 于 2014-7-9 17:25 编辑

我重写了standardProcessQueryBar这个组件,加了几个属性,界面上也都有体现,可是不知道为什么,属性设置完保存后再重新开,这几个属性值又没了。。
1.png

代码:
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <elements>
  3.         <element name="standardProcessQueryBar2" tag-name="bar" icon="Control_ToolBar.gif"
  4.                 text="标准流程查询工具栏2"
  5.                 namespace="xui" namespace-uri="http://www.justep.com/xui"
  6.                 binding-component="/UI/appCommon/components/standardProcessQueryBar2.xbl.xml#standardProcessQueryBar2"
  7.             parent-range="toolbars"
  8.                 display-property="id"
  9.                 component-class="StandardProcessQueryBar"
  10.                 component-type="layoutContainer" design-view="web-designer">
  11.                 <properties>
  12.                         <property name="id" text="编号" required="true" />
  13.                         <property name="data" text="绑定数据"  required="true" is-id-ref="true" editor-ref="contextComponent" editor-parameter="data" />
  14.                        
  15.                         <property name="biz-state-relation" text="业务状态关系"  required="true" default-value="fBizState" editor-ref="relationDlg" editor-parameter="data"/>
  16.                        
  17.                         <property name="date-filter-mode" text="日期过滤模式" editor-ref="filterDateModeList" default-value="single" required="true"/>
  18.                         <property name="date-relation1" text="日期关系1" required="true" default-value="fCreateTime" editor-ref="relationDlg" editor-parameter="data"/>
  19.                         <property name="date-relation2" text="日期关系2" editor-ref="relationDlg" editor-parameter="data" />
  20.                        
  21.                         <property name="person-id-relation" text="人员标识关系" required="true" default-value="fCreatePsnID" editor-ref="relationDlg" editor-parameter="data"/>
  22.                         <property name="org-url-relation" text="组织路径关系" required="true" default-value="fCreatePsnFID" editor-ref="relationDlg" editor-parameter="data"/>
  23.                         <group name="master" text="主从选项">
  24.                                 <property name="data2" text="绑定数据2"   editor-ref="contextComponent" editor-parameter="data" />
  25.                                 <property name="fRelations2" text="主从关联字段"   default-value="fRelationID" editor-ref="relationDlg" editor-parameter="data2"/>                               
  26.                                 <property name="person-id-relation2" text="人员标识关系2"  default-value="fCreatePsnID" editor-ref="relationDlg" editor-parameter="data2"/>
  27.                                 <property name="org-url-relation2" text="组织路径关系2"  default-value="fCreatePsnFID" editor-ref="relationDlg" editor-parameter="data2"/>
  28.                             <property name="strFilter2" text="从表条件扩展" required="false"/>
  29.                         </group>
  30.                        
  31.                        
  32.                         <property name="execute-concept" text="处理表概念" required="true"/>
  33.                        
  34.                         <property name="smart-relations" text="模糊过滤关系,多个用逗号分隔" required="true" editor-ref="relationsDlg" editor-parameter="data" ref-type="Relation/m" ref-context="data/d"/>
  35.                 </properties>

  36.                 <property-editors>
  37.                         <property-editor name="filterDateModeList" type="list" >
  38.                                 <static-data value="single:单日期过滤,range:日期范围过滤" />
  39.                         </property-editor>
  40.                 </property-editors>
  41.                                
  42.                 <templates>
  43.                         <template name="default">
  44.                                 <![CDATA[
  45.                                     <bar component="/UI/appCommon/components/standardProcessQueryBar2.xbl.xml#standardProcessQueryBar2"/>
  46.                                 ]]>
  47.                         </template>
  48.                 </templates>
  49.                
  50.         </element>
  51. </elements>
复制代码



39

主题

1379

帖子

2464

积分

金牌会员

Rank: 6Rank: 6

积分
2464
发表于 2014-7-10 10:02:45 | 显示全部楼层
楼主的写法中,group 节点下的属性有问题,
group节点下的属性需要加上路径。
<group name="master" text="主从选项">
                        <property name="data2" path="master/@data2"  text="绑定数据2" editor-ref="contextComponent"
                                editor-parameter="data" />
                        <property name="fRelations2" path="master/@fRelations2"  text="主从关联字段" default-value="fRelationID"
                                editor-ref="relationDlg" editor-parameter="data2" />
                        <property name="person-id-relation2" path="master/@person-id-relation2"   text="人员标识关系2"
                                default-value="fCreatePsnID" editor-ref="relationDlg"
                                editor-parameter="data2" />
                        <property name="org-url-relation2" path="master/@org-url-relation2" text="组织路径关系2"
                                default-value="fCreatePsnFID" editor-ref="relationDlg"
                                editor-parameter="data2" />
                        <property name="strFilter2" path="master/@strFilter2" text="从表条件扩展" required="false" />
</group>

如果还不生效,重启一下studio,重新加载一下控件
回复 支持 反对

使用道具 举报

46

主题

189

帖子

1218

积分

金牌会员

Rank: 6Rank: 6

积分
1218
QQ
 楼主| 发表于 2014-7-10 10:53:33 | 显示全部楼层
lixin_justep 发表于 2014-7-10 10:02
楼主的写法中,group 节点下的属性有问题,
group节点下的属性需要加上路径。

我添加了路径:
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <elements>
  3.         <element name="standardProcessQueryBar2" tag-name="bar" icon="Control_ToolBar.gif"
  4.                 text="标准流程查询工具栏2"
  5.                 namespace="xui" namespace-uri="http://www.justep.com/xui"
  6.                 binding-component="/UI/appCommon/components/standardProcessQueryBar2.xbl.xml#standardProcessQueryBar2"
  7.             parent-range="toolbars"
  8.                 display-property="id"
  9.                 component-class="StandardProcessQueryBar"
  10.                 component-type="layoutContainer" design-view="web-designer">
  11.                 <properties>
  12.                         <property name="id" text="编号" required="true" />
  13.                         <property name="data" text="绑定数据"  required="true" is-id-ref="true" editor-ref="contextComponent" editor-parameter="data" />
  14.                        
  15.                         <property name="biz-state-relation" text="业务状态关系"  required="true" default-value="fBizState" editor-ref="relationDlg" editor-parameter="data"/>
  16.                        
  17.                         <property name="date-filter-mode" text="日期过滤模式" editor-ref="filterDateModeList" default-value="single" required="true"/>
  18.                         <property name="date-relation1" text="日期关系1" required="true" default-value="fCreateTime" editor-ref="relationDlg" editor-parameter="data"/>
  19.                         <property name="date-relation2" text="日期关系2" editor-ref="relationDlg" editor-parameter="data" />
  20.                        
  21.                         <property name="person-id-relation" text="人员标识关系" required="true" default-value="fCreatePsnID" editor-ref="relationDlg" editor-parameter="data"/>
  22.                         <property name="org-url-relation" text="组织路径关系" required="true" default-value="fCreatePsnFID" editor-ref="relationDlg" editor-parameter="data"/>
  23.                         <group name="master" text="主从选项">
  24.                                 <property name="data2" path="master/@data2" text="绑定数据2" editor-ref="contextComponent" editor-parameter="data" />
  25.                                 <property name="fRelations2" path="master/@fRelations2" text="主从关联字段"   default-value="fRelationID" editor-ref="relationDlg" editor-ref="data2"/>                               
  26.                                 <property name="person-id-relation2" path="master/@person-id-relation2" text="人员标识关系2"  default-value="fCreatePsnID" editor-ref="relationDlg" editor-parameter="data2"/>
  27.                                 <property name="org-url-relation2" path="master/@org-url-relation2" text="组织路径关系2"  default-value="fCreatePsnFID" editor-ref="relationDlg" editor-parameter="data2"/>
  28.                             <property name="strFilter2" path="master/@strFilter2" text="从表条件扩展" required="false"/>
  29.                         </group>
  30.                        
  31.                        
  32.                         <property name="execute-concept" text="处理表概念" required="true"/>
  33.                        
  34.                         <property name="smart-relations" text="模糊过滤关系,多个用逗号分隔" required="true" editor-ref="relationsDlg" editor-parameter="data" ref-type="Relation/m" ref-context="data/d"/>
  35.                 </properties>

  36.                 <property-editors>
  37.                         <property-editor name="filterDateModeList" type="list" >
  38.                                 <static-data value="single:单日期过滤,range:日期范围过滤" />
  39.                         </property-editor>
  40.                 </property-editors>
  41.                                
  42.                 <templates>
  43.                         <template name="default">
  44.                                 <![CDATA[
  45.                                     <bar component="/UI/appCommon/components/standardProcessQueryBar2.xbl.xml#standardProcessQueryBar2"/>
  46.                                 ]]>
  47.                         </template>
  48.                 </templates>
  49.                
  50.         </element>
  51. </elements>
复制代码
现在data2属性可以保存,可是发现,下面的几个属性要求的是选择data2里的关系,弹出的框是空的。。。
1.png


回复 支持 反对

使用道具 举报

39

主题

1379

帖子

2464

积分

金牌会员

Rank: 6Rank: 6

积分
2464
发表于 2014-7-10 12:10:30 | 显示全部楼层
lxl8611 发表于 2014-7-10 10:53
我添加了路径:
现在data2属性可以保存,可是发现,下面的几个属性要求的是选择data2里的关系,弹出的框 ...

这里不支持楼主的这种写法,建议楼主把group去掉,通过明显的命名来体现
回复 支持 反对

使用道具 举报

46

主题

189

帖子

1218

积分

金牌会员

Rank: 6Rank: 6

积分
1218
QQ
 楼主| 发表于 2014-7-10 17:11:58 | 显示全部楼层
本帖最后由 lxl8611 于 2014-7-10 17:16 编辑
lixin_justep 发表于 2014-7-10 12:10
这里不支持楼主的这种写法,建议楼主把group去掉,通过明显的命名来体现

果然不能写在group里,现在有一个新问题,因为我在做的时候是把src设为源码路径在调试的,刚刚运行都正常,也可以取到正确的传入条件,可是现在我取消源码路径,就出现【无法解析 Utils】这个错,界面都打不开,再设回源码路径也不行,我试过把整个appCommon删掉重新添加,然后再把我做的拷进去,也是一样的报错。。
控制台信息:
  1. 2014-07-10 17:11:24 开始-WINDOW生成中间文件: /UI/OA/workTime/process/Att_Out/OutApplyQuery.w
  2. @filter:<xui:toolbar xmlns:xui="http://www.justep.com/xui"><xui:toolbar-item><xhtml:div xmlns:xhtml="http://www.w3.org/1999/xhtml" component="/UI/appCommon/components/bizStateFilter.xbl.xml#bizStateFilter" id="standardProcessQueryBar21_bizStateFilter" style="width: 80px" filter-data="dMaster" filter-relation="fBizState"/></xui:toolbar-item><xui:toolbar-separator/><xui:toolbar-item><xhtml:div xmlns:xhtml="http://www.w3.org/1999/xhtml" component="/UI/appCommon/components/extDateFilter.xbl.xml#extDateFilter" id="standardProcessQueryBar21_dateFilter" style="width: 80px" filter-data="dMaster" filter-date-mode="single" filter-date-relation1="fApplyDate"/></xui:toolbar-item><xui:toolbar-separator/><xui:toolbar-item><xhtml:div xmlns:xhtml="http://www.w3.org/1999/xhtml" component="/UI/appCommon/components/extOrgFilter2.xbl.xml#extOrgFilter2" id="standardProcessQueryBar21_orgFilter" style="width: 140px" filter-data="dMaster" person-id-relation="fApplyPsnID" org-url-relation="fApplyPreUrl" filter-data2="dDetail" fRelations2="fRelationID" person-id-relation2="fApplyPsnID" org-url-relation2="fApplyPreUrl" strFilter2="fDetailType='1'" manage-type-codes="call('appCommon.component.StandardProcessQueryBar2.getManageTypeCodes')" execute-concept="Oa_pub_execute"/></xui:toolbar-item><xui:toolbar-separator/><xui:toolbar-item><xhtml:div xmlns:xhtml="http://www.w3.org/1999/xhtml" component="/UI/appCommon/components/smartFilter.xbl.xml#smartFilter" id="standardProcessQueryBar21_smartFilter" style="width: 140px" filter-data="dMaster" filter-relations="fApplyPsnCode,fApplyPsnName"/></xui:toolbar-item></xui:toolbar>
  3. <root><xui:bar xmlns:xui="http://www.justep.com/xui" component="/UI/system/components/bar.xbl.xml#navigatorBar" id="standardProcessQueryBar21_navigator" data="dMaster"><item name="refresh-item"/><item name="filter-item"/><item name="filter-pattern-item"/><item name="separator"/><item name="custom-page-item"/></xui:bar><xui:toolbar xmlns:xui="http://www.justep.com/xui"><xui:toolbar-item><xhtml:div xmlns:xhtml="http://www.w3.org/1999/xhtml" component="/UI/appCommon/components/bizStateFilter.xbl.xml#bizStateFilter" id="standardProcessQueryBar21_bizStateFilter" style="width: 80px" filter-data="dMaster" filter-relation="fBizState"/></xui:toolbar-item><xui:toolbar-separator/><xui:toolbar-item><xhtml:div xmlns:xhtml="http://www.w3.org/1999/xhtml" component="/UI/appCommon/components/extDateFilter.xbl.xml#extDateFilter" id="standardProcessQueryBar21_dateFilter" style="width: 80px" filter-data="dMaster" filter-date-mode="single" filter-date-relation1="fApplyDate"/></xui:toolbar-item><xui:toolbar-separator/><xui:toolbar-item><xhtml:div xmlns:xhtml="http://www.w3.org/1999/xhtml" component="/UI/appCommon/components/extOrgFilter2.xbl.xml#extOrgFilter2" id="standardProcessQueryBar21_orgFilter" style="width: 140px" filter-data="dMaster" person-id-relation="fApplyPsnID" org-url-relation="fApplyPreUrl" filter-data2="dDetail" fRelations2="fRelationID" person-id-relation2="fApplyPsnID" org-url-relation2="fApplyPreUrl" strFilter2="fDetailType='1'" manage-type-codes="call('appCommon.component.StandardProcessQueryBar2.getManageTypeCodes')" execute-concept="Oa_pub_execute"/></xui:toolbar-item><xui:toolbar-separator/><xui:toolbar-item><xhtml:div xmlns:xhtml="http://www.w3.org/1999/xhtml" component="/UI/appCommon/components/smartFilter.xbl.xml#smartFilter" id="standardProcessQueryBar21_smartFilter" style="width: 140px" filter-data="dMaster" filter-relations="fApplyPsnCode,fApplyPsnName"/></xui:toolbar-item></xui:toolbar></root>
  4. 2014-7-10 17:11:27 org.apache.catalina.core.StandardWrapperValve invoke
  5. 严重: Servlet.service() for servlet main-servlet threw exception
  6. java.lang.Error: 无法解析的编译问题:
  7.         无法解析导入 appCommon
  8.         无法解析 Utils
  9.         无法解析 Utils
  10.         无法解析 Utils
  11.         无法解析 Utils
  12.         无法解析 Utils
  13.         无法解析 Utils
  14.         无法解析 Utils
  15.         无法解析 Utils
  16.         无法解析 Utils
  17.         Utils cannot be resolved to a variable
  18.         Utils cannot be resolved to a variable
  19.         Utils cannot be resolved to a variable
  20.         Utils cannot be resolved to a variable
  21.         Utils cannot be resolved to a variable
  22.         无法解析 Utils
  23.         无法解析 Utils
  24.         Utils cannot be resolved to a variable
  25.         Utils cannot be resolved to a variable
  26.         Utils cannot be resolved to a variable
  27.         Utils cannot be resolved to a variable
  28.         Utils cannot be resolved to a variable
  29.         Utils cannot be resolved to a variable

  30.         at ExtOrgFilter2.<init>(ExtOrgFilter2.java:7)
  31.         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  32.         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
  33.         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
  34.         at java.lang.reflect.Constructor.newInstance(Constructor.java:501)
  35.         at java.lang.Class.newInstance0(Class.java:350)
  36.         at java.lang.Class.newInstance(Class.java:303)
  37.         at com.justep.xbl.runtime.TemplateEngine.buildJavaTemplateClass(Unknown Source)
  38.         at com.justep.xbl.runtime.TemplateEngine.computeJavaTemplate(Unknown Source)
  39.         at com.justep.xbl.runtime.TemplateEngine.exeucte(Unknown Source)
  40.         at com.justep.xbl.runtime.XBLEngine.parserBinding(Unknown Source)
  41.         at com.justep.xbl.runtime.XBLEngine.parser(Unknown Source)
  42.         at com.justep.xbl.runtime.XBLEngine.parser(Unknown Source)
  43.         at com.justep.xbl.runtime.XBLEngine.parser(Unknown Source)
  44.         at com.justep.xbl.runtime.XBLEngine.parser(Unknown Source)
  45.         at com.justep.xbl.runtime.XBLEngine.parser(Unknown Source)
  46.         at com.justep.xbl.runtime.XBLEngine.parser(Unknown Source)
  47.         at com.justep.xbl.runtime.XBLEngine.parser(Unknown Source)
  48.         at com.justep.xbl.runtime.XBLEngine.excute(Unknown Source)
  49.         at com.justep.ui.util.UIUtils.xbl(Unknown Source)
  50.         at com.justep.ui.WindowCompiler.w2Middle(Unknown Source)
  51.         at com.justep.ui.WindowCompiler.compile(Unknown Source)
  52.         at com.justep.ui.WindowServer.getWindow(Unknown Source)
  53.         at com.justep.ui.WindowServer.service(Unknown Source)
  54.         at com.justep.ui.servlet.MainServlet.service(Unknown Source)
  55.         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  56.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  57.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  58.         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
  59.         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
  60.         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  61.         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
  62.         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  63.         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
  64.         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
  65.         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
  66.         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
  67.         at java.lang.Thread.run(Thread.java:595)
复制代码



回复 支持 反对

使用道具 举报

88

主题

9507

帖子

5135

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
5135
QQ
发表于 2014-7-11 09:11:47 | 显示全部楼层
取消源码路径后,选中src目录,点右键,执行模型编译可以编译出对应的class文件
远程的联系方法 QQ 728094812。添加好友时,需要填写论坛账号
发远程时同时也发一下帖子的地址,方便了解要解决的问题

如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

46

主题

189

帖子

1218

积分

金牌会员

Rank: 6Rank: 6

积分
1218
QQ
 楼主| 发表于 2014-7-11 09:24:15 | 显示全部楼层
zhaixin 发表于 2014-7-11 09:11
取消源码路径后,选中src目录,点右键,执行模型编译可以编译出对应的class文件 ...

1.png 编译总数是0,这样没问题吗??编译了还是一样报错。。
回复 支持 反对

使用道具 举报

88

主题

9507

帖子

5135

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
5135
QQ
发表于 2014-7-11 10:34:23 | 显示全部楼层
UI目录下的src使用源码编译
远程的联系方法 QQ 728094812。添加好友时,需要填写论坛账号
发远程时同时也发一下帖子的地址,方便了解要解决的问题

如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

46

主题

189

帖子

1218

积分

金牌会员

Rank: 6Rank: 6

积分
1218
QQ
 楼主| 发表于 2014-7-11 10:50:56 | 显示全部楼层
zhaixin 发表于 2014-7-11 10:34
UI目录下的src使用源码编译

1.png 2.png
源码编译,模型编译都试过了,还是不行。。
回复 支持 反对

使用道具 举报

88

主题

9507

帖子

5135

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
5135
QQ
发表于 2014-7-11 11:22:02 | 显示全部楼层
切换到资源管理器看看src目录下的java文件有没有对应生成class文件
远程的联系方法 QQ 728094812。添加好友时,需要填写论坛账号
发远程时同时也发一下帖子的地址,方便了解要解决的问题

如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2024-5-23 01:54 , Processed in 0.063455 second(s), 26 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表