Article

wschreiber's picture
article
Reads:

3054

Score:
4
4
4
 
Comments:

1

HowTo: Programmatically change a TrueFalseCheckbox in IDM

(View Disclaimer)

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


Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).

It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.




User Comments

geoffc's picture

Great articles

Submitted by geoffc on 1 July 2010 - 11:31am.

These little snippets are excellent articles! Thanks for writing them all!

© 2013 Novell