web.studio.upl.formfieldeditorpanel.upl Maven / Gradle / Ivy
// UPL template for form tab editor panel
// Copyright 2021-2024 FlowCentral Technologies Limited.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.
!fc-formfieldeditorpanel
dialogBodyComponents:$c{formPanel}
dialogActionLayout:$d{!ui-horizontal style:$s{width:100%;}}
dialogActionComponents:$c{dialogActionPanel}
//Form
!ui-formpanel:formPanel
layout:$d{!ui-vertical style:$s{table-layout:fixed;width:100%;}}
formCaptionSuffix:$s{:} formBinding:$g{dialogFormBinding} formColumns:2
formSection:$d{!ui-section components:$c{frmName frmColumn frmLabel frmInputWidget frmInputReference
frmPreviewForm frmColor frmSwitchOnChange frmRequired frmVisible frmEditable frmDisabled}}
!ui-text:frmName styleClass:$e{fc-formfield} caption:$m{formeditor.field.name} binding:name required:true focus:true
!ui-integer:frmColumn styleClass:$e{fc-formfield} caption:$m{formeditor.field.column} binding:column
!ui-text:frmLabel styleClass:$e{fc-formfield} caption:$m{formeditor.field.label} binding:label maxLen:64
!ui-select:frmInputWidget styleClass:$e{fc-formfield} caption:$m{formeditor.field.inputwidget} binding:inputWidget
list:studioentityfieldwidgetlist blankOption:$s{} listParams:$l{entity name dataType}
!ui-select:frmInputReference styleClass:$e{fc-formfield} caption:$m{formeditor.field.inputreference} binding:reference
list:studioentityfieldinputreflist blankOption:$s{} listParams:$l{entity name dataType}
!ui-select:frmPreviewForm styleClass:$e{fc-formfield} caption:$m{formeditor.field.previewform} binding:previewForm
list:studiopreviewformlist blankOption:$s{} listParams:$l{entity name dataType}
!ui-select:frmColor styleClass:$e{fc-formfield} caption:$m{formeditor.field.color}
list:widgetcolorlist blankOption:$s{} binding:color
!ui-checkbox:frmSwitchOnChange caption:$m{formeditor.field.switchonchange} binding:switchOnChange layoutCaption:true
!ui-checkbox:frmRequired caption:$m{formeditor.field.required} binding:required layoutCaption:true
!ui-checkbox:frmVisible caption:$m{formeditor.field.visible} binding:visible layoutCaption:true
!ui-checkbox:frmEditable caption:$m{formeditor.field.editable} binding:editable layoutCaption:true
!ui-checkbox:frmDisabled caption:$m{formeditor.field.disabled} binding:disabled layoutCaption:true
// Action buttons
!ui-panel:dialogActionPanel layout:$d{!ui-horizontal} components:$c{addBtn applyBtn cancelBtn}
!ui-button:addBtn caption:$m{button.add} styleClass:$e{fc-actbutton}
eventHandler:$d{!ui-event event:onclick action:$c{addAct}}
!ui-button:applyBtn caption:$m{button.apply} styleClass:$e{fc-actbutton}
eventHandler:$d{!ui-event event:onclick action:$c{applyAct}}
!ui-button:cancelBtn caption:$m{button.cancel}
eventHandler:$d{!ui-event event:onclick action:$c{closeDialogAct}}
//Actions
!ui-postcommand:applyAct command:apply components:$c{formPanel}
validations:$c{formValidation} refresh:$f{refreshOnApply}
!ui-postcommand:addAct command:add components:$c{formPanel}
validations:$c{formValidation} refresh:$f{refreshOnApply}
// Validations
!ui-validation:formValidation components:$c{formPanel}