[Top] [Prev] [Next] [Bottom] [Contents]

SaRegisterHtmlAlias

Registers a lookup string that is used as an Alias to a string registered with SaRegisterHtmlAlias so that the callback function can be invoked from an HTML client.

Synopsis

#include "SaRnHtml.h"
int SaRegisterHtmlAlias(char* aliasName, char* realName);

Arguments

aliasName
The name of the activator that will be used to look up an Alias when the cgi executable is executed.
realName
A lookup string that is registered through SaRegisterHtmlAlias.

Return Values

Returns -1 if either aliasName or realName are NULL or an empty string.

Description

Registers a lookup string that is used as an alias to a string registered with SaRegisterHtmlAlias so that the callback function can be invoked from an HTML client. Returns -1 if either aliasName or realName are NULL or an empty string. When Sapphire/Web writes the URLs for the Anchor HREFs that are bound, or the bound forms, a string is inserted which will be processed by your cgi so that the appropriate callback function can be called.

For anchors this string is contained in the HREF after "?FNC=". A callback function gets called with a Data Object is executed. its functionality is to populate a Data Site with the Column of Data from the Data Object that it is bound to. There can be one Callback/Data Site or many Data Sites in a single Callback. For example:

<A HREF="http://cezanne/cgi-
bin//s.cgi?FNC=Anchor1__Atestmod_html" >Scott</A>
In Forms, the string is contained in the VALUE part of a hidden Form Element whose name is SaSubmitName. For example:

<INPUT TYPE="hidden" NAME="SaFormName" 
VALUE="Try1__Ftestmod_html">
If this function is called more than once to the same realName string, only the first registered realName will be used to determine the dispatch function. There is no "unregister". There is no limit on how many aliasNames can be registered for the realName. The order of the calls, SaRegisterHtmlActivator and SaRegisterHtmlAlias, is unimportant in creating the "link". This mechanism allows for multiple HTML files and activators to share the same callback code, minimizing code size as well as making sure multiple copies of the same code are easily maintained. For example:

SaRegisterHtmlActivator("GroupBy__Astart_html",AGroupBy);
SaRegisterHtmlAlias("GroupBy__Astart_html","Group__ 
Adetail_html");
Note: This call is generated automatically by Sapphire/Web through use of the Alias Manager.

See Also



[Top] [Prev] [Next] [Bottom] [Contents]

info@bluestone.com
Copyright © 1997, Bluestone. All rights reserved.