Skip to main content
Version: 4.1

JavaScript

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.1.0.0)

Allows controls to execute javascript code.

public class JavaScript : Component, IExtenderProvider

Constructors

Instance member JavaScript()

Initializes a new instance of the JavaScript without a specified container.

Instance member JavaScript(container)

Initializes a new instance of the JavaScript class with a specified container.

NameTypeDescription
containerIContainerAn IContainer that represents the container of the JavaScript extender.

Properties

Instance member Tag

Object: Returns or sets the object that contains programmer-supplied data associated with the JavaScript extender. (Default: null)

Methods

Instance member CanExtend(target)

Returns true if the JavaScript extender can offer an extender property to the specified target component.

ParameterTypeDescription
targetObjectThe target object to add an extender property to.

Returns: Boolean. true if the JavaScript class can offer one or more extender properties; otherwise, false.

Instance member Clear()

Removes all scripts.

Protected member Dispose(disposing)

Disposes the component and removes it from the design container.

ParameterTypeDescription
disposingBooleantrue when this method is called by the application rather than a finalizer.

Instance member GetJavaScript(control)

Retrieves the JavaScript code associated with the specified control. The JavaScript code will be execute on the client when the control is created or refreshed.

ParameterTypeDescription
controlControlThe Control for which to retrieve the JavaScript code.

Returns: String. A String containing the javascript code for the specified control.

Instance member GetJavaScriptEvents(control)

Returns the collection of JavaScript event handlers associated with the control.

ParameterTypeDescription
controlControlThe Control to attach the JavaScript event handlers to.

Returns: ClientEventCollection.

Instance member GetJavaScriptSource(control)

Retrieves the JavaScript file associated with the specified control. The JavaScript code will be execute on the client when the control is created or refreshed.

ParameterTypeDescription
controlControlThe Control for which to retrieve the JavaScript file.

Returns: String. A String containing the name of the javascript file for the specified control.

Protected member OnWebRender(config)

Renders the client component.

ParameterTypeDescription
configObjectDynamic configuration object.

Instance member SetJavaScript(control, script)

Associates JavaScript code with the specified control.

ParameterTypeDescription
controlControlThe Control to associate the JavaScript with.
scriptStringThe JavaScript code to execute when the control is created.

Instance member SetJavaScriptSource(control, file)

Associates JavaScript file with the specified control.

ParameterTypeDescription
controlControlThe Control to associate the JavaScript file with.
fileStringThe JavaScript file to execute when the control is created.

Implements

NameDescription
IUserDataProvides access to the UserData and Tag properties associated to the component implementing this interface.
IWisejComponentAll wisej components implement this interface.
IWisejSerializableAllows an object to serialize itself.