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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions agents/framework/Web/UI/ActiveControls/INDEX.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ AJAX-enabled controls for the Prado framework. ActiveControls trigger server-sid
| `TActiveFileUpload` | TFileUpload | Async upload via hidden iframe; `OnFileUpload` event |
| `TActiveDatePicker` | TDatePicker | Date picker with `OnDateChanged` callback |
| `TInPlaceTextBox` | (custom) | Click-to-edit label; `LoadTextOnEdit` option |
| `TInPlaceDropDownList` | TActiveDropDownList | Click-to-edit label over a hidden select; `OnLoadingItems` event |
| `TInPlaceListBox` | TActiveListBox | Click-to-edit label over a hidden multi-select; joins selected texts with `SelectionSeparator` |
| `TInPlaceControlTrait` | (trait) | Shared in-place surface: `AutoHideEditor`, `DisplayEditor`, `EditTriggerControlID`, `EmptyDisplayText`, label ID |
| `TInPlaceListControlTrait` | (trait) | Shared select-based in-place surface for the drop down list and list box (label sync, rendering, callback options) |
| `TActiveCustomValidator` | TCustomValidator | Server-side validation via callback |
| `TTimeTriggeredCallback` | (no UI) | Timer-based callback; `Interval`, `StartTimerOnLoad` |
| `TValueTriggeredCallback` | (no UI) | Polls a JS expression; fires callback when value changes |
Expand Down
4 changes: 4 additions & 0 deletions agents/framework/Web/UI/ActiveControls/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ AJAX-enabled controls triggering server-side processing via XMLHttpRequest callb

- **`TInPlaceTextBox`** — Click-to-edit label; `LoadTextOnEdit` option.

- **`TInPlaceDropDownList`** — Click-to-edit label over a hidden select; `OnLoadingItems` event.

- **`TInPlaceListBox`** — Click-to-edit label over a hidden multi-select; joins selected texts with `SelectionSeparator`.

- **`TActiveCustomValidator`** — Server-side validation via callback.

- **`TTimeTriggeredCallback`** / **`TValueTriggeredCallback`** / **`TEventTriggeredCallback`** — Timer/poll/event-based callbacks.
31 changes: 31 additions & 0 deletions agents/framework/Web/UI/ActiveControls/TInPlaceDropDownList.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Web/UI/ActiveControls/TInPlaceDropDownList

### Directories
[framework](../../../INDEX.md) / [Web](../../INDEX.md) / [UI](../INDEX.md) / [ActiveControls](./INDEX.md) / **`TInPlaceDropDownList`**

## Class Info
**Location:** `framework/Web/UI/ActiveControls/TInPlaceDropDownList.php`
**Namespace:** `Prado\Web\UI\ActiveControls`
**Since:** 4.4.0

## Overview
Click-to-edit drop down list that displays as a label showing the selected item text. Clicking the label swaps to the server-rendered (hidden) select element. The select's `change` event posts a callback that raises `OnSelectedIndexChanged` and `OnCallback`, updates the label, and re-hides the select when `AutoHideEditor` is true; losing focus leaves edit mode. The label carries the control's CssClass, style, and ToolTip. Shares the label/editor swap machinery with `TInPlaceTextBox` through `TInPlaceControlTrait` (PHP) and `Prado.WebUI.TInPlaceControlBase` (JS, `inlineeditor.js`), which owns the instance registry keyed by editor client ID.

## Key Properties/Methods

- `getAutoHideEditor()` / `setAutoHideEditor($value)` - Hide the select after blur (default true); from `TInPlaceControlTrait`
- `getDisplayEditor()` / `setDisplayEditor($value)` - Show/hide the select; from `TInPlaceControlTrait`
- `getEditTriggerControlID()` / `setEditTriggerControlID($value)` - External trigger control ID
- `getReadOnly()` / `setReadOnly($value)` - Prevent entering edit mode
- `getEmptyDisplayText()` / `setEmptyDisplayText($value)` - Label html when the selection has no text; the label carries a `data-prado-empty` mark so the client tells the placeholder apart from a value
- `onLoadingItems($param)` - Event raised to load the item list from the server on edit
- `setSelectedValue($value)` / `setSelectedIndex($index)` - Also update the client-side label during callbacks
- `getClientClassName()` - Returns `Prado.WebUI.TInPlaceDropDownList`

## Accessibility

The label is rendered as an operable button (`role="button"`, `tabindex="0"`) with `aria-live="polite"`; Enter/Space enter edit mode, and focus returns to the label after an Enter/Escape/change commit. A read-only control renders the label as plain text (no button role). The editor takes its accessible name from `ToolTip` (sent as the `EditorLabel` option). Shared via `TInPlaceControlTrait::renderLabelAccessibilityAttributes` (PHP) and the base class in `inlineeditor.js` (JS).

## See Also

- [TInPlaceTextBox](./TInPlaceTextBox.md), [TInPlaceListBox](./TInPlaceListBox.md), [TActiveDropDownList](./TActiveDropDownList.md)
31 changes: 31 additions & 0 deletions agents/framework/Web/UI/ActiveControls/TInPlaceListBox.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Web/UI/ActiveControls/TInPlaceListBox

### Directories
[framework](../../../INDEX.md) / [Web](../../INDEX.md) / [UI](../INDEX.md) / [ActiveControls](./INDEX.md) / **`TInPlaceListBox`**

