通过遵循此链接Alfresco custom control in stencil我已经使用与帖子中提到的相同步骤(Alfresco Activiti)制作了自定义多选控件,多选工作正常,但我现在在可见性操作中面临的问题是控件不起作用例如,有一个文本字段,并且在其可见性部分中,只要多选控件的值为中和高,我就会应用条件 隐藏此控件,如附图中所述。
. 多选自定义控件的代码是
<div ng-controller="multiselectController">
<select name="multiselect" multiple ng-model="field.value"
ng-options="option.code as option.name for option in field.options"
class="form-control ng-pristine ng-valid ng-scope ng-valid-required ng-touched"
>
<option value="">--Select State--</option>
</select>
</div>
角度控制器代码是
angular
.module('activitiApp')
.controller('multiselectController',
['$rootScope', '$scope', '$http',
function ($rootScope, $scope, $http) {
// that responds with JSON
$scope.field.options = [];
// in case of array values without rest services
if($scope.field.params.customProperties.ElxwfOptionsArrayMultiselect){
$scope.field.options = JSON.parse($scope.field.params.customProperties.ElxwfOptionsArrayMultiselect);
} else($scope.field.params.customProperties.ElxwfRestURLforMultiselect) {
$http.get($scope.field.params.customProperties.ElxwfRestURLforMultiselect).
success(function(data, status, headers, config) {
var tempResponseArray = data.RestResponse.result;
for (var i = 0; i < tempResponseArray.length; i++) {
var state = { name: tempResponseArray[i].name };
$scope.data.states.push(state);
}
}).
error(function(data, status, headers, config) {
alert('Error: '+ status);
tempResponseArray = [];
}
);
}
}]
);
在这方面帮助我。
