\wfgen\wfapps\webforms
directory (e.g. \wfgen\wfapps\webforms\MyWebForm
).MyWebForm
because of these changes, you should duplicate MyWebForm
beforehand and create another IIS application. Otherwise, the two versions of the process will use the same modified MyWebForm
.\wfgen\wfapps\webforms\MyWebForm
.
MyWebForm
and choose Convert to Application.
Table1
DataTable into it. Follow these steps in order to add a new DataSet in your web project:DataTable1
as Table1
.
Default.aspx.cs
code and instantiate it in the default constructor of your class. If your class name is Form
, the code will look like this for now:web.config
file in your web project if you're using C# as your development language in the Microsoft Visual Studio IDE. In order to see complete error messages when you want to debug, you must have a web.config
file.web.config
file to your project, do the following:web.config
file:"true"
:mode="Off"
:WorkflowGen.My.dll
to your web project, then add this instruction at the beginning of your web form:WorfklowGen.My.Web.UI.WebForms
namespace.Page_Load
methodPage_Load
method is call the FillFormData()
method to fill the data in your form data. The Page_Load
is also the place to make any changes to WorkflowPage properties. You can give a DataSet or an XmlDocument to the FillFormData()
method.FillFormData()
method in the Page_Load
event will override the changes with the old data.SaveFormData()
method from WorkflowPage. You can give a DataSet or an XmlDocument to the SaveFormData()
method.Table1
of your form data by calling the SaveFieldsData(DataSet)
method. The method will try to find controls in the page that have the same IDs as the Table1
columns, and when it finds one, it will update the form data value with the control value.Table1
.WorkflowPageSubmitToWorkflow()
method. This method needs to receive your form data if you want to save it at the same time. You can also manually separate these calls by calling SubmitToWorkflow
without any parameter; however, if you do this, your form data won’t be updated if you don’t explicitly call SaveFormData(formData)
before submitting.RequiredFieldValidator
controls in your page to validate the fields that were written to the FORM_FIELDS_REQUIRED
parameter in all of your EFORMASPX actions. These validations can be put on any of the following control types:TextBox
RadioButtonList
DropDownList
ListBox
FileUpload
HtmlInputFile
RequiredFieldsErrorMessage
property. Be sure to have the {0}
symbol in your personalized message. If you don't put a {0}
tag somewhere in your message, an exception will be thrown because it wouldn't be logical to have a list of required field messages without knowing which fields need to be filled.RequiredFieldValidators
that are created have their ValidationGroup
properties set to WFGENPage
. This means that the validation of those validators will be done only if the control that triggers the validation has its ValidationGroup
property set to the same value. By default, if you have a SubmitButton
button control in your page, its ValidationGroup
is automatically modified. If you use another ID for the submit button, you have to set the ValidationGroup
yourself on it, or else the required fields won’t be validated as you would expect when submitting the page.FieldDataType
attribute, validators are automatically inserted into your page to validate the DATE and NUMERIC data types. RangeValidator
with the MinimumValue
property set to DateTime.MinimumValue
and the MaximumValue
property set to DateTime.MaximumValue
.
RangeValidator
with the MinimumValue
property set to Double.MinimumValue
and the MaximumValue
property set to Double.MaximumValue
.RangeValidator
controls have the following naming convention: WFGEN_RV_FIELD_ID
.RangeValidator
controls to validate the fields on which you have set the FieldDataType
attribute, WorkflowPage won’t automatically create a RangeValidator
for those fields.RangeValidator
controls that are created have their ValidationGroup
properties set to WFGENPage
. This means that the validation of those validators will be done only if the control that triggers the validation has its ValidationGroup
property set to the same value. By default, if you have a SubmitButton
button control in your page, its ValidationGroup
is automatically modified. If you use another ID for the submit button, you have to set the ValidationGroup
on it yourself, or else the fields won’t be validated as you would expect when submitting the page.RequiredFieldValidator
or RangeValidator
controls on the fields where you have specified the FieldDataType
attribute, and WorkflowPage will not automatically create RequiredFieldValidator
or RangeValidator
controls for those particular controls.CompareValidator
, CustomValidator
, or RegularExpressionValidator
controls), you'll need to change the ValidationGroup
properties of those validators to WFGENPage
; otherwise, the validation won't be made for the targeted controls when the form is submitted.FORM_FIELDS_READONLY
parameter. The following control types will be set to read-only or disabled if they are found in FORM_FIELDS_READONLY
:TextBox
RadioButton
RadioButtonList
CheckBox
CheckBoxList
DropDownList
ListBox
FileUpload
HtmlInputFile
FORM_FIELDS_REQUIRED
and FORM_FIELDS_READONLY
controls according to its FieldsColorization
property.FieldsColorization
property is an instance of an enumeration that can have the following values:Automatic
CSS
None
RequiredFieldsBorderColor
ReadOnlyFieldsBorderColor
ForeColor
property) modified if the color is not Color.Empty
in their corresponding properties:DropDownList
CheckBoxList
RadioButtonList
Color.Empty
in their corresponding properties.CssClass
properties as shown in the example below, which gives you much more flexibility to have the exact look you want in your web form.TextBox1
has its CssClass
property set to FieldValueCell
and it is a required field, CssClass1
will be changed to FieldValueCell-required
.
TextBox1
has no CssClass
property, CssClass
will be changed to Required
.form_archive.css
file.\css
and your form archive style sheet file should be called form_archive.css
, since WorkflowPage will look for this particular location and file name to find it, then replace the form archive styles with the styles contained in this file.FormArchiveCssPath
property, whose default value is \css\form_archive.css
. If no form_archive.css
file is created, the form archive will have the same look as the web form, but the fields will all be set to read-only or disabled.SubmitButton
ID will be automatically hidden in the form archive.FORM_FIELDS_ARCHIVE_HIDDEN
parameter. The controls listed in this parameter will automatically be hidden when creating the form archive.runat=server
in your web form will not be hidden.ChangeFormArchiveLayout()
method.GetFormArchive()
method. This method has to return a string containing the form archive's HTML.FileUpload
control in your web form, you'll want to use the SaveFileAttachment()
method in WorkflowPage. This method is used to save the file to the \upload
sub-directory in the EFORMASPX storage path and retrieve the file name of the posted file.SaveFileAttachment()
method.en-US
).
culture-code.resx
.
Strings.fr-FR.resx
would be the file name for the French language from France.System.Resources
namespace, and all your resources will automatically be strongly typed. This means that you can access all of the content of your resources files with object properties.PEOPLE_LIST
DataTable:ObjectDataSource
ObjectDataSource
in your page and link it to your business object. To do this:ObjectDataSource
onto your web form in Design view.
ObjectCreating
event to manage the ObjectDataSource
creation with the business object class.ObjectDataSource
you created in the previous step as the DataSource, and check the operations you want enabled in your GridView. (See Enabling insertion in GridViews below for instructions on how to enable inserting in the GridView.)
DataKeyNames
property if you want to enable editing and inserting in your GridView.
ID
field to read-only by clicking Edit columns... and setting the ID bound field's ReadOnly
property to True
.PEOPLE_LIST
DataTable when someone clicks on it. To do this:LinkButton
under your GridView, then double-click on the LinkButton
and add the following code to it:EditIndex
yourself if you want to enable paging and sorting in your GridView. This is because the EditIndex
is not necessarily the PEOPLE_LIST.Rows.Count - 1
when you use these functions.OnRowDeleted
and OnRowUpdated
OnRowDeleted
and OnRowUpdated
events for the GridView to update your form data upon every change. To do this, add the following code:FormData
schema and separating form data from the form parametersFormData
schemaTable1
, but you can always use another DataSet name and another DataTable name if you want. Table1
name for the DataTable, you need to use the PARAMS_XPATH
parameter in all of your actions to instruct EFORMASPX and WorkflowPage where they should locate the parameters and the form data. This parameter is an XPath that points to this table. If you name your DataSet MyFormData
and you name your default table MyParameters
, the PARAMS_XPATH
parameter should contain MyFormData/MyParameters
, otherwise your process won't work.FORM_DATA
file in your project with the same empty schema:REQUEST_FIRSTNAME
in your web form and you want to put this data in another table (e.g.MyData
), you would declare the parameter with the name /MyFormData/MyData/REQUEST_FIRSTNAME
. FORM_DATA
to your process that contains empty nodes for those parameters.Table1
of the FormData
dataset, prefixed by the ID of the user control in the page.
HEADER_UC
that contains a TextBox with the ID FIRST_NAME
, the field will be accessible through the FormData with the name HEADER_UC.FIRST_NAME
.
HEADER_UC.FIRST_NAME
field , you'll have to use this name as the parameter name in the WorkflowGen action parameter.
FORM_FIELDS_REQUIRED
parameter.