Skip to content

Load help text from the database

This operation retrieves help text from APPLICATION_HELP_MASTER / APPLICATION_HELP_DETAIL for a single reference key ( clsHelpText.GetHelpText ) or for every reference key under an application code ( clsHelpTextCollection.GetHelpTexts ), then feeds the result into a HoverHelp control.

Field Value
Operation ID OP-AJAX-07
Trigger Consumer code populating a HoverHelp control via Fill(clsHelpText), or requesting the full help-text list for an application code
Inputs IDataPortalInfo, ApplicationCode, ReferenceKeyValue (single-entry variant only)
Outputs Populated clsHelpText (single) or clsHelpTextCollection (multi-row) instance
Primary components clsHelpText.GetHelpText, clsHelpTextCollection.GetHelpTexts, HoverHelp.Fill
Entry point SAIF.Presentation.Web.Controls.AJAX.Infragistics111/clsHelpText.vb

Steps

  1. Construct Criteria(dpi, applicationCode, referenceKeyValue) and call RetrieveObject.
  2. clsHelpText.Criteria and clsHelpTextCollection.Criteria implement IBusinessCriteria, so the retrieve call is dispatched through the framework's criteria-based data-portal pipeline rather than direct ADO.NET access.
  3. Retrieve business object from criteria — uses the IBusinessCriteria instance with populated DataPortalInfo, exposed as IDataAccess.RetrieveObject(criteria).

Origin: This sub-step is implemented in IBusinessCriteria / IDataAccess.RetrieveObject (SAIF.Framework.Core) and executed on behalf of this operation. 2. BeforeRetrieve creates a request with ID BOC.RetrieveSQL, CommandType.Text, statement RetrieveSQL, and binds ApplicationCode (max 5) and ReferenceKeyValue (max 40, single-entry variant only). (BR-AJAX-017, BR-AJAX-018, SQL-001, SQL-002). Tables: APPLICATION_HELP_MASTER, APPLICATION_HELP_DETAIL. 3. Single-entry variant (clsHelpText): AfterRetrieve casts the result to clsSAIFDataReader, reads at most one row, calls Fill (mapping ApplicationCode, ReferenceKeyDescription, ReferenceKeyValue, HelpText), then MarkOld. (BR-AJAX-019) - If no row matches, the object is returned with empty-string properties rather than Nothing. 4. Multi-row variant (clsHelpTextCollection): AfterRetrieve casts the result to IDataReader and loops while rows remain, constructing a clsHelpText per row via Load, and adding it to the collection. 5. HoverHelp.Fill(inHelpObject) then assigns ContentText = inHelpObject.HelpText, ignoring a Nothing argument. (BR-AJAX-020)

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([Consumer requests help text]) --> Criteria[Construct Criteria with dpi, ApplicationCode, ReferenceKeyValue]
    Criteria --> Retrieve[IDataAccess.RetrieveObject via IBusinessCriteria]
    Retrieve --> Bind[BeforeRetrieve binds ApplicationCode / ReferenceKeyValue]
    Bind --> Exec[Execute the retrieve statement]
    Exec --> Single{Single-entry<br>variant?}
    Single -->|Yes| ReadOne[Read at most one row, Fill, MarkOld]
    Single -->|No| ReadMany[Loop rows, construct clsHelpText per row]
    ReadOne --> FillHover[HoverHelp.Fill sets ContentText]
    ReadMany --> EndCollection([clsHelpTextCollection populated])
    FillHover --> EndOne([HoverHelp content set])

Failure and edge-case behavior

  • A lookup that matches no row returns a clsHelpText with empty-string properties rather than Nothing or an exception. (BR-AJAX-019)
  • Passing a Nothing help object to HoverHelp.Fill leaves the control's existing content unchanged rather than raising a null-reference error. (BR-AJAX-020)

Sources

  • SAIF.Presentation.Web.Controls.AJAX.Infragistics111/clsHelpText.vb
  • SAIF.Presentation.Web.Controls.AJAX.Infragistics111/clsHelpTextCollection.vb
  • SAIF.Presentation.Web.Controls.AJAX.Infragistics111/HoverHelp.vb