uc-apx create region form
Insert a new form region into the target page. The region is bound to
a database table via the —table flag; APEX will auto-derive columns at
runtime. Pair with pageItem rows referencing the new region to render
editable fields.
uc-apx create region form [flags]| Flag | Type | Default | Description |
|---|---|---|---|
--column | string | Comma-separated columns to render as pageItems. Syntax: NAME[:TYPE[:LENGTH]]. TYPE ∈ varchar2 (default), number, date, timestamp, clob. LENGTH applies to varchar2 only. | |
--column-span | int | 12-col grid span for the region’s layout (0 = omit; e.g. 6 for a half-width region) | |
--dry-run | Print rendered region to stdout without writing | ||
--force | Reserved for future use | ||
--id | string | Region id (default: kebab-case of —name) | |
--name | string | Display name of the region [required] | |
--no-buttons | Skip the Cancel/Create/Save/Delete buttons that are auto-emitted when —column is set | ||
--no-processes | Skip the formInitialization / formAutoRowProcessing processes that are auto-emitted when —column is set | ||
--page | string | Target page (numeric ID, alias, or name) [required] | |
--pk-column | string | Name of the primary-key column (default: first —column entry); rendered as a hidden pageItem with primaryKey: true | |
--required-column | string | Comma-separated column names that must be non-null (emits validation.valueRequired: true and @/required-floating template) | |
--sequence | int | Layout sequence (default: max existing + 10) | |
--slot | string | body | Page slot to place the region in |
--table | string | Local-database table the form is bound to [required] |
Global Flags
Section titled “Global Flags”| Flag | Type | Default | Description |
|---|---|---|---|
--app-dir | string | . | Path to the APEX application directory |
--json-pretty | Output in pretty-printed JSON (human-readable) instead of minified JSON | ||
--toon | Output in TOON format (human-readable, token-efficient) instead of JSON |
Example Generated APEXlang
Section titled “Example Generated APEXlang”Using --dry-run to preview the generated construct (no files are written):
uc-apx --app-dir examples/brookstrut create region form --page 46 --name Edit Product --table OOW_DEMO_PRODUCTS --column PRODUCT_ID:number,PRODUCT_NAME:varchar2:100 --pk-column PRODUCT_ID --dry-runGenerated APEXlang
region edit-product ( name: Edit Product type: form source { location: localDatabase tableName: OOW_DEMO_PRODUCTS } layout { sequence: 50 slot: body } appearance { template: @/standard templateOptions: #DEFAULT# } edit { enabled: true allowedOperations: [ add update delete ] } )
pageItem P46_PRODUCT_ID ( type: hidden layout { sequence: 10 region: @edit-product slot: regionBody } source { formRegion: @edit-product column: PRODUCT_ID dataType: number primaryKey: true queryOnly: true } security { sessionStateProtection: checksumRequiredSessionLevel } )
pageItem P46_PRODUCT_NAME ( type: textField label { label: Product Name } settings { trimSpaces: none } layout { sequence: 20 region: @edit-product slot: regionBody } appearance { template: @/optional-floating templateOptions: #DEFAULT# width: 32 } validation { maxLength: 100 } source { formRegion: @edit-product column: PRODUCT_NAME dataType: varchar2 } )
button cancel ( buttonName: CANCEL label: Cancel layout { sequence: 10 region: @edit-product slot: close } appearance { buttonTemplate: @/text templateOptions: #DEFAULT# } behavior { action: definedByDynamicAction } )
button delete ( buttonName: DELETE label: Delete layout { sequence: 20 region: @edit-product slot: delete } appearance { buttonTemplate: @/text templateOptions: #DEFAULT# } behavior { executeValidations: false warnOnUnsavedChanges: doNotCheck databaseAction: delete requiresConfirmation: true } confirmation { message: Are you sure you want to delete this row? style: danger } serverSideCondition { type: itemIsNotNull item: P46_PRODUCT_ID } )
button save ( buttonName: SAVE label: Apply Changes layout { sequence: 30 region: @edit-product slot: change } appearance { buttonTemplate: @/text hot: true templateOptions: #DEFAULT# } behavior { warnOnUnsavedChanges: doNotCheck databaseAction: update } serverSideCondition { type: itemIsNotNull item: P46_PRODUCT_ID } )
button create ( buttonName: CREATE label: Create layout { sequence: 40 region: @edit-product slot: create } appearance { buttonTemplate: @/text hot: true templateOptions: #DEFAULT# } behavior { warnOnUnsavedChanges: doNotCheck databaseAction: insert } serverSideCondition { type: itemIsNull item: P46_PRODUCT_ID } )
process initialize-form-edit-product ( name: Initialize form edit-product type: formInitialization formRegion: @edit-product execution { sequence: 10 point: beforeHeader } )
process process-form-edit-product ( name: Process form edit-product type: formAutoRowProcessing formRegion: @edit-product execution { sequence: 10 } )