![MACROMEDIA COLDFUSION 4.5-DEVELOPING WEB Скачать руководство пользователя страница 329](http://html1.mh-extra.com/html/macromedia/coldfusion-4-5-developing-web/coldfusion-4-5-developing-web_develop-manual_3286369329.webp)
Chapter 18: Building Custom CFAPI Tags
303
You are not responsible for freeing the memory allocated for the returned string set (it
will be freed automatically by ColdFusion after the request is completed).
Example
The following example retrieves the list of attributes and then iterates over the list,
writing each attribute and its value back to the user.
LPCSTR lpszName, lpszValue ;
CCFXStringSet* pAttribs = pRequest->GetAttributeList() ;
int nNumAttribs = pAttribs->GetCount() ;
for( int i=1; i<=nNumAttribs; i++ )
{
lpszName = pAttribs->GetString( i ) ;
lpszValue = pRequest->GetAttribute( lpszName ) ;
pRequest->Write( lpszName ) ;
pRequest->Write( " = " ) ;
pRequest->Write( lpszValue ) ;
pRequest->Write( "<BR>" ) ;
}
CCFXRequest::GetCustomData
LPVOID CCFXRequest::GetCustomData(void)
Gets the custom (tag specific) data for the request. This member is typically used from
within subroutines of your tag implementation to extract tag specific data from within
the request.
Returns a pointer to the custom data or returns
NULL
if no custom data has been set
during this request using
CCFXRequest::SetCustomData
.
Example
The following example retrieves a pointer to a request specific data structure of
hypothetical type MYTAGDATA:
void DoSomeGruntWork( CCFXRequest* pRequest )
{
MYTAGDATA* pTagData =
(MYTAGDATA*)pRequest->GetCustomData() ;
... remainder of procedure ...
}
CCFXRequest::GetQuery
CCFXQuery* CCFXRequest::GetQuery(void)
Retrieves the query that was passed to the tag. To pass a query to a custom tag, you use
the
QUERY
attribute. This attribute should be set to the name of an existing query
Содержание COLDFUSION 4.5-DEVELOPING WEB
Страница 1: ...Allaire Corporation Developing Web Applications with ColdFusion ColdFusion 4 5...
Страница 14: ...xiv Developing Web Applications with ColdFusion...
Страница 26: ...xxvi Developing Web Applications with ColdFusion...
Страница 34: ...8 Developing Web Applications with ColdFusion...
Страница 70: ...44 Developing Web Applications with ColdFusion...
Страница 84: ...58 Developing Web Applications with ColdFusion...
Страница 114: ...88 Developing Web Applications with ColdFusion...
Страница 148: ...122 Developing Web Applications with ColdFusion...
Страница 174: ...148 Developing Web Applications with ColdFusion...
Страница 208: ...182 Developing Web Applications with ColdFusion...
Страница 244: ...218 Developing Web Applications with ColdFusion...
Страница 274: ...248 Developing Web Applications with ColdFusion...
Страница 288: ...262 Developing Web Applications with ColdFusion...
Страница 300: ...274 Developing Web Applications with ColdFusion...
Страница 350: ...324 Developing Web Applications with ColdFusion...
Страница 362: ...336 Developing Web Applications with ColdFusion...