The ComindView global is the main entry point for client-side logic. It is available inside views/logic/index.ts and is typed in api/typings/cmw-client.ts. For usage patterns and examples, see View logic. For server-side equivalents, see Server-side API.
Properties
| Property | Type | Purpose |
|---|
ComindView.action | string | Current action name (e.g. 'add', 'edit') |
ComindView.actionMode | string | Form mode - 'mass-edit', 'editable', 'editing', 'full-form', 'plain-with-comment', 'plain' |
ComindView.workspace | object | Current workspace context with .alias, .current_user_id, .group_participants, .tabs |
ComindView.schema | object | Loaded app schema - fields, actions, lookups, publishing_alias |
ComindView.currentUser | object | User info - .id, .email, .isWorkspaceAdmin, .isGlobalAdmin, .isInGroup(name) |
ViewLogic methods
These methods are defined in your views/logic/index.ts export. See View logic for the export pattern and detailed examples.
Lifecycle hooks:
| Method | Purpose |
|---|
onReady() | Form loaded and ready |
onRefresh() | Form data refreshed |
onDestroy() | Form being destroyed |
onReset() | Form reset |
onBeforeSave() | Pre-save validation - return false or an error string to block save |
onGridLoaded() | Embedded grid finished loading |
onInputChange() | Field value changed |
Dynamic field control:
| Method | Purpose |
|---|
getInvisibleFields() | Return field names to hide |
getRequiredFields() | Return field names to make required |
getReadonlyFields() | Return field names to make read-only |
getFilterKeys() | Filter keys for lookups |
getFieldOverrides() | Override field schema properties dynamically |
helperFunction() | Register helper functions |
Record navigation
Methods for traversing the record hierarchy. Parent, child, and sibling accessors return data synchronously from the already-loaded context. The async methods fetch records on demand.
| Method | Purpose |
|---|
ComindView.parentRecord(fieldName?) | Access parent record data |
ComindView.childRecords(appAlias?, fieldName?) | Access child records |
ComindView.siblingRecords() | Access sibling records |
ComindView.getLinkedRecordAsync(fieldName) | Async fetch of a linked record |
ComindView.getRecordById(id) | Async fetch any record by ID |
Settings and variables
| Method | Purpose |
|---|
ComindView.getVars() | Get app variables (workspace-level, set by admin) |
ComindView.getSetting(name) | Get an app setting value |
Grid methods
Methods for working with embedded child grids.
| Method | Purpose |
|---|
ComindView.addGridRow(values, appAlias?, fieldName?) | Programmatically add a row to an embedded grid |
Requests
| Method | Purpose |
|---|
ComindView.request(url, config?) | HTTP request from the browser |
UI utilities
| Method | Purpose |
|---|
ComindView.uiUtils.getFgHexColorByBg() | Get foreground color for a given background |
ComindView.uiUtils.safeDigest() | Safely trigger Angular digest cycle |
ComindView.uiUtils.setTabCounter() | Set a counter badge on a tab |
Related pages
- View logic - developer patterns for using these methods in
views/logic/index.ts
- Actions - server-side action definitions that complement client-side hooks
- Fields - field db names, types, and the options catalog
- Server-side API - global variables and functions available in server-side logic