几天来,我一直试图验证我的alfresco共享工作流表单,但没有成功。这就是我所做的。
当我选择我的worflow表单和在staff number表单中的键值时,什么都不会发生。我已经签了火虫,但是没有对js的任何调用。我哪里出错了?
发布于 2015-03-17 12:42:21
我认为您没有为您的java脚本添加依赖项。为此,请在位于%ALFRESCO_HOME%tomcat\shared\classes\alfresco\web-extension中的share custom.xml中添加下面的代码
<config>
<forms>
<dependencies>
<js src="/js/examplevalidation.js" />
</dependencies>
</forms>
</config>约束处理程序应该类似于
<field id="leave:staffnumber" label-id="Staff Number" mandatory="true">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
<constraint-handlers>
<constraint type="MANDATORY" validation-handler="Alfresco.forms.validation.examplestaffnumber" event="blur"/>
</constraint-handlers>
</field>而js中的函数应该是这样的:
Alfresco.forms.validation.examplestaffnumber = function examplestaffnumber(
field, args, event, form, silent, message) {
// your code with return statement
}希望这会有帮助!
https://stackoverflow.com/questions/29094890
复制相似问题