HowTo: Programmatically change a TrueFalseCheckbox in IDM

0 Likes
over 11 years ago
The method how to access and change a TrueFalseCheckBox in IDM User Application forms is not exactly intuitive.
Here's how to do it:

If you have defined a custom TrueFalseCheckBox named "myCB", you can use a code snippet like this to trigger checking/unchecking the checkbox from any event.




try
{
if ( checkIt )
{
form.select( "myCB" );
}
else
{
form.select( "myCB", [ "false" ] );
}
}
catch (e) {}



Note: the "try .. catch" is used as a workaround to handle the error that may occur on some UA versions where the line

form.select( "myCB", [ "false" ] );



works as desired, but can trigger an exception.
The "try .. catch" is a workaround for this UA bug/error.


Tested on Identity Manager version 3.7.0 Build Revision 34881

Tags:

Labels:

How To-Best Practice
Comment List
Anonymous
Parents Comment Children
Related Discussions
Recommended