CSP and HTML Tag Reference
<CSP:CLASS>
[Home]  [Next]
InterSystems: The power behind what matters   
Class Reference   
Search:    

Specifies the details of the class generated for a CSP page.
Synopsis
<CSP:CLASS SUPER="MyApp.MyPage">
Attributes
General Attributes
Attribute Description Value
DOMAIN Default value for message domain in the Domain property of the %CSP.Response object. A string.
ENCODED Query parameters for this page will be encrypted (0=no,1=yes,2=yes and remove unencrypted). “0”, “1”, or “2”.
ERRORPAGE Name of custom CSP error page. A string.
EXPIRES Default value for the Expires property of the %CSP.Response object. A string.
IMPORT A comma-delimited list of imported packages. A string.
INCLUDES A comma-delimited list of include files for the generated CSP class. A string.
PRIVATE Specifies whether this page is PUBLIC or PRIVATE. Boolean.
SUPER A comma-delimited list of superclasses. A string.
Description
The CSP:CLASS tag specifies characteristics of the class that is generated when a CSP page is compiled.
If more than one CSP:CLASS tag is used on a given CSP page, then the cumulative attribute values of all the tags are used. If the same attribute appears in multiple tags, then the value for the last tag to appear in the page is used.
Page Superclasses
Every CSP page is implemented as a Caché class. As such, it can inherit behavior (methods) from one or more superclasses. Basic CSP page functionality is provided by the %CSP.Page class, the default superclass of every CSP page. You may specify other superclasses to make specific methods available to your CSP page. You can do this using the SUPER attribute of the CSP:CLASS tag:
<CSP:CLASS SUPER="classlist">
Where classlist is a comma-delimited list of valid class names. The first class in the list must be %CSP.Page or a class that directly inherits from it. The SUPER attribute specifies the superclass of the class that generated when the CSP page is compiled; for details on class definitions, see Class Definitions in the reference Class Definitions in Caché Class Definition Reference.
For example, to specify a CSP page that inherits from a helper class called MyApp.MyMethods, use the following:
<CSP:CLASS SUPER="%CSP.Page,MyApp.MyMethods">
This is a good way to make common functionality available across a set of CSP pages.
Page Visibility
A CSP page can be public or private. Public CSP pages can start a new session, have permanent URLs that are available beyond a single session and so can be bookmarked, and can be linked to from any web page.
Private CSP pages cannot start a new session, are accessed through encoded URLs that are valid only during a single session and so cannot be bookmarked, and can only be linked to from another CSP page within the same session.
By default, CSP pages are public. You make a private CSP page using the PRIVATE attribute of the CSP:CLASS tag:
<CSP:CLASS PRIVATE="1">
In addition, you can control the “encoding” a CSP page using the ENCODED attribute.
For more information on page visibility, refer to the Authentication and Encryption section of the Using Caché Server Pages (CSP) Guide.
Import and Include Directives
For the class generated when you compile a CSP page, you can specify one or more packages to import using the IMPORT attribute:
<CSP:CLASS IMPORT="MyPackage">
Similarly, you can specify one or more Caché include (.INC) files to be used by the generated class using the INCLUDE attribute.
<CSP:CLASS INCLUDES="MyInclude">