ControlContext :: controlExist - Check whether control exists or not
The function searches for a subordinated control context with the name passed in sControl. When a control with the name passed has been found, the function returns true. Since control names are re-used frequently, fieldExist() might return a more precise result.
The control name might be defined as context path, which refers to the control hierarchy starting with the current control. In order to go up one or more levels in the hierarchy, a corresponding number of dots may precede the path.
controlExist("city"); // search city control in current control
controlExist("..city"); // search city control in parent-parent-control
controlExist("address.city"); // search city control in subordinated address form
A State true indicates, that the function was executed successfully. Otherwise state is false.
Implementation details
- sControl
- Control name
The control name is the name of the control resource as being defined within the parent control.
"city" // search city control in current control
"..city" // search city control in parent-parent-control
"address.city" // search city control in subordinated address form