Tuesday, March 27, 2012

Bread crumb bar event firing

 
//Add new variable and parm method to info class
Class declaration
boolean                 addressBarEvent; 

boolean parmAddressBarEvent(boolean _addressBarEvent = addressBarEvent)
{
    ;
    addressBarEvent = _addressBarEvent;
    return  addressBarEvent;
}

Do a forward compile

//Add a container object and parse the path to check if the user has selected change company option.
//If Yes, set the parm method info class.
\Classes\SysTaskRecorder_AddressbarEvents\fire_BreadcrumbBarNodeNavigate

    container   conStr;     infolog.parmAddressBarEvent(false);
    conStr = str2con(path,"\\");
    if (conlen(conStr)== 2)
        infolog.parmAddressBarEvent(true);
    
Do a forward compile

//In change default company check if the info parm method is set and perform the required action.
\Classes\Application\setDefaultCompany
    if (dialog)
    {
        //set the applicable user groups
        CAP_UserCompanyGroupServer::addUserGroupList();
        SysSecurity::reload(false);
        //infolog.runStartupMenu();
    }
    else if (infolog.parmAddressBarEvent())
    {
        //set the applicable user groups
        CAP_UserCompanyGroupServer::addUserGroupList();
        SysSecurity::reload(false);
        //infolog.runStartupMenu();
        infolog.parmAddressBarEvent(false);        
    }