As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
package org.activiti.engine.impl.form;public class TextAreaFormType extends AbstractFormType { public String getName() { return "textarea"; } public String getMimeType() { return "text/plain"; } public Object convertFormValueToModelValue(String propertyValue) { return propertyValue; } public String convertModelValueToFormValue(Object modelValue) { return (String) modelValue; }}
package org.activiti.explorer.ui.form;import org.activiti.engine.form.FormProperty;public class TextAreaFormPropertyRenderer extends AbstractFormPropertyRenderer { public TextAreaFormPropertyRenderer() { super(TextAreaFormType.class); } @Override public Field getPropertyField(FormProperty formProperty) { TextArea textArea = new TextArea(getPropertyLabel(formProperty)); textArea.setRequired(formProperty.isRequired()); textArea.setEnabled(formProperty.isWritable()); textArea.setRequiredError(getMessage(Messages.FORM_FIELD_REQUIRED, getPropertyLabel(formProperty))); if (formProperty.getValue() != null) { textArea.setValue(formProperty.getValue()); } return textArea; }}
protected void initFormTypes() { if (formTypes==null) { formTypes = new FormTypes(); formTypes.addFormType(new StringFormType()); formTypes.addFormType(new TextAreaFormType()); // <<<< NEW LINE FOR TEXTAREA formTypes.addFormType(new LongFormType()); formTypes.addFormType(new DateFormType("dd/MM/yyyy")); formTypes.addFormType(new BooleanFormType()); } if (customFormTypes!=null) { for (AbstractFormType customFormType: customFormTypes) { formTypes.addFormType(customFormType); } }
27-sep-2011 12:36:36 com.vaadin.Application terminalErrorGRAVE: Terminal error:com.vaadin.event.ListenerMethod$MethodExceptionCause: com.vaadin.event.ListenerMethod$MethodExceptionCause: org.activiti.engine.ActivitiException: No property renderer found for type: textarea, class org.activiti.engine.impl.form.TextAreaFormType at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510) at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164) at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1193) at com.vaadin.ui.Button.fireClick(Button.java:539) at com.vaadin.ui.Button.changeVariables(Button.java:206) at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(AbstractCommunicationManager.java:1299) at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1219) at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:735) at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296) at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:662)Caused by: com.vaadin.event.ListenerMethod$MethodExceptionCause: org.activiti.engine.ActivitiException: No property renderer found for type: textarea, class org.activiti.engine.impl.form.TextAreaFormType at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510) at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164) at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1193) at com.vaadin.ui.AbstractField.fireValueChange(AbstractField.java:891) at com.vaadin.ui.AbstractField.setValue(AbstractField.java:529) at com.vaadin.ui.AbstractSelect.setValue(AbstractSelect.java:666) at com.vaadin.ui.AbstractSelect.setValue(AbstractSelect.java:635) at com.vaadin.ui.Table.setValue(Table.java:1852) at com.vaadin.ui.AbstractSelect.select(AbstractSelect.java:1377) at org.activiti.explorer.ui.AbstractTablePage.selectElement(AbstractTablePage.java:104) at org.activiti.explorer.ui.task.TaskPage.initUi(TaskPage.java:71) at org.activiti.explorer.ui.AbstractPage.attach(AbstractPage.java:43) at com.vaadin.ui.AbstractComponent.setParent(AbstractComponent.java:570) at com.vaadin.ui.AbstractComponentContainer.addComponent(AbstractComponentContainer.java:211) at com.vaadin.ui.CssLayout.addComponent(CssLayout.java:93) at org.activiti.explorer.ui.mainlayout.MainLayout.setMainContent(MainLayout.java:60) at org.activiti.explorer.ui.MainWindow.switchView(MainWindow.java:79) at org.activiti.explorer.DefaultViewManager.switchView(DefaultViewManager.java:272) at org.activiti.explorer.DefaultViewManager.showInboxPage(DefaultViewManager.java:162) at org.activiti.explorer.ui.mainlayout.MainMenuBar$ShowTasksClickListener.buttonClick(MainMenuBar.java:191) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:490) … 22 moreCaused by: org.activiti.engine.ActivitiException: No property renderer found for type: textarea, class org.activiti.engine.impl.form.TextAreaFormType at org.activiti.explorer.ui.form.FormPropertyRendererManager.getPropertyRendererForType(FormPropertyRendererManager.java:56) at org.activiti.explorer.ui.form.FormPropertiesComponent.getRenderer(FormPropertiesComponent.java:123) at org.activiti.explorer.ui.form.FormPropertiesComponent.setFormProperties(FormPropertiesComponent.java:67) at org.activiti.explorer.ui.form.FormPropertiesForm.setFormProperties(FormPropertiesForm.java:75) at org.activiti.explorer.ui.task.TaskDetailPanel.initTaskForm(TaskDetailPanel.java:297) at org.activiti.explorer.ui.task.TaskDetailPanel.init(TaskDetailPanel.java:118) at org.activiti.explorer.ui.task.TaskDetailPanel.attach(TaskDetailPanel.java:99) at com.vaadin.ui.AbstractComponent.setParent(AbstractComponent.java:570) at com.vaadin.ui.AbstractComponentContainer.addComponent(AbstractComponentContainer.java:211) at com.vaadin.ui.GridLayout.addComponent(GridLayout.java:223) at org.activiti.explorer.ui.AbstractPage.setDetailComponent(AbstractPage.java:137) at org.activiti.explorer.ui.task.TaskPage.access$0(TaskPage.java:1) at org.activiti.explorer.ui.task.TaskPage$1.valueChange(TaskPage.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:490) … 46 more
<!– Custom form property renderers can be plugged in here –><br> <bean id="formPropertyRendererManager" class="org.activiti.explorer.ui.form.FormPropertyRendererManager" lazy-init="true"><br> <!– Default renderer –><br> <property name="noTypePropertyRenderer"><br> <bean class="org.activiti.explorer.ui.form.StringFormPropertyRenderer" /><br> </property><br> <!– Renderers by property type –><br> <property name="propertyRenderers"><br> <list><br> <bean class="org.activiti.explorer.ui.form.StringFormPropertyRenderer" /><br> <bean class="org.activiti.explorer.ui.form.EnumFormPropertyRenderer" /><br> <bean class="org.activiti.explorer.ui.form.LongFormPropertyRenderer" /><br> <bean class="org.activiti.explorer.ui.form.DateFormPropertyRenderer" /><br> <bean class="org.activiti.explorer.ui.form.UserFormPropertyRenderer" /><br> <bean class="org.activiti.explorer.ui.form.BooleanFormPropertyRenderer" /><br> </list><br> </property><br> </bean>
public abstract Field getPropertyField(FormProperty formProperty);
protected void initGroups() {<br> HorizontalLayout groupHeader = new HorizontalLayout();<br> groupHeader.setWidth(100, UNITS_PERCENTAGE);<br> groupHeader.setSpacing(true);<br> groupHeader.setMargin(false, false, true, false);<br> groupHeader.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK);<br> addDetailComponent(groupHeader);<br> <br> initGroupTitle(groupHeader);<br> initAddGroupsButton(groupHeader);<br> <br> groupLayout = new HorizontalLayout(); // we wrap the table in a simple layout so we can remove the table easy later on<br> groupLayout.setWidth(100, UNITS_PERCENTAGE);<br> addDetailComponent(groupLayout);<br> initGroupsTable();<br> }