How to make activiti show textarea field instaded of text input?

独自空忆成欢 提交于 2019-12-11 19:07:26

问题


How can I make activiti show textarea field instaded of text input for formProperty below?

<extensionElements>
        <activiti:formProperty id="Ata"
        name="Ata"
        required="true"
        type="string" />
    </extensionElements>

回答1:


  1. Extend the AbstractFormType class and override it's methods as shown in this example TextAreaFormType.java
  2. Activiti Explorer is implemented in Vaadin so the form field also has to be implemented using Vaadin. Here you can find sample implementation

  3. Add a custom form type to the process engine configuration in applicationContext.xml applicationContext.xml


<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
<property name="customFormTypes">
<list>
<ref bean="userFormType"/>
<ref bean="textAreaFormType"/>
</list>
</property>
</bean>
<bean id="userFormType" class="org.activiti.explorer.form.UserFormType"/>
<bean id="textAreaFormType" class="org.bpmnwithactiviti.explorer.form.TextAreaFormType"/>


来源:https://stackoverflow.com/questions/15331195/how-to-make-activiti-show-textarea-field-instaded-of-text-input

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!