Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Abstract Methods
renderTemplate
public abstract java.lang.String renderTemplate(org.joget.apps.form.model.FormData formData, java.util.Map dataModel)

HTML template for front-end UI.

Parameters:

  • dataModel - Model containing values to be displayed in the template.
Overridable Methods
formatData
public org.joget.apps.form.model.FormRowSet formatData(org.joget.apps.form.model.FormData formData)

Method that retrieves loaded or submitted form data, and formats it for a store binder. The formatted data is to be stored and returned in a FormRowSet.

formatDataForValidation
public org.joget.apps.form.model.FormData formatDataForValidation(org.joget.apps.form.model.FormData formData)

...

Error message can display with following code:

String id = FormUtil.getElementParameterName(this);
formData.addFormError(id, "Error!!");
render

...

public java.lang.String render(org.joget.apps.form.model.FormData formData, java.lang.Boolean includeMetaData)

Render HTML template for UI, with option for form builder design mode. This method will call abstract method renderTemplate for rendering.

Parameters:

  • includeMetaData - set true to render additional meta required for the Form Builder.
renderErrorTemplate
public java.lang.String renderErrorTemplate(org.joget.apps.form.model.FormData formData, java.util.Map dataModel)

HTML template with errors for front-end UI. This method will call abstract method renderTemplate for rendering.

Parameters:

  • dataModel - Model containing values to be displayed in the template.
renderReadOnlyTemplate
public java.lang.String renderReadOnlyTemplate(org.joget.apps.form.model.FormData formData, java.util.Map dataModel)

Read-only HTML template for front-end UI (Not used at the moment)

Parameters:

  • dataModel - Model containing values to be displayed in the template.
continueValidation
public boolean continueValidation(org.joget.apps.form.model.FormData formData)

Flag to indicate whether or not continue validating descendent elements.

getDynamicFieldNames
public Collection<java.lang.String> getDynamicFieldNames()

Used to create multiple form data column in database by returning extra column names.

hasError
public java.lang.Boolean hasError(org.joget.apps.form.model.FormData formData)

Flag to indicate whether or not this field has fail the validation process

isAuthorize
public java.lang.Boolean isAuthorize(org.joget.apps.form.model.FormData formData)

Flag to indicate whether or not the current logged in user is authorized to view this field in the form.

renderErrorTemplate
renderReadOnlyTemplate
continueValidation
getDynamicFieldNames
hasError
isAuthorize
Utility Methods
getChildren
public java.util.Collection<org.joget.apps.form.model.Element> getChildren()

Retrieves all children form field element under this field

getChildren
public void setChildren(java.util.Collection<org.joget.apps.form.model.Element> children)

Retrieves all children form field element under this field

setChildren
public void setChildren(java.util.Collection<org.joget.apps.form.model.Element> children)

Sets form fields as children of this field

getParent
public org.joget.apps.form.model.Element getParent() 

...

public org.joget.apps.form.model.FormLoadBinder getOptionsBinder()

Gets an Options Binder

setOptionsBinder
public void setOptionsBinder(org.joget.apps.form.model.FormLoadBinder optionsBinder)

Sets an Options Binder

getStoreBinder
public org.joget.apps.form.model.FormStoreBinder getStoreBinder()

Gets a Store Binder

setStoreBinder
public void setStoreBinder(org.joget.apps.form.model.FormStoreBinder storeBinder)

Sets a Store Binder

getValidator
public org.joget.apps.form.model.Validator getValidator()

Gets a validator

setValidator
public void setValidator(org.joget.apps.form.model.Validator validator)

Sets a validator

getCustomParameterName
public java.lang.String getCustomParameterName()

...