提交 bb7c76a1 编写于 作者: F frederikheremans

Merge pull request #336 from ejyanezp/master

Activiti Forms with interdependent Properties
......@@ -58,4 +58,24 @@ public abstract class AbstractFormPropertyRenderer implements FormPropertyRender
return ExplorerApp.get().getI18nManager().getMessage(key, params);
}
/**
* Get the Vaadin form that contains the renderer
*/
@Override
public com.vaadin.ui.Form getForm() {
return theForm;
}
/**
* Set the Vaadin form that contains de renderer
*/
@Override
public void setForm(com.vaadin.ui.Form p_form) {
theForm = p_form;
}
/**
* The form that contains this renderer
*/
transient private com.vaadin.ui.Form theForm = null;
}
......@@ -66,6 +66,9 @@ public class FormPropertiesComponent extends VerticalLayout {
for(FormProperty formProperty : formProperties) {
FormPropertyRenderer renderer = getRenderer(formProperty);
// Be able to get the Form from any Renderer.
renderer.setForm(form);
Field editorComponent = renderer.getPropertyField(formProperty);
if(editorComponent != null) {
// Get label for editor component.
......
......@@ -51,4 +51,14 @@ public interface FormPropertyRenderer extends Serializable {
* {@link FormPropertyRenderer#getPropertyField(FormProperty)}.
*/
String getFieldValue(FormProperty formProperty, Field field);
/**
* Get the Vaadin form that contains this renderer
*/
com.vaadin.ui.Form getForm();
/**
* Set the Vaadin form that contains this renderer
*/
void setForm(com.vaadin.ui.Form p_form);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册