问题
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:
- Extend the
AbstractFormTypeclass and override it's methods as shown in this example TextAreaFormType.java Activiti Explorer is implemented in Vaadin so the form field also has to be implemented using Vaadin. Here you can find sample implementation
Add a custom form type to the process engine configuration in
applicationContext.xmlapplicationContext.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