Skip to content

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]
FlagTypeDefaultDescription
--columnstringComma-separated columns to render as pageItems. Syntax: NAME[:TYPE[:LENGTH]]. TYPE ∈ varchar2 (default), number, date, timestamp, clob. LENGTH applies to varchar2 only.
--column-spanint12-col grid span for the region’s layout (0 = omit; e.g. 6 for a half-width region)
--dry-runPrint rendered region to stdout without writing
--forceReserved for future use
--idstringRegion id (default: kebab-case of —name)
--namestringDisplay name of the region [required]
--no-buttonsSkip the Cancel/Create/Save/Delete buttons that are auto-emitted when —column is set
--no-processesSkip the formInitialization / formAutoRowProcessing processes that are auto-emitted when —column is set
--pagestringTarget page (numeric ID, alias, or name) [required]
--pk-columnstringName of the primary-key column (default: first —column entry); rendered as a hidden pageItem with primaryKey: true
--required-columnstringComma-separated column names that must be non-null (emits validation.valueRequired: true and @/required-floating template)
--sequenceintLayout sequence (default: max existing + 10)
--slotstringbodyPage slot to place the region in
--tablestringLocal-database table the form is bound to [required]
FlagTypeDefaultDescription
--app-dirstring.Path to the APEX application directory
--json-prettyOutput in pretty-printed JSON (human-readable) instead of minified JSON
--toonOutput in TOON format (human-readable, token-efficient) instead of JSON

Using --dry-run to preview the generated construct (no files are written):

Terminal window
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-run
Generated 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
}
)