Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Wisej.Web.HashChangedEventArgs
Namespace: Wisej.Web
Assembly: Wisej.Framework (2.5.0.0)
Provides data for the HashChanged event.
Initializes a new instance of the HashChangedEventArgs class.
Name | Type | Description |
---|---|---|
String: The hash string from the client.
Name | Description |
---|---|
Wisej.Web.Application PageCollection
Namespace: Wisej.Web
Assembly: Wisej.Framework (2.5.0.0)
Holds the collection of all top-level application pages.
Int32: Returns the total number of currently open pages.
Page: Returns the page at the specified index.
Page: Returns the first page with the specified name, the search is case insensitive.
Returns an enumerator that iterates through the open pages.
Returns: IEnumerator.
Wisej.Web.LicenseErrorEventArgs
Namespace: Wisej.Web
Assembly: Wisej.Framework (2.5.0.0)
Provides data for the LicenseError event.
Initializes a new instance of the LicenseErrorEventArgs class.
Name | Type | Description |
---|---|---|
String: Indicates the type of license error that has occurred.
Wisej.Web.LicenseErrorEventHandler
Namespace: Wisej.Web
Assembly: Wisej.Framework (2.5.0.0)
Represents the method that will handle the LicenseError event.
Name | Type | Description |
---|---|---|
Name | Description |
---|---|
Wisej.Web.Application FormCollection
Namespace: Wisej.Web
Assembly: Wisej.Framework (2.5.0.0)
Holds the collection of all top-level application forms.
Int32: Returns the total number of currently open forms.
Form: Returns the form at the specified index.
Form: Returns the first form with the specified name, the search is case insensitive.
Returns an enumerator that iterates through the open forms.
Returns: IEnumerator.
Wisej.Web.HashChangedEventHandler
Namespace: Wisej.Web
Assembly: Wisej.Framework (2.5.0.0)
Represents the method that will handle the HashChanged event.
Name | Type | Description |
---|---|---|
Name | Description |
---|---|
Wisej.Web.ResponsiveProfileChangedEventArgs
Namespace: Wisej.Web
Assembly: Wisej.Framework (2.5.0.0)
Provides data for the ResponsiveProfileChanged event.
Initializes a new instance of the ResponsiveProfileChangedEventArgs class.
Name | Type | Description |
---|---|---|
ClientProfile: The new active profile.
ClientProfile: The previously active profile.
Wisej.Web.Application
Namespace: Wisej.Web
Assembly: Wisej.Framework (2.5.0.0)
Represent a Wisej application session. Provides methods and events to manage the application in the context of the current session.
This class provides several static methods, properties and events that allow the application to manage all sorts of features related to the current session:
Save and retrieve session variable. Use to store and retrieve session variable. The property is a dynamic object and a , therefore you can access its properties directly or through the indexer.
Manage cookies. Use to manage browser's cookies.
Read server variables. Use to retrieve all the data made available by the server. Some of the variables in the collection are also available directly: , , , etc.
Read the application's URL. Use , , , and .
Read the applications's system information. Use , , , etc.
Listen to the application's global events. See , , , , , , and many more.
Retrieve browser related information. Use the to read the client browser type, OS, version, capabilities, screen size, browser size, language, and state. The object is updated automatically when the user resizes the browser or the page is reloaded.
Control the client browser. Start a , execute JavaScript functions or scriptlets using or . Make the browser navigate to a different URL using or simply the page.
Manage the main page or current desktop. lets you change the object that fills the browser and "navigate" from page to page. lets you change the active object on the client browser.
Manage all live components in the session. Through the class you can find, iterate, inspect all live components of any type. See for all the currently created (visible or invisible) instances of . returns all the created objects. and provide an easy way to find any component in the session or to iterate the list of components that match a custom expression.
Start background tasks in context. provides a powerful way to start a background task on the server that can keep interacting with the client browser while running independently.
Manage the application's theme. Use to load a Wisej theme into the application. Or use the object to read all sorts of information from the current .
Terminate the application without waiting for the session to timeout. Use to terminate the current session and free all the related memory.
This is the profile that best matches the current browser on the client. It is updated automatically on every request.
The client fingerprint is generated by hashing all the available information returned by the browser (OS, user agent, version, etc.) and it's not guaranteed to be unique.
This property attaches the window.onbeforeunload event. See https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onbeforeunload. It's not possible to determine whether the page is being unloaded because the user is trying to close the tab, close the browser, or is refreshing the page, or is taking any other action that may reload the page.
The value of this property is updated automatically when the current language changes if the value of "rightToLeft" in the application configuration file is set to "auto".
Displays a simple HTMl only debug console. Works with any browser also when the developer tools are not available.
You may also alter a global theme shared by all sessions.
Adds an event filter to monitor all the incoming events before they are routed to their respective component.
Adds the text and corresponding translation to the default locale on the client.
Instructs the browser to display a dialog with an optional message, and to wait until the user dismisses the dialog.
Executes the JavaScript function on the client.
Executes the JavaScript function on the client and receives the return value (or null) in the callback method.
Cancels the fullscreen mode.
Instructs the browser to display a dialog with an optional message, and to wait until the user either confirms or cancels the dialog. until the user dismisses the dialog.
Downloads the specified file on the client.
Downloads the specified image to the client.
Downloads the bytes in the stream to the client.
Downloads the specified file on the client.
Downloads the specified image to the client.
Downloads the bytes in the stream to the client.
Stops the polling requests from the client.
Executes the JavaScript script on the client.
Executes the JavaScript script on the client and receives the return value (or null) in the callback method.
Terminates the application and the corresponding session.
Find the first component that matches the conditions defined in the predicate function.
This method lets an application find any live component in the current session.
Finds all the components that match the conditions in the predicate function.
This method lets an application iterate through all the live components in the current session.
Loads an assembly given the file name or path.
This method loads the assembly and, if the assembly contains Wisej components that need embedded resources - like JavaScript classes or CSS styles - that are embedded in the assembly, notifies the client with the URL to load the additional resources dynamically.
Creates an instance of the specified component from the assembly.
Changes the current theme.
Returns the full file path in relation to the application's project directory.
Navigate to the specified URL.
Plays one of the built-in sounds
Plays a sound.
Executes the callback method after all processing is completed and before updating the client.
The Post() method is similar to the BeginInvoke() method used by desktop applications. It allows you to execute a block of code out of sync with the current execution flow.
Prints the specified window.
The window is printed without the caption or the borders, if present.
Prints the entire browser window.
Instructs the browser to display a dialog with an optional message prompting the user to input some text, and to wait until the user either submits the text or cancels the dialog.
Causes the application to reload on the browser.
Removes the filter from the list of registered event filters.
Requests the browser to enable fullscreen mode if supported.
Executes the callback in context.
Sets the current session timeout in seconds.
Instructs the client to start polling the server for UI changes at the specified interval when a WebSocket connection is not available.
Throws:
Note that you don't have to specify the type in the angular brackets, the compiler will automatically detect the type from the return value of the asynchronous function.
Executes the optional callback in context and pushes all the pending updates to the client when in WebSocket mode.
Use this method when you need to update the client asynchronously from an out-of-bound thread (different thread, not originating from a client request). You can call this method at the end of the code that updates the UI:
Or you can use the optional action function to enclose the code that updates the UI in a block and ensure that the client is updated when the code block exits:
The default behavior built-in Wisej is to display a dialog asking the user to prolong the session. Set Handled to true to stop the default behavior.
Name | Description |
---|---|
There is a lot more exposed by the class. You can inspect all the properties and methods in Visual Studio through IntelliSense or online at .
: Returns or sets the current client responsive profile.
: Returns or sets the client browser information.
Deprecated: Deprecated, please use Application.ClientId instead. : Returns the unique client "fingerprint" ID. It can be used to distinguish client devices.
: Returns the current unique client id.
: Returns a collection of all the unique client browsers using the application.
: Returns the path for the application data that is shared among all users.
: Returns the registry key for the application data that is shared among all users.
: Returns the company name associated with the application stored in the .
: Returns the current .
: Collection of cookies.
: Returns the application component instance that an application can store and use later to restore the context when updating client widgets during an out-of-bound call using
Threads that are not started using don't have any knowledge of the current session and don't have a way to communicate with the client The property returns the instance of the class that is bound to the current session. It can be used just like any other component with or to restore the session for the current thread. The advantage of using instead of the instance of a control or a page is to avoid to keep a reference to a component that may be disposed by the application.
: Returns or sets the current for the session.
: Returns or sets the current Desktop.
: Returns or sets whether the browser will ask the user to confirm unloading the current page.
: Returns the path for the application's main assembly.
: Returns or sets the favicon to display in the browser.
: Returns or sets the URL to the favicon to display in the browser.
: Returns or sets the hash part of the URL on the client.
: Returns a value indicating whether the session has been authenticated.
: Indicates that the current application instance, which corresponds to the session, has been terminated and disposed.
: Returns true when the current session has expired.
: Returns true if this session is running in secure mode (https:// and wss://)
: Returns true when the current session has been terminated.
: Returns true if the current session is connected using WebSocket.
: Returns or sets the runtime server license key.
Setting the programmatically has to be done before the application is loaded. The best place is the static constructor for the Program static class, or the static constructor of the main window (if defined in Default.js).
: Returns or sets the current full page window.
: Returns a collection of open forms owned by the application.
: Returns a collection of open pages owned by the application.
: The name of the currently loaded platform.
: Returns the product name associated with this application.
: Returns the product version associated with this application stored either in or .
: Returns the parameters used to launch the application.
: Returns or sets whether all the controls in the applications should operate using the right-to-left mode.
: Returns true when the application is running in not in design, debug or test mode.
: Returns the server's host name, DNS alias, or IP address as it would appear in self-referencing URLs.
: Returns the port number to which the request was sent.
: Returns the server variables.
: Provides a generic storage for session-based objects.
: Returns the total number of currently active sessions.
: Returns the unique current session ID.
: Shows or hides the debug console on the browser.
: Returns or sets whether the browser is blocked by the Ajax loader.
: Returns the root path of the web application.
: Returns the URI used to start the application.
: Returns the URL used to start the application.
: Returns or sets the current .
You can create and modify a new custom theme using the class. The new theme can be based on an existing theme, can be empty, or can be initialized from a JSON string.
: Returns or sets the page title in the browser.
: Returns the current used either to launch or reload the application. It may be different from .
: Returns the current URL used either to launch or reload the application. It may be different from .
: Returns the security information for the current request.
: Returns the raw user agent string of the client browser.
: Returns the IP host address of the remote client.
: Returns the DNS name of the remote client.
: Returns the type for the current user.
: Gets a sorted string array of client language preferences.
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Returns: . An awaitable that represents the asynchronous operation.
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Asynchronously executes the JavaScript function on the client and returns an awaitable with the result of the remote call.
Parameter | Type | Description |
---|
Returns: . An awaitable that represents the asynchronous operation.
Parameter | Type | Description |
---|
Returns: . An awaitable that represents the asynchronous operation.
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Asynchronously executes the JavaScript script on the client and returns an awaitable with the result of the remote call.
Parameter | Type | Description |
---|
Returns: . An awaitable that represents the asynchronous operation.
Parameter | Type | Description |
---|
Returns: . The first qualified by the match expression.
Parameter | Type | Description |
---|
Returns: . The list of instances qualified by the match expression.
Parameter | Type | Description |
---|
Returns: . The loaded .
Parameter | Type | Description |
---|
Returns: . An instance of a Wisej component implementing the interface.
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Returns: .
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Returns: . The full path relative to the current application's root directory.
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Returns: . An awaitable that represents the asynchronous operation.
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Calling this method when is true has no effect. Use client side polling when you know that your code will start a background task that needs to update the client asynchronously (push updates) and your server or clients don't support WebSocket connections. Once the background tasks are completed call to reduce the incoming requests from the client.
The interval specified is less than 1.
Starts a new task within the current application context and returns immediately. See also .
Parameter | Type | Description |
---|
Returns: . An awaitable .
The task runs in the background but it's still capable of updating the client asynchronously when working with WebSocket by calling the method to push the UI updates to the client browser. If you want to support background updates for clients or servers that can't use the WebSocket connection, you can either add a component to the parent container to force period requests to the server, or you can use the and methods.
Starts a new task with a return value within the current application context and returns immediately. See also .
Parameter | Type | Description |
---|
Returns: .
The task runs in the background but it's still capable of updating the client asynchronously when working with WebSocket by calling the method to push the UI updates to the client browser. The generics overload of allows the task to return a value. You can use this with the async/await pattern and asynchronously wait for the task to complete. If you want to support background updates for clients or servers that can't use the WebSocket connection, you can either add a component to the parent container to force period requests to the server, or you can use the and methods.
Starts a bound to the current session context.
Parameter | Type | Description |
---|
Returns: . An instance of .
You must save a reference to the returned or the Garbage Collector will stop and dispose the timer. To alter the invocation period user Timer.Changer(), or stop the timer simply use Timer.Dispose(). See .
Parameter | Type | Description |
---|
Fired when the active window changes.
Fired when the application is about to shut down.
Fired when the application is reloaded in the browser because the user hit refresh or changed the URL.
Fired when the application is started, after the Main method is called.
Fired when the browser fires the "beforeinstallprompt" event. Corresponds to .
Fired at the beginning of every request.
Fired when the user resizes the browser.
Fired when the user activates the browser tab.
Fired when the user deactivates the browser tab.
Fired when the changes.
Fired at the end of every request.
Fired when the focused control changes.
Fired when the hash part of the URL changes on the client side.
Fired when the current thread has completed processing all the events and before the response is sent back to the client.
Fired when a license error occurs.
Fired when the active responsive profile is changed.
Fired when the value changes.
Fired when the session is about to time out.
Fired when the current theme is changed.
Fired when a thread exception is thrown.
Name | Description |
---|
sender
The source of the event.
e
A LicenseErrorEventArgs that contains the event data.
Fired when a license error occurs.
sender
The source of the event.
e
A HashChangedEventArgs that contains the event data.
Fired when the hash part of the URL changes on the client side.
Represents the method that will handle the Application.ResponsiveProfileChanged event.
sender
The source of the event.
e
A ResponsiveProfileChangedEventArgs that contains the event data.
Fired when the active responsive profile is changed.
Fired when the active responsive profile is changed.
filter |
text | The text to translate. |
translation | The translation override. |
message | A string you want to display in the alert dialog. |
function | The name of the function to execute. |
args | The arguments to pass to the function. |
function | The name of the function to execute. |
callback | Asynchronous callback method that receives the return value. |
args | The arguments to pass to the function. |
function | The name of the function to execute. |
args | The arguments to pass to the function. |
message | A string you want to display in the confirm dialog. |
filePath | The file to download. |
fileName | The name of the file to save on the client. |
image | The image to download. |
fileName | The name of the file to save on the client. |
stream | The stream to send to the client. |
fileName | The file name the client will use to save the stream. |
target | Specifies where to open the file. Leave empty or use "_self" to open in the current tab, _blank to open in a new tab. |
filePath | The file to download. |
fileName | The name of the file to save on the client. |
target | Specifies where to open the file. Leave empty or use "_self" to open in the current tab, _blank to open in a new tab. |
image | The image to download. |
fileName | The name of the file to save on the client. |
target | Specifies where to open the file. Leave empty or use "_self" to open in the current tab, _blank to open in a new tab. |
stream | The stream to send to the client. |
fileName | The file name the client will use to save the stream. |
script | The script to evaluate. |
script | The script to evaluate. |
callback | Asynchronous callback method that receives the return value. |
script | The script to evaluate. |
match |
match |
filePath | The file name or full path for the assembly to load. |
filePath | The file name or full path for the assembly to load. |
className |
packages |
callback |
packages |
name | Name of the theme resource. Use only the name without the path and without the extension. |
mixins | Optional list of theme mixins. If null, the default theme mixins are always applied. |
path |
url | URL to navigate to. |
target | The target browser window: _self, _blank, etc. |
type |
soundUrl | A string representing either a sound file URL or a base64 data URL. |
callback | Method to invoke after the request has completed but before sending the response to the server. |
window | The window to print |
message | A string of text to display to the user. |
defaultValue | An optoional string containing the default value displayed in the text input field. |
filter |
context |
action | Function to execute in context. The code in the function can access all the static Application properties when executed from an out-of-bound thread. |
seconds |
interval | Polling interval in milliseconds. The minimum is 1000ms. |
action | Start method invoked by the new task when it starts up. |
T |
action | Start method invoked by the new task when it starts up. |
dueTime | The amount of time, in milliseconds, to delay before invoking the callback . |
period | The time interval between invocations, in milliseconds. |
callback | A callback method to invoke at the specified intervals. |
context |
action | Function to execute in context. The code in the function can access all the static Application properties when executed from an out-of-bound thread. |
All wisej components implement this interface. |
value
Initial hash value.
Represents the method that will handle the HashChanged event.
Represents the method that will handle the LicenseError event.
error
License error.
oldValue
Previous ClientProfile.
newValue
New active ClientProfile.
An object that implements the interface to add to the filter list.
A custom expression used to match the to find.
A custom expression used to match the list of objects to find.
One of value that identifies the sound to play.
An object that implements the interface to remove from the filter list.
The application context to update. It can be any Wisej component or the returned by the property .
The application context to update. It can be any Wisej component or the returned by the property .