Replacing existing controls – Kofax DOKuStar Validation User Manual
Page 93
DOKuStar Validation Programming Manual
Page
• 89
Replacing Existing Controls
In a previous section we created a custom user control. As was stated there, you can create only a single new user
control, but you can replace existing controls, namely edit control and the fields control. In our example we will
replace the edit control. The appropriate service is called
UserEditData
service.
Let us replace the current edit control and use a new one for the text fields. First of all we create a new user control
and name it
Edit
.
Place an edit text box on this control. Change the color so that you can easily recognize any effects on Validation:
To be able to work with the control, it must be attached to the respective objects., e.g. to a special field type. In our
example we will attach it only to text fields. To do this, a project must be loaded in Validation. Therefore we place
the code as a function call into
dsValApp_OnProjectLoaded
:
In the function
applyEditControl
we have now to implement the necessary code. We first check if a
Validation project is already available. If this is the case we connect to the Validation field type
TextField
.
It is possible to connect to edit control elements of the
DocumentDesciptor
and elements of the
FieldDescriptor
.
TextField
is an element of the
FieldDescriptor
. For more details you should read the
chapter “Integration”.