Initialize method: PanelController class

Syntax

Initialize(AutoUpdate)

Description

Use the Initialize method to initialize the state of the PanelController object indicating whether subsequent operations auto-update each panel (AutoUpdate = True). In addition, this method retrieves the initial settings for each panel from the server. You must invoke this method prior to any other panel controller operations. Typically, only set AutoUpdate to true when you intend to perform a single operation after invoking Initialize. When AutoUpdate is false, you must explicitly update the panels by invoking UpdatePanel.

Parameters

Parameter Description

AutoUpdate

Specifies the auto-update setting as a Boolean value.

Returns

None

Example (Single Operation)

import PT_PAGE_UTILS:*;
Local PT_PAGE_UTILS:PanelController &oPC = create PT_PAGE_UTILS:PanelController();
&oPC.Initialize( True);   /* Initialize for single operation – auto update so no need for UpdatePanel()*/
&oPC.SetSide1ModeFixed(); /* change mode to Fixed */

Example (Multiple Operation)

import PT_PAGE_UTILS:*;
Local PT_PAGE_UTILS:PanelController &oPC = create PT_PAGE_UTILS:PanelController();
/* Multiple operations to be performed – auto-update disabled */
&oPC.Initialize( False); 
&oPC.SetSide1ModeFixed(); /* Change mode to fixed  */
/* Set force mode so that the panel can be forced open in fixed or collapsed */
/* primary mode as well as secondary overlay mode. */
&oPC.UseForceOpenModeSide1( True); 
/* Set panel open (even in secondary overlay mode) */
&oPC.SetSide1OpenState( True); 
&oPC.UpdatePanel(); /* Perform all updates to Side1/Side2 panels */