html5工作流控件,activiti web designer 工作流设计器自定义输入显示控件

本文介绍了如何在Activiti工作流设计器中自定义输入显示控件,通过编辑editor-app/configuration/properties.js和stencilset.json.en文件,将FormKey属性改为下拉选择框。涉及到的步骤包括新增配置项、修改模板文件以及实现下拉选项的填充。通过这个过程,可以提升工作流设计器的用户体验。
摘要由CSDN通过智能技术生成

activiti web designer 工作流设计器自定义输入显示控件

editor-app/configuration/properties.js

增加:

1

2

3

4

"pandy-form-select":{

"readModeTemplateUrl":"editor-app/configuration/properties/custom/form-select-display-template.html",

"writeModeTemplateUrl":"editor-app/configuration/properties/custom/form-select-write-mode-template.html"

}

resources/stencilset.json.en

找到要修改的控件,比如Form Key要变成可以选择的下拉框,那么找到

1

2

3

4

5

6

7

8

9

10

11

{

"name":"formkeydefinitionpackage",

"properties":[{

"id":"formkeydefinition",

"type":"String",//要该成这里成==>pandy-form-select

"title":"Form key",

"value":"",

"description":"Form key that provides a reference to a form.",

"popular":true

}]

}

1

2

3

4

5

6

7

8

9

10

11

{

"name":"formkeydefinitionpackage",

"properties":[{

"id":"formkeydefinition",

"type":"pandy-form-select",

"title":"Form key",

"value":"",

"description":"Form key that provides a reference to a form.",

"popular":true

}]

}

复制字符串的末扮文件,得到新模板:

default-value-display-template.html ==> editor-app/configuration/properties/custom/form-select-display-template.html

string-property-write-mode-template.html ==> editor-app/configuration/properties/custom/form-select-write-mode-template.html

最后进行修改成自己想要的控件

form-select-display-template.html

1

2

3

{{property.value|limitTo:20}}

20">...

PROPERTY.EMPTY

方式1:这种方式很无奈,是因为自己还没学angularjs,所以不得不这么做.

form-select-write-mode-template.html

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

{{property.value}}

varselectEle=jQuery("select[_id=custom_form]");

selectEle.empty();

jQuery.ajax({

type:"post",

contentType:"application/json; charset=utf-8",

datatype:"json",

url:ACTIVITI.CONFIG.activitiContextRoot+"/getAllCustomForms.do",

data:"{}",

success:function(context){

selectEle.append('不选择');

jQuery.each(context.data.formList,function(i){

selectEle.append(''+this.name+'');

});

varcustom_form_val=jQuery("label[_id=custom_form_val]").text();

selectEle.val(custom_form_val);

}

});

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值