Newer Version Available

This content describes an older version of this product. View Latest

isCustomConsoleComponentHidden()

Determines if the application-level custom console component window is hidden. This method is available in API version 32.0 and later. In API version 31.0 and earlier, this method was called isCustomConsoleComponentWindowHidden().

Syntax

1sforce.console.isCustomConsoleComponentHidden((optional) callback:Function)

Arguments

Name Type Description
callback function JavaScript method called upon completion of the method.

Sample Code–Visualforce

1swfobject.registerObject("clippy.codeblock-1", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17<apex:page>
18
19     <A HREF="#" onClick="testIsCustomConsoleComponentHidden();return false">
20         Click here to check if the custom console component window is hidden</A> 
21
22    <apex:includeScript value="/support/console/32.0/integration.js"/>
23    <script type="text/javascript">
24        function testIsCustomConsoleComponentHidden() {
25            sforce.console.isCustomConsoleComponentHidden(checkWindowVisibility);
26        }
27        
28        var checkWindowVisibility = function checkWindowVisibility(result) {
29            //Display the window visibility
30            if (result.success) {
31              alert('Is window hidden: ' + result.hidden);
32            } else {
33              alert('Error!');
34            }
35        }
36  </script>
37
38</apex:page>

Response

This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field:

Name Type Description
hidden boolean true if the custom console component window is hidden; false if the custom console component window is visible.
success boolean true if the isCustomConsoleComponentHidden() call was successful; false if the isCustomConsoleComponentHidden() call wasn’t successful.