Deprecated. Instead of this function, use the following expression:
findHyperTarget(...) != null
This function allows you to determine, if a hypertarget matching to the specified set of keys exists somewhere in the whole generated documentation.

This function returns the correct result only during the generation phase. During the estimation phase, it always returns false.

To know exactly which phase currently is, use the generator property: output.estimationPhase

Note: Be careful when using this function (especially, within enabling conditions of template components and filtering expressions)! Incorrect use may cause the following side effects:

  • The hypertargets defined within the affected components may be generated incorrectly (therefore, hyperlinks targeted to them may never be generated).
  • If such components include Element Iterators or call Element Iterators from themselves, the generation progress bar may be distorted (which may result in a premature filling it up or, vice versa, filling only part of it when the generation is actually about to finish).

Parameters:

targetKey
targetKeys

Specifies a set of one or several keys (in the form of Array) by which the hypertarget is to be searched.

Each hypertarget is identified by a set of keys, which may be objects of any type. The keys are generated automatically for each hypertarget during the estimation phase by the FlexQuery expressions specified for each key in the hypertarget definition (within the properties of a template component).

A hypertarget is matched to the specified keys by matching those keys to the hypertarget's keys.

Any two individual keys are matched simply by comparing them using the Java method: Object.equals().

However, matching two sets of keys is not that simple. It is controlled by the next parameter.

keyMatching
Specifies how a hypertarget is matched to the specified set of keys.

The following table shows all possible values of this parameter, the meaning of each value and the sign how it is represented in the Template Designer's Document Hyperlink Dialog (where the hyperlink's keys have the same usage as in this function).

Value Meaning Sign
"sube" The specified keys must be a subset of or equal to the hypertarget's keys.

That means that each of the specified keys must have a separate equal pair among the hypertarget's keys. If any two specified keys are equal, they should match to different hypertarget's keys (e.g. if the specified keys include {"one", "one"}, the matching hypertarget must also contain two keys {"one", "one"}).

Note: This value is used by default when neither keyMatching nor strict parameter (see below) is specified.

"equiv" The specified keys must be equal to the hypertarget's keys.

This is the same as in case of "sube", however, in addition, the hypertarget must have no other keys besides those matching to the specified ones.

"supe" The specified keys must be a superset of or equal to the hypertarget's keys.

This condition is opposite to "sube". Each of the hypertarget's keys must have a separate equal pair among the specified keys. If any two hypertarget's keys are equal, they should match to different specified keys (e.g. if the hypertarget's keys include {"one", "one"}, the specified keys must also contain {"one", "one"}).

strict
Deprecated. This parameter is supported only for compatibility with old templates.

The following table shows how it is replaced with keyMatching parameter:
strict keyMatching
true "equiv"
false "sube"

Returns:

true, if the hypertarget matching the specified keys exists; false, if such a hypertarget does not exist

See Also:

documentByHyperTarget(), Array(), GOMOutputInfo.estimationPhase