## Class Info
**Location:** `framework/Web/UI/ActiveControls/TInPlaceListBox.php`
**Namespace:** `Prado\Web\UI\ActiveControls`
**Since:** 4.4.0

## Overview
Click-to-edit list box that displays as a label showing the selected item texts. Clicking the label swaps to the server-rendered (hidden) select, which may allow multiple selection. In multiple mode the label joins the selected item texts with `SelectionSeparator`, and the selection accumulates across clicks and commits on blur (leaving the editor) — an individual toggle does not post, so a multi-item selection can be built interactively. A single-selection list box commits on change like the drop down list. The committing callback raises `OnSelectedIndexChanged` and `OnCallback`; the label follows the server's selection on any callback (the client-side snapshot for revert keys on option index, so duplicate option values are handled correctly). When nothing is selected the label shows `EmptyDisplayText` and carries a `data-prado-empty` mark. Shares the select-based in-place surface with `TInPlaceDropDownList` through `TInPlaceListControlTrait` (PHP) and `Prado.WebUI.TInPlaceDropDownList` (JS, its base class in `inlineeditor.js`).

## Key Properties/Methods

- `getSelectionSeparator()` / `setSelectionSeparator($value)` - Text between selected item texts in the label (default ", ")
- `getAutoHideEditor()` / `setAutoHideEditor($value)` - Hide the select after blur (default true); from `TInPlaceControlTrait`
- `getDisplayEditor()` / `setDisplayEditor($value)` - Show/hide the select; from `TInPlaceControlTrait`
- `getEditTriggerControlID()` / `setEditTriggerControlID($value)` - External trigger control ID
- `getReadOnly()` / `setReadOnly($value)` - Prevent entering edit mode
- `getEmptyDisplayText()` / `setEmptyDisplayText($value)` - Label html when nothing is selected
- `onLoadingItems($param)` - Event raised to load the item list from the server on edit
- `getClientClassName()` - Returns `Prado.WebUI.TInPlaceListBox`

## Accessibility

The label is rendered as an operable button (`role="button"`, `tabindex="0"`) with `aria-live="polite"`; Enter/Space enter edit mode, and focus returns to the label after an Enter/Escape/change commit. A read-only control renders the label as plain text (no button role). The editor takes its accessible name from `ToolTip` (sent as the `EditorLabel` option). Shared via `TInPlaceControlTrait::renderLabelAccessibilityAttributes` (PHP) and the base class in `inlineeditor.js` (JS).

## See Also

- [TInPlaceDropDownList](./TInPlaceDropDownList.md), [TActiveListBox](./TActiveListBox.md)
13 changes: 9 additions & 4 deletions agents/framework/Web/UI/ActiveControls/TInPlaceTextBox.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,22 @@
**Namespace:** `Prado\Web\UI\ActiveControls`

## Overview
Click-to-edit text box that displays as a label until clicked. When clicked, transforms into a text input for editing. Supports loading text from server via callback before allowing edit, and can auto-hide the textbox after losing focus.
Click-to-edit text box that displays as a label until clicked. When clicked, transforms into a text input for editing. Supports loading text from server via callback before allowing edit, and can auto-hide the textbox after losing focus. The client-side input honors the full `TTextBoxMode` set (Date, Number, Email, Color, etc.), matching `TTextBox` type rendering. Shares the label/editor swap machinery with `TInPlaceDropDownList` through `TInPlaceControlTrait` (PHP) and `Prado.WebUI.TInPlaceControlBase` (JS, `inlineeditor.js`).

## Key Properties/Methods

- `getAutoHideTextBox()` / `setAutoHideTextBox($value)` - Hide textbox after blur (default true)
- `getDisplayTextBox()` / `setDisplayTextBox($value)` - Show/hide edit textbox
- `getAutoHideEditor()` / `setAutoHideEditor($value)` - Hide textbox after blur (default true); `AutoHideTextBox` is a deprecated alias
- `getDisplayEditor()` / `setDisplayEditor($value)` - Show/hide edit textbox; `DisplayTextBox` is a deprecated alias
- `getEditTriggerControlID()` / `setEditTriggerControlID($value)` - External trigger control ID
- `getReadOnly()` / `setReadOnly($value)` - Make control non-editable
- `getEmptyDisplayText()` / `setEmptyDisplayText($value)` - Label html when the text is empty (since 4.4.0, via `TInPlaceControlTrait`); the label carries a `data-prado-empty` mark so the client tells the placeholder apart from a value
- `onLoadingText($param)` - Event raised to load text from server before editing
- `getClientClassName()` - Returns `Prado.WebUI.TInPlaceTextBox`

## Accessibility

The label is rendered as an operable button (`role="button"`, `tabindex="0"`) with `aria-live="polite"`; Enter/Space enter edit mode, and focus returns to the label after an Enter/Escape/change commit. A read-only control renders the label as plain text (no button role). The editor takes its accessible name from `ToolTip` (sent as the `EditorLabel` option). Shared via `TInPlaceControlTrait::renderLabelAccessibilityAttributes` (PHP) and the base class in `inlineeditor.js` (JS).

## See Also

- [TActiveTextBox](./TActiveTextBox.md), [TCallback](./TCallback.md)
- [TActiveTextBox](./TActiveTextBox.md), [TCallback](./TCallback.md), [TInPlaceDropDownList](./TInPlaceDropDownList.md)
Loading
Loading