Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions docs/4DQodlyPro/gettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ All the [configuration requirements](#requirements) can be automatically set for
- Only settings that need to be edited are listed in the dialog box.
- Since scalable sessions run in preemptive mode, enabling this setting might require that you evaluate the [thread-safety property](https://developer.4d.com/docs/Develop/preemptive-processes#writing-a-thread-safe-method) of your code.
- Activating the "forceLogin" mode might require that you reconfigure the REST accesses, [as explained in this blog post](https://blog.4d.com/force-login-becomes-default-for-all-rest-auth/).
- If 4D's [user settings](https://developer.4d.com/docs/settings/overview#enabling-user-settings) are enabled, pay attention to the fact that active settings will be configured.

:::

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
298 changes: 163 additions & 135 deletions docs/4DQodlyPro/pageLoaders/components/textinput.md

Large diffs are not rendered by default.

41 changes: 41 additions & 0 deletions docs/4DQodlyPro/pageLoaders/events/bindingActionToEvents.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ After binding a standard action to a qodlysource with an event, follow these ste
| | Set Value | ![SetValue](./img/standardAction_setValue.png) | Update the qodlysource with a new value, which can be a String, Number, Boolean, Date, Array, or Object (with JSON validity). Note that this will trigger any configured OnChange event for the qodlysource. |
| | Clear | ![Clear](./img/standardAction_clear.png) | Erase the content within the qodlysource |
| | Reset | ![Reset](./img/standardAction_reset.png) | Resets the qodlysource to its initial value |
| Scalar (Number) | Increment | ![Increment](./img/standardAction_increment.png) | Increments the qodlysource's value |
| | Decrement | ![Decrement](./img/standardAction_decrement.png) | Decrements the qodlysource's value |
| Entity Selection | Order By | ![Order By](./img/standardAction_orderBy.png) | Specify one or more attributes to sort and select direction |
| | Query | ![Query](./img/standardAction_query.png) | The query is provided as a string and supports the same syntax as an [ORDA query](../../../QodlyinCloud/qodlyScript/guides/queries.md), except for formula (`eval`) and the `settings` object. Placeholders can be used with qodlysources or data as-is |
| | Reload | ![Reload](./img/standardAction_reload.png) | Reload the entire entity selection from the server |
Expand Down Expand Up @@ -523,6 +525,45 @@ Consider a function called `product.productManual`, which is exposed with the `o
For further details, refer to the [Dialog](../components/dialog.md) section.
:::

## Binding Qodly Pro Actions

<Column.List align="center" justifyContent="between">
<Column.Item width="55%">
Components within a Page can be configured to trigger Qodly Pro events. By choosing the <code>Add a Qodly pro action</code> in a component's event configuration, you can define the following:
</Column.Item>
<Column.Item width="40%">
<img src={require('./img/qodlyProAction.png').default} style={{borderRadius: '6px'}} />
</Column.Item>
</Column.List>

<Column.List align="center" justifyContent="between">
<Column.Item width="55%">
The type of action:
<br/><br/>
<ul>
<li><strong>Authentication</strong>: This action logs the user out of the rendered app<br/></li>
<li><strong>4D Code</strong>: This action allows you to call 4D function shared through the [WA SET CONTEXT](https://developer.4d.com/docs/fr/commands/wa-set-context) when running the qodly page inside a Web Area in a 4D Form</li>
</ul>
</Column.Item>
<Column.Item width="40%">
<img src={require('./img/qodlyProAction2.png').default} style={{borderRadius: '6px'}} />
</Column.Item>
</Column.List>

### Authentication

<img src={require('./img/qodlyProActionLogout.png').default} style={{borderRadius: '6px'}} />

The Authentication type has the logout function to log the user out of the app.

### 4D Code

<img src={require('./img/qodlyProAction4dContext.png').default} style={{borderRadius: '6px'}} />

The user can type in the name of the function they want to execute and also add params and bind the result the same way they would do calling a [Class Functions](#class-functions)



## Providing feedback

To provide feedback within the user interface, enable the `Provide Feedback` checkbox. This feature allows the backend to communicate with the user by displaying relevant messages regarding the outcomes of different functions or standard actions.
Expand Down
1 change: 1 addition & 0 deletions docs/4DQodlyPro/pageLoaders/events/eventsManagement.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ To bind class functions, navigation actions or standard actions with events, fol
- [Navigation Action](./bindingActionToEvents.md#binding-navigation-actions-to-events): Set up actions related to navigation within the application, such as opening another page or redirecting to an external URL.
- [Class Function](./bindingActionToEvents.md#binding-class-functions-to-events): Use a custom function to handle the event.
- [Dialog Action](./bindingActionToEvents.md#binding-dialog-actions-to-events): Configure to trigger dialog-related events.
- [Qodly Pro Action](./bindingActionToEvents.md#binding-dialog-actions-to-events): Configure to trigger Qodly Pro specific events.

4. **Action Bound to Event**: In the list of available events, you will notice a purple bullet <img src={require('./img/events_purpleBullet.png').default} style={{borderRadius: '6px', width: '22%'}} /> displayed on the left side of events that have already been configured (if any).

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/4DQodlyPro/pageLoaders/events/img/events_actions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 66 additions & 11 deletions docs/4DQodlyPro/pageLoaders/events/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@ title: Overview

import Column from '@site/src/components/Column'


Events serve as a mechanism for initiating specific actions, often employed to trigger particular behaviors. They collaborate with various actions to establish dynamic interactions within an application.

For instance, when a user interacts with a webpage by clicking a button, you have the flexibility to determine the response, whether it involves invoking a function or opening another webpage. Furthermore, events can be activated in response to [updates in a Qodly Source](#qodly-source-events).

Within Qodly Studio, events play a pivotal role in executing code on the Qodly web server, without requiring any supplementary JavaScript.



## Types of Events

Events can be set to trigger either when end-users perform specific actions or when qodlysources are updated.
Expand All @@ -24,11 +21,70 @@ You can configure events to activate in response to specific actions performed b

Typical user events include `On Click`, `On DblClick`, `On MouseEnter`, `On Keyup`, and others. The available events may vary depending on the selected component, and detailed documentation can be found in the **Triggers and Events section** on each component's page.

Certain events, such as **On KeyDown** and **On KeyUp**, have a dedicated configuration interface for defining **keyboard shortcuts**. This allows you to bind specific key combinations (for example, `Ctrl+S` or `Shift+⌘`) to trigger a function when those keys are pressed.

### Opening the Shortcut Setup

In the **Events** panel of a component, events like `On Keydown` and `On Keyup` display a small gear icon beside their function selector.
Clicking this icon opens a tooltip labeled **“Shortcuts setup”**.

_Example:_

![Shortcuts setup tooltip](./img/shortcuts-setup.png)

### Keyboard Shortcuts Dialog

Selecting **Shortcuts setup** opens the **Keyboard Shortcuts** dialog.

Inside the dialog, you can define one or more key combinations that will trigger the selected function.

![Empty keyboard shortcut dialog](./img/keyboard-shortcuts-empty.png)

- The dialog prompts: **“Press your key (Ctrl+S...)”** — this field listens for key input.
- Press the desired key combination (for example, `Shift + ⌘` on macOS).
- The detected combination appears in the input field.

### Adding Shortcuts

Once a key combination is entered, click the **“+”** button to add it.
Each shortcut appears below the field as a labeled chip (for example, `Shift+⌘`).

![Adding a keyboard shortcut](./img/keyboard-shortcuts-add.png)

You can:

- Add multiple shortcuts.
- Remove a shortcut using the **“x”** icon next to it.
- Save your configuration by clicking **Save**.

When a shortcut is defined, the **Save** button becomes active.

![Shortcut added and ready to save](./img/keyboard-shortcuts-save.png)

### Cancelling or Clearing

If you want to discard changes or remove all shortcuts, click **Cancel**.
This will close the dialog without saving modifications.

### App events

#### onSessionExpired

Triggered when the session is no longer valid. This happens in the following situations:
• The server restarts
• The user has been inactive for a certain period of time
• A request fails due to an expired or invalid session

#### onSessionExpireReminder

Triggered after a configurable period of inactivity to warn the user before the session expires. The delay can be adjusted using a simple minute selector with plus and minus controls.

![OnSessionExpiredConfig](./img/onSessionExpired.png)

### Qodly Source events

Besides events triggered by end-user actions, events can also be automated to respond when qodlysources undergo changes. Qodly Sources support two distinct events: the `On Change` event and the `On Init` event.


#### On Init

The `On Init` event is triggered when the Qodly Source is instantiated by the renderer. It provides an opportunity to set up an initial value for the Qodly Source. Actions or function calls bound to the `On Init` event should focus solely on initializing that specific Qodly Source.
Expand All @@ -37,12 +93,12 @@ The `On Init` event is triggered when the Qodly Source is instantiated by the re

When the `On Change` event is linked to a Qodly Source, it will trigger in the following scenarios:

|Trigger|Description|
|---|---|
|Qodly Source|<li>The reference pointed to by the qodlysource changes in the web browser (not on the server)</li><li>The entity is [touched](../../../QodlyinCloud/qodlyScript/EntityClass.md#touched)</li>|
|Entity Qodly Source|The contents of the entity attribute change|
|Entity Selection Qodly Source| <li>The reference pointed by the qodlysource changes in the web browser (not on the server)</li><li>An entity is added to the entity selection</li>|
|Scalar Qodly Source|The contents of the scalar qodlysource change|
| Trigger | Description |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Qodly Source | <li>The reference pointed to by the qodlysource changes in the web browser (not on the server)</li><li>The entity is [touched](../../../QodlyinCloud/qodlyScript/EntityClass.md#touched)</li> |
| Entity Qodly Source | The contents of the entity attribute change |
| Entity Selection Qodly Source | <li>The reference pointed by the qodlysource changes in the web browser (not on the server)</li><li>An entity is added to the entity selection</li> |
| Scalar Qodly Source | The contents of the scalar qodlysource change |

## Circular Dependency Risk

Expand All @@ -63,4 +119,3 @@ This creates a loop:
Change → On Change Event → Reload Standard Action → Change → On Change Event → Reload Standard Action → ...

This loop continues indefinitely until Qodly Studio runs out of resources or crashes, leading to the application freezing.

2 changes: 1 addition & 1 deletion docs/4DQodlyPro/qodlyStudioInterface.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ When you first step into Qodly Studio, you'll immediately encounter a user-frien
- <img src={require('./img/qodly-studio-shared-icon-explorer-assets-folder.png').default} alt="Qodly Studio Shared icon in the Explorer panel, representing the folder where developers store static assets like local images and downloadable files, accessible via /$shared or QodlyScript." style={{borderRadius: '6px'}} /> Shared: Use this folder to store any contents (local images, downloadable files...) you might need within your app. The contents of this folder can be accessed from Qodyy pages using the [`/$shared` link](pageLoaders/events/bindingActionToEvents.md#shared-folder) or from the QodlyScript language using the [`/SOURCES/Shared`](../QodlyinCloud/qodlyScript/basics/lang-pathnames.md#filesystem-pathnames) file path.
- <img src={require('./img/qodly-studio-debugger-icon-explorer-error-tools.png').default} alt="Qodly Studio Debugger icon in the Explorer panel, giving access to built-in debugging tools that help identify and resolve development errors efficiently." style={{borderRadius: '6px'}} /> [Debugger](./debugging.md): Provides a suite of debugging tools that address different types of errors during the development phase.
- <img src={require('./img/qodly-studio-roles-privileges-icon-explorer-access-control.png').default} alt="Qodly Studio Roles & Privileges icon in the Explorer panel, used to configure and manage access controls that restrict data visibility based on user roles." style={{borderRadius: '6px'}} /> [Roles And Privileges](./roles/rolesPrivilegesOverview.md): Plays a pivotal role in enforcing data access restrictions within your application, ensuring that the right users access the right data.
- <img src={require('./img/overview_model.png').default} alt="Defines how data is accessed and stored within structures referred to as datastore classes." style={{borderRadius: '6px'}} /> [Model](../QodlyinCloud/cloudOnlyFeatures/model/model-editor-interface.md) **(Enabled in Cloud configuration only)** Data model editor.
- <img src={require('./img/overview_model.png').default} alt="Defines how data is accessed and stored within structures referred to as datastore classes." style={{borderRadius: '6px'}} /> Model (disabled).
- <img src={require('./img/qodly-studio-settings-icon-explorer-app-configuration.png').default} alt="Qodly Studio Settings icon in the Explorer panel, used to access application-specific configuration options for managing app behavior and preferences." style={{borderRadius: '6px'}} /> [Settings](./settings.md): Offer options to configure application-specific settingdds.


Expand Down
28 changes: 19 additions & 9 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ Thank you for helping us improve! 🚀
return `https://github.com/qodly/docs/issues/new?title=${encodeURIComponent(title)}&body=${encodeURIComponent(body)}`
},

includeCurrentVersion: isProduction ? false : true, // false for prod only
versions:
{
'21-R2': {label: '21 R2 BETA', banner: 'none',},
'21': {label: '21', banner: 'none',},
},
},
blog: {
// showReadingTime: true,
Expand Down Expand Up @@ -142,8 +148,10 @@ Thank you for helping us improve! 🚀
title: 'Docs', //Docs
logo: {
alt: 'Qodly',
src: 'img/qodly-light-version.svg',
srcDark: 'img/qodly-dark-version.svg',
src: 'img/4DQodlyPro-black-on-transp.png',
srcDark: 'img/4DQodlyPro-light-on-transp.png',
//src: 'img/qodly-light-version.svg',
//srcDark: 'img/qodly-dark-version.svg',
},
items: [
//
Expand Down Expand Up @@ -182,18 +190,19 @@ Thank you for helping us improve! 🚀
label: 'Qodly Cloud',
},
*/

//
{
type: 'docsVersionDropdown',
position: 'right',
//dropdownItemsAfter: [{to: '/versions', label: 'All versions'}],
//dropdownItemsAfter: [{to: '/versions', label: 'All versions'}],
dropdownActiveClassDisabled: true,
versions:
{
current: {label: 'next'},
'21': {label: '21 BETA'},
'R10': {label: '20 R10'},
},
// versions:
// {
// current: {label: 'test'},
// '21-R2': {label: '21 R2 BETA'},
// '21': {label: '21'},
// },
/*
dropdownItemsAfter: [
{
Expand All @@ -216,6 +225,7 @@ Thank you for helping us improve! 🚀
],
*/
},

],
},
footer: {
Expand Down
Binary file added static/img/4DQodlyPro-black-on-transp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/4DQodlyPro-light-on-transp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,36 @@ This command launches the Qodly renderer on a local address in your default brow




## Using Qodly debugger on 4D Server

When using Qodly pages in a deployed 4D Server application (interpreted mode), you might encounter some cases where you need to debug your pages on the server, for example when a specific user configuration is required. In this case, you can attach the [Qodly Studio debugger](https://developer.qodly.com/docs/studio/debugging) to the 4D Server and then, benefit from its features when executing your Qodly pages.

Note that in this case, the Qodly Studio debugger will display all the code executed on the server, in accordance with the [attached debugger rule on 4D Server](https://developer.4d.com/docs/Debugging/debugging-remote#attached-debugger).

To attach the Qodly Studio debugger to your running 4D Server application:

1. [Open Qodly Studio](#opening-qodly-studio) from 4D Server.

:::note

The project must be running in interpreted mode so that **Qodly Studio** menu item is available.

:::

2. In the Qodly Studio toolbar, click on the **Debug** button.<br/>
![qodly-debug](./img/qodly-debug.png)

If the debug session starts successfully, a green bullet appears on the button label ![qodly-debug](./img/debug2.png) and you can use the Qodly Studio debugger.

If the debugger is already attached to a another machine or another Qodly Studio page, an error is displayed. You have to detach it beforehand from the other location.

To detach the Qodly Studio debugger from your running 4D Server application:

1. Click the **Debug** button in the Qodly Studio toolbar while a debug session is active.
A warning dialog box will prompt you to confirm whether you want to detach the debugger.
2. Select **Keep in progress** to continue evaluating the code until the end of the current method or function before detaching the debugger, or **Stop** to detach the debugger immediately.




Loading