gatewayProperties.jsp 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/context/mytags.jsp"%>
  3. <script type="text/javascript">
  4. var gateway = workflow.getFigure(nodeid);
  5. //属性表格定义
  6. rows = [
  7. { "name": "ID", "group": "<t:mutiLang langKey='bpm.designer.page.gateway.porperties'/>", "value": gateway.gatewayId,"field": "gatewayId", "editor": "text" },
  8. { "name": "<t:mutiLang langKey='bpm.designer.page.gateway.name'/>", "group": "<t:mutiLang langKey='bpm.designer.page.gateway.porperties'/>", "value": gateway.gatewayName, "field": "gatewayName", "editor": "text" }
  9. ];
  10. //保存属性
  11. function saveGatewayProperties(){
  12. gateway.gatewayId=rows[0].value;
  13. gateway.gatewayName=rows[1].value;
  14. }
  15. //构建属性表格数据
  16. function populateGatewayProperites(){
  17. rows[0].value=gateway.gatewayId;
  18. rows[1].value=gateway.gatewayName;
  19. gatewaypropertygrid();
  20. }
  21. //加载属性表格数据
  22. function gatewaypropertygrid(){
  23. $('#gateway-properties').propertygrid('loadData',rows);
  24. }
  25. $(function(){
  26. //创建属性表格
  27. $('#gateway-properties').propertygrid({
  28. width: 'auto',
  29. height: 'auto',
  30. showGroup: true,
  31. scrollbarSize: 0,
  32. border:0,
  33. columns: [[
  34. { field: 'name', title: '<t:mutiLang langKey="bpm.designer.page.task.property.name"/>', width: 30, resizable: false },
  35. { field: 'value', title: '<t:mutiLang langKey="bpm.designer.page.task.property.value"/>', width: 100, resizable: false }
  36. ]],
  37. onAfterEdit:function(){
  38. saveGatewayProperties();//自动保存
  39. }
  40. });
  41. gatewaypropertygrid();
  42. });
  43. </script>
  44. <div id="gateway-properties-layout" class="easyui-layout" fit="true">
  45. <div id="gateway-properties-panel" region="center" border="true">
  46. <table id="gateway-properties">
  47. </table>
  48. </div>
  49. </div>