4 CHAPTER 30 Extending ColdFusion with CFX
Table 30.3 C++ Methods for Working with Attributes
METHOD DESCRIPTION
pRequest->AttributeExists(lpszName) Determines whether the specified attribute was
actually passed to the CFX tag. Returns a BOOL.
pRequest->GetAttribute(lpszName) Returns the value of the specified attribute, as it
was passed to the CFX tag. Note that all attribute
values are received by the CFX as
LPCSTR
string values.
pRequest->GetAttributeList() Returns the names of all attributes that were
actually passed to the CFX tag. The names are
returned as a
CFXStringSet, which is similar to
an array of strings.
Returning Variables and Text
Your CFX tag has the ability to include dynamically generated content in the ColdFusion page that
is calling the tag. It can also return variables to the calling page. Table 30.4 shows the Java methods
for these tasks, and Table 30.5 shows the C++ version.
Table 30.4 Java Methods for Returning Variables and Text
METHOD DESCRIPTION
request.setVariable(name, value) Returns a variable to ColdFusion with the
specified
name and value. Both name and value
must be specified as strings.
request.write(text) Includes text in the current page, just as if the
text was generated by a
<cfoutput> block. The
text must be specified as a string.
Table 30.5 C++ Methods for Returning Variables and Text
METHOD DESCRIPTION
pRequest->SetVariable(name, value) Returns a variable to ColdFusion with the
specified
name and value. Both must be specified
as
LPCSTR compatible values.
pRequest->Write(text) Includes text in the current page, just as if the
text was generated by a
<cfoutput> block. The
text must be specified as a
LPCSTR compatible
value.
Comentários a estes Manuais