Content Studio Web Content Management System
SystemObject
ContentStudio.SiteCodeBase
ContentStudio.Site.ActiveScriptingActiveScriptingBase
ContentStudio.Site.ActiveScripting.DocumentPreviewDraftButton
Assembly: CS_SiteLib (in CS_SiteLib.dll) Version: 5.7.5016.0 (5.7.5016.0)
Top
Top
Top
Top
This class can only be used with Internet Explorer.
Create an instance of this object, set the properties that does not have their default values you expect and call the invoke method. The class generates inline code, thus you must wrap it into a block element in order for the resulting code to validate. This class can throw exceptions thus your code should be wrapped within try/catch statements in order to avoid the entire page to crash. The code generated is fully HTML/XHTML strict compatible.
[This is preliminary documentation and is subject to change.]
This class writes html code to the supplied stream or the default response stream.
The PreviewDraftButton class acts as the underlying engine for the PreviewDraftButton AS component and
generates an ordinary button that via java script opens a browser popup dialog that enables the caller
to preview the document just beeing edited.
Inheritance Hierarchy
ContentStudio.SiteCodeBase
ContentStudio.Site.ActiveScriptingActiveScriptingBase
ContentStudio.Site.ActiveScripting.DocumentPreviewDraftButton
Namespace: ContentStudio.Site.ActiveScripting.Document
Assembly: CS_SiteLib (in CS_SiteLib.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax
The PreviewDraftButton type exposes the following members.
Constructors
Name | Description | |
---|---|---|
PreviewDraftButton |
Constructs a new instance of the PreviewDraftButton class that writes to the default response stream
| |
PreviewDraftButton(Stream) |
Constructs a new instance of the PreviewDraftButton class that writes to the supplied stream
|
Properties
Name | Description | |
---|---|---|
BackwardsComponentCompatibilityMode |
Sets or gets a value that indicates whether the code runs in backwards
compatibility component mode. The default value is false.
(Inherited from ActiveScriptingBase.) | |
ButtonID |
Sets or gets the id attribute of the button rendered.
The default value is DefaultButtonID.
This property cannot be empty or null.
| |
ComponentName | Gets the name of the component (Overrides ActiveScriptingBaseComponentName.) | |
Conformance |
Gets a value which specifies which type of code a component can generate.
(Overrides ActiveScriptingBaseConformance.) | |
CS_DataFields |
Gets a EPTXmlParser that contains a collection of EPT field definitions and values.
This property is the replacement for the obsolete EPT_GetFieldName(String) and EPT_GetFieldValue(String) methods.
(Inherited from CodeBase.) | |
CSSClassName |
Sets or gets the name of a CSS class attribute to use to format the button rendered.
The default value is Empty which will omit the class attribute.
| |
DialogHeight |
Sets or gets a value that specifies the height (in pixels, px) of the preview dialog.
This value is effective only the first time the user calls the dialog since the dialog
remembers its last setting.
The default value is 800 and the smallest value that is accepted is DialogMinHeight.
Smaller values are automatically set to DialogMinHeight;
| |
DialogWidth |
Sets or gets a value that specifies the width (in pixels, px) of the preview dialog.
This value is effective only the first time the user calls the dialog since the dialog
remembers its last setting.
The default value is 680 and the smallest value that is accepted is DialogMinWidth.
Smaller values are automatically set to DialogMinWidth;
| |
DocumentID |
Sets or gets the id of the document to preview
The default value is zero which indicates that the component should use the current document of the document beeing edited.
This will be the value of the CS_InsertedDocumentId property.
This property must be zero or more.
| |
ElementType |
Gets a value which specifies the type of outer element the component generates.
(Overrides ActiveScriptingBaseElementType.) | |
Encoding |
Sets or gets the encoding the component uses. The default encoding is
the UTF8 encoding without byte order mark.
(Inherited from ActiveScriptingBase.) | |
Page |
A reference to the current context page.
This will initialize in the constructor of this class.
(Inherited from CodeBase.) | |
PresentationTemplateID |
Sets or gets the PresentationTemplateID property.
The default value is zero which indicates that there is no presentation template in use.
| |
RunningUserControl |
Gets the current running user control.
(Inherited from CodeBase.) | |
Text |
Sets or gets the text of the button rendered.
The default value is Empty.
|
Methods
Name | Description | |
---|---|---|
BuildHTMLComponentException |
Returns an component exception in HTML format.
(Inherited from ActiveScriptingBase.) | |
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
GenerateLinkTargetAttribute |
Returns the attribute string to be written to the link.
(Inherited from ActiveScriptingBase.) | |
GetCorrectField |
Extracts the correct value from a passed in EPT field name and a static field value.
(Inherited from ActiveScriptingBase.) | |
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
Invoke |
This method invokes the component and writes its content into the specified stream
| |
MemberwiseClone | (Inherited from Object.) | |
ReadFromApplicationCache |
Returns data that is read from the application cache.
(Inherited from ActiveScriptingBase.) | |
RenderButtonOnClickCode |
Renders the java script code that should be invoked by the html control. This is typically done in the onclick client side event.
This method is called from the RenderHtml(TextWriter) method as a part of its rendering operation.
| |
RenderHtml |
Renders the html code. This method is automatically called by the Invoke method.
This method calls the RenderButtonOnClickCode(TextWriter) method that renders the java script code that invokes the dialog.
| |
SetApplicationCache |
Stores a string in the application cache.
(Inherited from ActiveScriptingBase.) | |
SyncronizeMLC |
Provides support for components that needs to be MLC aware, by
localizing the supplied category or presentation template from the
current document, or the preferred language of the visitor.
(Inherited from ActiveScriptingBase.) | |
ToString | (Inherited from Object.) | |
WriteAttribute(TextWriter, String, String) |
Writes an attribute string to the supplied stream, unless Value is
an empty string or null (Inherited from ActiveScriptingBase.) | |
WriteAttribute(TextWriter, String, String, Boolean) |
Writes an attribute string to the supplied stream.
(Inherited from ActiveScriptingBase.) |
Fields
Name | Description | |
---|---|---|
DefaultButtonID |
Specifies the default id attribute of the rendered html button. This constant has the value CS_Preview.
| |
DialogDefaultHeight |
Specifies the default height (in pixels) of the dialog. This constant has the value 800.
| |
DialogDefaultWidth |
Specifies the default width (in pixels) of the dialog. This constant has the value 680.
| |
DialogMinHeight |
Specifies the smallest possible height (in pixels) of the dialog. This constant has the value 100.
| |
DialogMinWidth |
Specifies the smallest possible width (in pixels) of the dialog. This constant has the value 100.
|
Remarks
Create an instance of this object, set the properties that does not have their default values you expect and call the invoke method. The class generates inline code, thus you must wrap it into a block element in order for the resulting code to validate. This class can throw exceptions thus your code should be wrapped within try/catch statements in order to avoid the entire page to crash. The code generated is fully HTML/XHTML strict compatible.
See Also