Package com.groiss.dms
Class FormContext
java.lang.Object
com.groiss.dms.FormContext
A context object containing some information about the context in which a form is shown or edited.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final short
The form will be deleted.static final int
Show form with empty form objectstatic final short
The form is shown for insert: fields read-write, insert buttonstatic final short
The form is shown for search: fields read-write but empty, search buttonstatic final short
The form is shown for update: fields read-write, update buttonstatic final short
The form is shown for view: fields read-only, close or back buttonstatic final short
The form is shown for view versionsstatic final short
The form is shown for view: fields in text modestatic final short
The form is shown for view: fields read-only,no button -
Constructor Summary
ConstructorDescriptionFormContext
(ActivityInstance ai, DMSFolder folder, DMSForm mainform, int mode) Create a form context object.Create a form context object. -
Method Summary
Modifier and TypeMethodDescriptionGet the activity instance.Get field modes for form fields.Get the DMS-folder.Get the main form.int
getMode()
Get the view mode, one of the constants in this class.Get the process instance.getSubid()
Get the id of this form in the mainform-subform relation.Get the submitValidation value.boolean
Ask whether beforeShow is alreafy called.void
setBeforeShowCalled
(boolean c) Set the beforeShowCalled field.void
setFieldModes
(Map<String, Short> modes) Set the filed modes.void
setMainform
(DMSForm mainform) Set the mainform.void
setMode
(int mode) Set the view mode.void
Set the id of this form in the mainform-subform relation.void
setSubmitValidation
(Boolean validate) Set the default for validation for submit buttons.void
-
Field Details
-
UPDATE
public static final short UPDATEThe form is shown for update: fields read-write, update button- See Also:
-
INSERT
public static final short INSERTThe form is shown for insert: fields read-write, insert button- See Also:
-
SEARCH
public static final short SEARCHThe form is shown for search: fields read-write but empty, search button- See Also:
-
DELETE
public static final short DELETEThe form will be deleted.- See Also:
-
VIEW
public static final short VIEWThe form is shown for view: fields read-only, close or back button- See Also:
-
EMPTY
public static final int EMPTYShow form with empty form object- See Also:
-
VIEW_WITHOUT_BUTTONS
public static final short VIEW_WITHOUT_BUTTONSThe form is shown for view: fields read-only,no button- See Also:
-
VIEW_FOR_VERSION
public static final short VIEW_FOR_VERSIONThe form is shown for view versions- See Also:
-
VIEW_TEXT
public static final short VIEW_TEXTThe form is shown for view: fields in text mode- See Also:
-
-
Constructor Details
-
FormContext
Create a form context object.- Parameters:
ai
-folder
-mainform
-mode
- the mode is used to determine how the form should be rendered: with or without buttons, readonly, etc. See the constants in this class.
-
FormContext
Create a form context object.
-
-
Method Details
-
getActivityInstance
Get the activity instance. -
getProcessInstance
Get the process instance. -
getFolder
Get the DMS-folder. Returns null, if form not in a folder. -
getMainform
Get the main form. Returns null, if form is not a subform -
setMainform
Set the mainform. -
getSubid
Get the id of this form in the mainform-subform relation. -
setSubid
Set the id of this form in the mainform-subform relation. -
getMode
public int getMode()Get the view mode, one of the constants in this class. -
setMode
public void setMode(int mode) Set the view mode. -
getFieldModes
Get field modes for form fields.- Returns:
- A map where the keys are the field names, the values are
WfEngine.INVISIBLE
,WfEngine.READ_ONLY
,WfEngine.READ_WRITE
,WfEngine.TEXT
,WfEngine.MUST
,WfEngine.NO_ADDDEL
as short objects.
-
setFieldModes
Set the filed modes. See getFieldModes for content. -
setSubmitValidation
Set the default for validation for submit buttons. This is evaluated only in Xforms. -
getSubmitValidation
Get the submitValidation value. -
isBeforeShowCalled
public boolean isBeforeShowCalled()Ask whether beforeShow is alreafy called. -
setBeforeShowCalled
public void setBeforeShowCalled(boolean c) Set the beforeShowCalled field. -
setUserAgent
-
getUserAgent
-