JegasAPI - Jegas, LLC - Copyright(c)2016

Unit uj_ui_stock

DescriptionUsesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

JAS Specific Functions - Stock Interface/frontend

Overview

Functions and Procedures

function saGetErrorPage(p_Context: TCONTEXT): ansistring;
Procedure RenderHtmlErrorPage(p_Context: TCONTEXT);
Procedure JASSQLTool(p_Context: TCONTEXT);
procedure Login(p_Context: TCONTEXT );
Procedure LogOut(p_Context:TCONTEXT);
procedure JAS_DeleteRecordLocks_StockUI(p_Context: TCONTEXT);
procedure JAS_DeleteTable(p_Context: TCONTEXT);
procedure JAS_CreateScreensForTable(p_Context: TCONTEXT);
procedure JAS_DeleteScreen(p_Context: TCONTEXT);
procedure JAS_DiagnosticHTMLDump(p_Context: TCONTEXT);
procedure JAS_Merge(p_Context: TCONTEXT);
procedure JAS_PromoteLead(p_Context: TCONTEXT);
procedure JAS_CopySecurityGroup(p_Context: TCONTEXT);
Procedure JAS_verifyemail(p_Context:TCONTEXT);
Procedure JAS_ResetPassword(p_Context: TCONTEXT);
Procedure JAS_Calendar(p_Context: TCONTEXT);
Procedure JAS_CreateJet(p_Context: TCONTEXT);
procedure JAS_Register(p_Context: TCONTEXT);
procedure JAS_Help(p_COntext: TCONTEXT);
procedure JAS_EmptyCache(p_COntext: TCONTEXT);

Description

Functions and Procedures

function saGetErrorPage(p_Context: TCONTEXT): ansistring;

This function is used internally by JAS to serve error pages the server may have generated based on the circumstances of the request. Pages such as Error 404 - Page Not Found for example. The files it uses are located in the (jas dir)templates/en/error/ folder. Where "en" can be whatever the current language is. So expanding JAS' error pages to other languages or customizing them is possible and fairly striaght forward.

Procedure RenderHtmlErrorPage(p_Context: TCONTEXT);

Typically you call JASError first, the call this function if you have an HTML interface.

Procedure JASSQLTool(p_Context: TCONTEXT);

This is a powerful tool for administrators to allow managing and analyzing data directly from any DBMS data source connected to JAS. To call it up: http://jas/?action=JASSQLTool

procedure Login(p_Context: TCONTEXT );

============================================================================= This function handles the userinterface and responses for the user login functionality for JAS. To cause ther code to fire directly use: http://jas/?action=Login But note that calling it alone won't do much UNLESS you are logged in when you call it. How this function works is internally it calls bJAS_CreateSession and if the session is valid upon it's return, Login redirects to the URL indicated in the (jas dir)/config/jas.cfg file's DefaultLoggedInPage's value.

Note this function does respond with context specific data in the form of text stuffed into the SNR mechanism in JAS. To see what these values are, the stock sys_login.jas html template has a fully functioning login dialog and is integrated with Login responses so they get to the user. For example: Invalid Password message See bJAS_CreateSession for more information.

Procedure LogOut(p_Context:TCONTEXT);

This function handles the userinterface for users logging out. Internally it calls bJAS_RemoveSession, if that function fails for any reason an error dialog is rendered. If it is successful, then the user is directed to the page indicated in the (jas dir)/config/jas.cfg file's DefaultLoggedOutPage's value.

procedure JAS_DeleteRecordLocks_StockUI(p_Context: TCONTEXT);

This function calls the JAS API call JAS_DeleteRecordLocks to delete the all the record locks owned by the currently logged in user. This function puts a face on it so there is output so that the user knows the action was performed.

procedure JAS_DeleteTable(p_Context: TCONTEXT);
 
procedure JAS_CreateScreensForTable(p_Context: TCONTEXT);

URI Parameters: JTabl_JTable_UID = JTable Record containing table or view you wish to make a search screen and a data screen for. Connection is figured out from this information. a data connection doesn't need to be active to make a screen for it. Name = If not passed resorts to JTable Table Name. Whether passed or not however, if the Screen Name + ' ' + 'Search' or Screen Name + ' ' + 'Data' already exists then an error is thrown.

This function might not belong in this unit - as it does it's task and returns an XML document - however because it is so integral to the User Interface - it's here.

TODO: Move this to the JASAPI side of things and make it work using the extensible xml mechanisms. e.g. i01j_api_xml.pp

procedure JAS_DeleteScreen(p_Context: TCONTEXT);

URI Parameters: JScrn_JScreen_UID = JScreen UID you wish to delete

TODO: Move this to the JASAPI side of things and make it work using the extensible xml mechanisms. e.g. i01j_api_xml.pp

procedure JAS_DiagnosticHTMLDump(p_Context: TCONTEXT);

I was having trouble toggling the debug output today - verbose, verbose local, and things weren't revealing what was wrong aside from the fact I broke it. This diagnostic tool is an attempt to FORCE the issue and end up with a useful leftover tidbit for administrators needing to look about

procedure JAS_Merge(p_Context: TCONTEXT);

Merges two records into one with interaction from user

procedure JAS_PromoteLead(p_Context: TCONTEXT);

Promotes a lead to appropriate Company and Person records, creating or merging as directed by user.

procedure JAS_CopySecurityGroup(p_Context: TCONTEXT);

This function copies an existing security group's settings into a new security group, essentially using the source group as a template.

Procedure JAS_verifyemail(p_Context:TCONTEXT);

This routine is used by the registration process to verify a user's email address

Procedure JAS_ResetPassword(p_Context: TCONTEXT);

This routine facilitates resetting a password for a user automatically if they forgot their password.

Procedure JAS_Calendar(p_Context: TCONTEXT);

This function renders an interactive month calendar that shows colored dates where open items (tasks, meetings, and calls) exist. From it you can create new tasks, calls, meetings and jump to existing ones.

Procedure JAS_CreateJet(p_Context: TCONTEXT);

This function interactively works with the user to gather information needed to create a new JAS Jet (new system). this routine handles preventing duplicates and verifying the alias name is valid and that the from email address looks like a valid email address. This function also PREVENTS a USER from creating more than one system.

procedure JAS_Register(p_Context: TCONTEXT);

This function toss out the sys_register.jas template which uses the jasapi call "register" so that dynamic toggle/hiding of the register button can be performed according to the JET's settings without needing GLOBAL SNR variables.

procedure JAS_Help(p_COntext: TCONTEXT);

This function is part of the help frame work. When linked to from various pages throughout the system, a HELPID (Help_JHelp_UID) is passed which allows looking up the jhelp table to get language sensitive HTML text, and VIDEOS to assist users with the system.

procedure JAS_EmptyCache(p_COntext: TCONTEXT);

This removes all the files and directories from the configured cache folder usually found ./jas/cache/

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