WorkflowPage Class Reference
Accessible methods
void FillFormData(DataSet or XmlDocument)
void FillFormData(DataSet or XmlDocument)
Use this method to load the temporary form data XML file (dataOUT.xml
) from the current action working directory into the form data
IN parameter. You can use a DataSet or an XmlDocument object to receive the form data.
Refer to the StoragePath
WorkflowPage class property for the location of the current action working directory.
If there is already some data in your DataSet or XmlDocument, the data will be emptied before being filled.
void SaveFieldsData(DataSet)
void SaveFieldsData(DataSet)
This method will attempt to find controls in the web form page that have the same ID as the columns of your form data's Table1
; when it finds one, it will update the form data value with the control value.
If the DataType
property of the column being filled is Date
or Double
, the data type of the web form value will be validated and formatted using the current culture code before being pushed into the DataSet. If the value is not consistent with the data type, a FormatException
is thrown with an appropriate message telling you which field is not a valid date or double value.
For a FileUpload
or an HtmlInputFile
control, only the file name is being pushed into the dataset, so you still need to call the SaveFileAttachment
method in order to save the file into the EFORMASPX storage path.
To use this method, you must use a DataSet as your form data source.
If a ListBox with multiple selection mode or a CheckBoxList is found for a form data, the value will be all of the selected (or checked) values separated by commas.
The following web controls are supported:
TextBox
Label
DropDownList
ListBox
CheckBox
CheckBoxList
RadioButton
RadioButtonList
FileUpload
HtmlInputFile
void BindFormDataToFields(DataSet, bool isPageDataBind = true)
void BindFormDataToFields(DataSet, bool isPageDataBind = true)
Use this method when you want to bind all of your web form fields automatically using your form data DataSet. The supported controls are exactly the same as those supported by the SaveFieldsData
method.
Set the isPageDataBind
parameter to false
if you want to skip the call of Page.DataBind()
at the beginning of this method. Otherwise, by default, a Page.DataBind()
is called at the beginning to ensure that other controls are bound before binding your own web form controls.
In some cases, a call to the page databind event might not be desired (e.g. skipping the page databind that was already performed before), or if you want to control exactly when to execute the page databind event instead.
void SaveFormData(DataSet or XmlDocument)
void SaveFormData(DataSet or XmlDocument)
Use this method to write a form data
into the temporary form data XML file (dataOUT.xml
) in the current action working directory. You can use a DataSet or an XmlDocument object to update the form data XML file.
void SaveFormData (DataSet, bool saveFieldValues)
void SaveFormData (DataSet, bool saveFieldValues)
Use this method to save the web form field values into a form data
(saveFieldValues
set to true
) then write the form data
into the temporary form data XML file (dataOUT.xml
) in the current action working directory.
This method overload is only available if your form data
is a DataSet object.
You must set the saveFieldValues
parameter to true
if you want to save the current state of the web form field values into theform data
. This will ensure that the form data values are in sync with the values from the web form fields prior to any manipulations of the web form or form data.
For example, it is required to save the web form field values when injecting custom data into the form data prior to reloading the web form using the BindFormDataToFields
method. Otherwise, the current state of web form field values could be lost after the refresh.
In most scenarios, we suggest setting the saveFieldValues
parameter to true
before any manipulations that could change the web form or form data.
void SubmitToWorkflow()
void SubmitToWorkflow()
Use this method when you want to submit the web form to WorkflowGen and redirect from the web form to WorkflowGen.
void SubmitToWorkflow(isDraftMode)
void SubmitToWorkflow(isDraftMode)
Use this method when you want to submit the web form to WorkflowGen and redirect from the web form to WorkflowGen in DRAFT mode (isDraftMode
set to true
). This will skip all of the required fields including GridViews. (This method is available since WorkflowGen.My version 2.2.5.)
void SubmitToWorkflow(DataSet or XmlDocument)
void SubmitToWorkflow(DataSet or XmlDocument)
Use this method when you want to submit the web form to WorkflowGen, save your form data, and redirect from the web form to WorkflowGen.
This method overload is only available if your form data is a DataSet object.
void SubmitToWorkflow(DataSet, Boolean saveFieldValues)
void SubmitToWorkflow(DataSet, Boolean saveFieldValues)
Use this method when you want to submit the web form to WorkflowGen, save your fields' values to your form data (saveFieldValues
set to true
), save your form data, and then redirect from the web form to WorkflowGen.
string SaveFileAttachment(HttpPostedFile)
string SaveFileAttachment(HttpPostedFile)
Use this method when you want to save a file attachment to the storage path of EFORMASPX in a sub-directory called upload
. This method returns the name of the file.
string SaveFileAttachment (HttpPostedFile, string)
string SaveFileAttachment (HttpPostedFile, string)
Use this method when you want to save a file attachment to the storage path of EFORMASPX in a sub-directory called upload
and you want to specify a file name to use. This method returns the name of the file.
Overridable methods
string GetFormArchive()
string GetFormArchive()
Override this method if you want to customize the output of the form archive. This method has to return a complete HTML page.
void ChangeFormArchiveLayout()
void ChangeFormArchiveLayout()
Override this method in order to customize the form archive layout.
void ChangeFormLayout()
void ChangeFormLayout()
Override this method in order to customize your web form layout.
Properties
string CurrentWorkflowActionName
(read-only)
string CurrentWorkflowActionName
(read-only)The name of the current WorkflowGen action.
It will be empty if you did not add a
CURRENT_ACTION
parameter to your action.
string LangId
(read-only)
string LangId
(read-only)The current culture code of the connected WorkflowGen user.
Culture code example:
en-US
string StoragePath
(read-only)
string StoragePath
(read-only)The absolute path to the temporary storage folder of the current action working directory. It is used to read and write the form data and to save the file attachments.
Value example:
DRIVE:\inetpub\wwwroot\wfgen\App_Data\Files\EFORMASPX
string RequiredFieldsErrorMessage
(read and write)
string RequiredFieldsErrorMessage
(read and write)The error message for required fields.
Default value: The
{0}
field is required.This value must contain
{0}
and will contain the field name.
string FormArchiveFileName
(read and write)
string FormArchiveFileName
(read and write)The form archive file name.
Default value:
form_archive.htm
string FormArchiveCssPath
(read and write)
string FormArchiveCssPath
(read and write)The relative path to the form archive stylesheet.
Default value:
\css\form_archive.css
Color ReadOnlyFieldsBorderColor
(read and write)
Color ReadOnlyFieldsBorderColor
(read and write)The read-only field's border color or text color if it is a drop-down list, checkbox list, or radio button list.
If the color is
Color.Empty
, the color will not be affected.Default value:
Color.Empty
Color RequiredFieldsBorderColor
(read and write)
Color RequiredFieldsBorderColor
(read and write)The required field's border color or text color if it is a drop-down list, checkbox list, or radio button list.
If the color is
Color.Empty
, the color will not be affected.Default value:
Color.Red
ColorizationType FieldsColorization
(read and write)
ColorizationType FieldsColorization
(read and write)The colorization type for required, read-only, and updatable fields.
Possible values:
Automatic
,Css
,None
Default value:
Automatic
Boolean IsStandAloneMode
(read-only)
Boolean IsStandAloneMode
(read-only)This property indicates whether or not the web form is running in stand-alone mode.
Running in stand-alone mode means that the web form was not instantiated by WorkflowGen, but rather by calling the web form address directly without any WorkflowGen parameters.
Boolean IsSimpleMode
(read and write)
Boolean IsSimpleMode
(read and write)This property determines if you are running WorkflowPage in Advanced or Simple mode.
This property needs to be determined in the web form's constructor.
Default value:
true
Boolean HandleSubmitButton
(read and write)
Boolean HandleSubmitButton
(read and write)This property determines if WorkflowPage automatically handles the submit button with the ID
SubmitButton
. If the property is set totrue
, you don't have to manage the SubmitButton code.This property needs to be determined in the web form's constructor.
This property is only available in Simple mode.
Default value:
true
DataSet FormData
(read-only)
DataSet FormData
(read-only)This property contains the form data DataSet managed by WorkflowPage if you are in Simple mode.
This property is only available in Simple mode.
string RequiredGridViewsErrorMessage
(read and write)
string RequiredGridViewsErrorMessage
(read and write)The error message shown to the end-user when a required GridView has not yet been filled in.
Default value:
The {0} list needs to have at least one filled row.
This value must contain
{0}
; this symbol will contain the field name.
string InvalidNumberGridViewErrorMessage
(read and write)
string InvalidNumberGridViewErrorMessage
(read and write)The error message shown to the end-user when a numeric field has not been filled with a valid numeric value in a GridView.
Default value:
You have entered an invalid number in the {0} column.
This value must contain
{0}
; this symbol will contain the field name.
string InvalidCurrencyGridViewsErrorMessage
(read and write)
string InvalidCurrencyGridViewsErrorMessage
(read and write)The error message shown to the end-user when a numeric field has not been filled with a valid currency value in a GridView
Default value:
You have entered an invalid number in the {0} column. Do not enter the currency symbol in the value.
This value must contain
{0}
; this symbol will contain the column header text.
string RequiredColumnsInGridViewsErrorMessage
(read and write)
string RequiredColumnsInGridViewsErrorMessage
(read and write)The error message shown to the end-user when a required column has not been filled in a GridView and the end-user tries to update the line
Default value:
The {0} column is required.
This value must contain
{0}
; this symbol will contain the column header text.
string InvalidDateGridViewErrorMessage
(read and write)
string InvalidDateGridViewErrorMessage
(read and write)The error message shown to the end-user when a date or a date/time field in a GridView has not been filled with a valid date or date/time value
Default value:
You have entered an invalid date in the {0} column.
This value must contain
{0}
; this symbol will contain the field name.
boolean ColorizeRequiredColumnsInGridViewHeader
(read and write)
boolean ColorizeRequiredColumnsInGridViewHeader
(read and write)If this property is set to
true
, the required column headers in the GridViews will have theirForeColor
property affected by theRequiredFieldsBorderColor
color.Default value:
false
This property must be determined in the web form's constructor.
This property is only available in Simple mode.
string InvalidNumberErrorMessage
(read and write)
string InvalidNumberErrorMessage
(read and write)The error message shown to the end-user when a numeric field has not been filled with a valid numeric value.
Default value:
You have entered an invalid number in the {0} field.
This value must contain
{0}
; this symbol will contain the field name.
string InvalidCurrencyErrorMessage
(read and write)
string InvalidCurrencyErrorMessage
(read and write)The error message shown to the end-user when a numeric field has not been filled with a valid currency value.
Default value:
You have entered an invalid number in the {0} field. Do not enter the currency symbol in the value.
This value must contain
{0}
; this symbol will contain the field name.
string InvalidDateErrorMessage
(read and write)
string InvalidDateErrorMessage
(read and write)The error message shown to the end-user when a date or a date/time field has not been filled with a valid date or date/time value.
Default value:
You have entered an invalid date in the {0} field.
This value must contain
{0}
; this symbol will contain the field name.
string ParamsXPath
(read-only)
string ParamsXPath
(read-only)The value of the
ParamsXPath
parameter you passed in the WorkflowGen action.Default value:
NewDataSet/Table1
boolean IsSessionLess
(read and write)
boolean IsSessionLess
(read and write)If this property is set to
true
, the ViewState will be used to store all the internal settings for WorkflowPage instead of using the Session.Default value:
false
This property must be determined in the constructor of the web form.
boolean SaveFormDataWithSchema
(read and write)
boolean SaveFormDataWithSchema
(read and write)If this property is set to
false
, the FormData will be saved without its schema.Default value:
true
This property must be determined in the constructor of the web form.
boolean RemoveValidatorsInFormArchive
(read and write)
boolean RemoveValidatorsInFormArchive
(read and write)If this property is set to
true
, all the validators will be automatically hidden in the form archive.Default value:
true
boolean ValidateRequiredFields
(read and write)
boolean ValidateRequiredFields
(read and write)If this property is set to
false
, all of the required fields' validations will be deactivated except the required fields in the GridView controls.Default value:
true
This property must be modified before the page's
OnLoadComplete
event.
ViewState and Session
WorkflowPage uses the ViewState or the Session, depending on the IsSessionLess
property, to store the EFORMASPX parameters it receives and to store some other internal settings it needs to keep, so the ViewState or the Session of the web form should never be deactivated in order to use WorkflowPage.
Be sure to never use the following ViewState or Session variable names:
WFGEN_INSTANCE_PATH
WFGEN_STORAGE_PATH
WFGEN_REPLY_TO
WFGEN_CURRENT_ACTION
WFGEN_IS_STAND_ALONE
WFGEN_GRID_VIEW_INSERTING
WFGEN_GRID_VIEW_SHOW_CANCEL
WFGEN_PARAMS_XPATH
WFGEN_BACKUP_CONTROL_FORECOLOR
WFGEN_BACKUP_CONTROL_BORDERCOLOR
WFGEN_BACKUP_CONTROL_BACKCOLOR
WFGEN_BACKUP_CONTROL_BORDERWIDTH
WFGEN_BACKUP_CONTROL_CSSSTYLE
WFGEN_BACKUP_CONTROL_CSSCLASS
WFGEN_ALL_SIMPLE_MODE_TABLES
WFGEN_ALL_SUPPORTED_CONTROLS
WFGEN_USER_TZ
WFGEN_SIMPLE_MODE_DATASET_STRUCTURE
WFGEN_VALIDATE_REQUIRED_FIELDS
USER_LANG
Last updated