JegasAPI - Jegas, LLC - Copyright(c)2016

Unit uj_menusys

DescriptionUsesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

JAS Specific Functions

Overview

Functions and Procedures

Procedure ReplaceJASMenuWithMenu(p_Context: TCONTEXT);
Function bJMenuRender( p_Context: TCONTEXT; Var p_saResult: AnsiString; Var p_saPanel: AnsiString; Var p_saMenutitle: AnsiString; p_MENUDL: JFC_DL; p_u8MenuID: Uint64; p_u8UserID: Uint64; p_u8Method: UInt64; p_u8MenuRootID: Uint64 ): Boolean;
Function bCreateAndLoadJMenuIntoDL(Var p_DL: JFC_DL; p_DBC: JADO_CONNECTION):Boolean;
Function bEmptyAndDestroyJMenuDL(Var p_DL: JFC_DL):Boolean;
Procedure LoadJMenuPath( p_Context: TCONTEXT; Var p_PATHXDL: JFC_XDL; p_MenuDL: JFC_DL; p_u8MenuID: Uint64 );

Description

Functions and Procedures

Procedure ReplaceJASMenuWithMenu(p_Context: TCONTEXT);

This function handles rendering and caching the global nav menu

Drawing method used for GlobalNav (S-N-R <!–@JAS-MENU-->) is method 3 Horizontal - 2 level Tab navigation (Worked with original JAS theme) Horizontal - 3 TRaditional Menu Navigation

Function bJMenuRender( p_Context: TCONTEXT; Var p_saResult: AnsiString; Var p_saPanel: AnsiString; Var p_saMenutitle: AnsiString; p_MENUDL: JFC_DL; p_u8MenuID: Uint64; p_u8UserID: Uint64; p_u8Method: UInt64; p_u8MenuRootID: Uint64 ): Boolean;

This routine "primes the pump" for a recursive loop that does the traversing thorugh the menu hierarchy.

Function bCreateAndLoadJMenuIntoDL(Var p_DL: JFC_DL; p_DBC: JADO_CONNECTION):Boolean;

This function Instantiates and loads the the PASSED JFC_XDL class with the jmenu table from the default global connection information loaded and assigned to gaJCon in the jcore module.

Again - Call this function with a UN-INSTANTIATED JFC_XDL NOTE: To Properly Clean Up This JFC_XDL, Call the oppposite routine bEmptyAndDestroyJMenuDL which handles the house work. The house work has to do with the rtJMenu structure being allocated in memory dynamically, and the pointers are maintained in the JFC_XDL.Item_lpPtr.

Function bEmptyAndDestroyJMenuDL(Var p_DL: JFC_DL):Boolean;

NOTE: This function does Check that the passed p_DL is not NILL upon entry and will return false (failed) if that is the case but the nature of pointers in general is that if you aren't caustious and call this function when the class wasn't instantiated properly you will bomb out of the program likely. See: bCreateAndLoadJMenuIntoDL

Procedure LoadJMenuPath( p_Context: TCONTEXT; Var p_PATHXDL: JFC_XDL; p_MenuDL: JFC_DL; p_u8MenuID: Uint64 );

NOTE: This Menu PATH DL is not Related to the gJMenuDL or the rContext.JMenuDL (copies of the master gJMenuDL), and is actually for storing information about the full path of a given MENU ID. The storage mechanism is "Use a lean JFC_DL, but typecast the JFC_DL.Item_lpPTR field as an LongInt, and store the JMenu_JMenu_UID's there.

This function is recursive so it is important that the menu it's diciphering is correct or you get into an infinate loop. The menu needs to be hierarchial.

You need to call this procedure with: p_Context structure alive and well as done by JAS when creating CGI threads. p_PATHDL instantiated as JFC_DL to be loaded with menu ids in lpPTR field p_JMenuDL either NIL (Then it uses the p_Context.JMenuDL) or a JFC_DL instantiated specifically by the bCreateAndLoadJMenuIntoDL function. p_iMenuID to begin bottom up path interrogation.

http://www.jegas.com
Generated by PasDoc 0.14.0.