public class HtmlFormEngine extends Object implements FormEngine
A simple FormEngine
implementaiton which renders
forms as HTML such that they can be used as embedded forms
inside camunda Tasklist.
Constructor and Description |
---|
HtmlFormEngine() |
Modifier and Type | Method and Description |
---|---|
protected void |
addCommonFormFieldAttributes(FormField formField,
HtmlElementWriter formControl) |
protected HtmlElementWriter |
createInputField(FormField formField) |
String |
getName() |
protected boolean |
isBoolean(FormField formField) |
protected boolean |
isDate(FormField formField) |
protected boolean |
isEnum(FormField formField) |
protected boolean |
isReadOnly(FormField formField) |
protected void |
renderDatePicker(FormField formField,
HtmlDocumentBuilder documentBuilder) |
protected String |
renderFormData(FormData formData) |
protected void |
renderFormField(FormField formField,
HtmlDocumentBuilder documentBuilder) |
protected void |
renderInputField(FormField formField,
HtmlDocumentBuilder documentBuilder) |
protected void |
renderInvalidDateMessage(FormField formField,
HtmlDocumentBuilder documentBuilder) |
protected void |
renderInvalidMessageElement(FormField formField,
HtmlDocumentBuilder documentBuilder) |
protected void |
renderInvalidTypeMessage(FormField formField,
HtmlDocumentBuilder documentBuilder) |
protected void |
renderInvalidValueMessage(FormField formField,
HtmlDocumentBuilder documentBuilder) |
protected void |
renderSelectBox(FormField formField,
HtmlDocumentBuilder documentBuilder) |
protected void |
renderSelectOptions(FormField formField,
HtmlDocumentBuilder documentBuilder) |
Object |
renderStartForm(StartFormData startForm) |
Object |
renderTaskForm(TaskFormData taskForm) |
protected static final String FORM_ELEMENT
protected static final String DIV_ELEMENT
protected static final String SPAN_ELEMENT
protected static final String LABEL_ELEMENT
protected static final String INPUT_ELEMENT
protected static final String BUTTON_ELEMENT
protected static final String SELECT_ELEMENT
protected static final String OPTION_ELEMENT
protected static final String I_ELEMENT
protected static final String SCRIPT_ELEMENT
protected static final String NAME_ATTRIBUTE
protected static final String CLASS_ATTRIBUTE
protected static final String ROLE_ATTRIBUTE
protected static final String FOR_ATTRIBUTE
protected static final String VALUE_ATTRIBUTE
protected static final String TYPE_ATTRIBUTE
protected static final String SELECTED_ATTRIBUTE
protected static final String IS_OPEN_ATTRIBUTE
protected static final String DATEPICKER_POPUP_ATTRIBUTE
protected static final String CAM_VARIABLE_TYPE_ATTRIBUTE
protected static final String CAM_VARIABLE_NAME_ATTRIBUTE
protected static final String CAM_SCRIPT_ATTRIBUTE
protected static final String CAM_BUSINESS_KEY_ATTRIBUTE
protected static final String NG_CLICK_ATTRIBUTE
protected static final String NG_IF_ATTRIBUTE
protected static final String NG_SHOW_ATTRIBUTE
protected static final String FORM_GROUP_CLASS
protected static final String FORM_CONTROL_CLASS
protected static final String INPUT_GROUP_CLASS
protected static final String INPUT_GROUP_BTN_CLASS
protected static final String BUTTON_DEFAULT_CLASS
protected static final String HAS_ERROR_CLASS
protected static final String HELP_BLOCK_CLASS
protected static final String TEXT_INPUT_TYPE
protected static final String CHECKBOX_INPUT_TYPE
protected static final String BUTTON_BUTTON_TYPE
protected static final String TEXT_FORM_SCRIPT_TYPE
protected static final String CALENDAR_GLYPHICON
protected static final String GENERATED_FORM_NAME
protected static final String FORM_ROLE
protected static final String REQUIRED_ERROR_TYPE
protected static final String DATE_ERROR_TYPE
protected static final String FORM_ELEMENT_SELECTOR
protected static final String INVALID_EXPRESSION
protected static final String DIRTY_EXPRESSION
protected static final String ERROR_EXPRESSION
protected static final String DATE_ERROR_EXPRESSION
protected static final String REQUIRED_ERROR_EXPRESSION
protected static final String TYPE_ERROR_EXPRESSION
protected static final String DATE_FIELD_OPENED_ATTRIBUTE
protected static final String OPEN_DATEPICKER_SNIPPET
protected static final String OPEN_DATEPICKER_FUNCTION_SNIPPET
protected static final String DATE_FORMAT
protected static final String REQUIRED_FIELD_MESSAGE
protected static final String TYPE_FIELD_MESSAGE
protected static final String INVALID_DATE_FIELD_MESSAGE
public String getName()
getName
in interface FormEngine
public Object renderStartForm(StartFormData startForm)
renderStartForm
in interface FormEngine
public Object renderTaskForm(TaskFormData taskForm)
renderTaskForm
in interface FormEngine
protected void renderFormField(FormField formField, HtmlDocumentBuilder documentBuilder)
protected HtmlElementWriter createInputField(FormField formField)
protected void renderDatePicker(FormField formField, HtmlDocumentBuilder documentBuilder)
protected void renderInputField(FormField formField, HtmlDocumentBuilder documentBuilder)
protected void renderSelectBox(FormField formField, HtmlDocumentBuilder documentBuilder)
protected void renderSelectOptions(FormField formField, HtmlDocumentBuilder documentBuilder)
protected void renderInvalidMessageElement(FormField formField, HtmlDocumentBuilder documentBuilder)
protected void renderInvalidValueMessage(FormField formField, HtmlDocumentBuilder documentBuilder)
protected void renderInvalidTypeMessage(FormField formField, HtmlDocumentBuilder documentBuilder)
protected void renderInvalidDateMessage(FormField formField, HtmlDocumentBuilder documentBuilder)
protected void addCommonFormFieldAttributes(FormField formField, HtmlElementWriter formControl)
protected boolean isEnum(FormField formField)
protected boolean isDate(FormField formField)
protected boolean isBoolean(FormField formField)
protected boolean isReadOnly(FormField formField)
Copyright © 2017. All rights reserved.