web.common.upl.managerecord_io.upl Maven / Gradle / Ivy
// UPL generic base template for managing records
// Copyright 2018-2019 The Code Department.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
!ui-page caption:$s{} components:$c{manageRecordPanel}
tableSerialNumbers:true
tableRowEventHandler:$d{!ui-event event:ondblclick action:$c{prepareViewAct}}
formColumns:2 formBinding:record
!ui-panel:manageRecordPanel style:$s{height:100%;}
layout:$d{!ui-horizontal style:$s{height:100%;} widths:$l{none 100%} heights:$l{100% 100%}}
components:$c{searchPanel mainResultPanel}
// Search panel
!ui-searchcriteriapanel:searchPanel style:$s{margin-top:4px; margin-left:4px; display:block;}
layout:$d{!ui-vertical style:$s{padding-left: 8px;}}
searchLayout:$d{!ui-vertical showCaption:true captionSuffix:$s{:}}
searchClearList:$f{searchClearList} searchByList:$g{searchByList} searchPath:$n{/findRecords}
// Main result panel
!ui-switchpanel:mainResultPanel style:$s{height:100%;} components:$c{searchResultPanel crudPanel}
!ui-panel:searchResultPanel style:$s{height:100%;}
layout:$d{!ui-horizontal style:$s{width:100%;height:100%;} heights:$l{100% 100%} widths:$l{none 148px}}
components:$c{tablePanel actionsGrpPanel}
!ui-tablepanel:tablePanel style:$s{height:100%;}
layout:$d{!ui-vertical style:$s{table-layout:fixed;width:100%;height:100%;} heights:$l{100%}}
tableSerialNumbers:$f{tableSerialNumbers} tableBinding:recordList tableColumnList:$g{tableColumnList}
tableRowSelectable:true tableRowEventHandler:$f{tableRowEventHandler}
tableSelDependentList:$c{editTblBtn viewTblBtn deleteTblBtn}
tableWindowed:true tablePagination:true
tableMultiSelect:$f{tableMultiSelect} tableMultiSelDependentList:$f{tableMultiSelDependentList}
tableSortable:true
tableSelDependentList:$f{moreTableSelDependentList}
!ui-panel:actionsGrpPanel layout:$d{!ui-vertical style:$s{margin:0 auto;}} style:$s{width:100%;}
components:$c{actionPanel reportPanel}
!ui-panel:actionPanel layout:$d{!ui-vertical style:$s{width:100%;}} style:$s{margin-bottom:4px;}
components:$c{addTblBtn viewTblBtn editTblBtn deleteTblBtn}
components:$f{moreSearchActionComponentList}
components:$c{doneTblBtn}
!ui-panel:reportPanel layout:$d{!ui-vertical style:$s{width:100%;}}
components:$c{reportType reportBtn}
// Maintain Panel
!ui-panel:crudPanel style:$s{height:100%;}
layout:$d{!ui-horizontal style:$s{width:100%;height:100%;} heights:$l{100% 100%} widths:$l{none 148px}}
components:$c{crudBasePanel crudActionsGrpPanel}
!ui-panel:crudBasePanel layout:$d{!ui-vertical style:$s{table-layout:fixed;width:100%;}}
components:$c{maintainTypeLabel crudFormPanel}
!ui-label:maintainTypeLabel styleClass:$e{jk-maintaintype} binding:modeDescription styleClassBinding:modeStyle
!ui-formpanel:crudFormPanel layout:$d{!ui-vertical style:$s{table-layout:fixed;width:100%;}}
formBinding:$f{formBinding} formAttachment:$f{formAttachment}
formColumns:$f{formColumns} formSection:$f{formSection}
formSection:$d{!ui-section components:$c{frmId} hidden:true}
!ui-panel:crudActionsGrpPanel layout:$d{!ui-vertical style:$s{margin:0 auto;}} style:$s{width:100%;}
components:$c{topActionPanel bottomActionPanel}
!ui-panel:topActionPanel layout:$d{!ui-vertical style:$s{width:100%;}} style:$s{margin-bottom:4px;}
components:$c{itemOfLabel pasteFrmBtn firstFrmBtn prevFrmBtn nextFrmBtn lastFrmBtn copyFrmBtn}
components:$f{moreCrudHeaderComponentList}
!ui-panel:bottomActionPanel layout:$d{!ui-vertical style:$s{width:100%;}}
components:$c{createNextFrmBtn createCloseFrmBtn saveNextFrmBtn saveCloseFrmBtn deleteFrmBtn}
components:$c{activateFrmBtn deactivateFrmBtn cancelFrmBtn doneFrmBtn}
components:$f{moreCrudFooterComponentList}
//Common form components
!ui-hidden:frmId binding:id
//Labels
!ui-label:itemOfLabel styleClass:$e{jk-mildlabel} binding:itemCountLabel
//Action buttons
!ui-button:addTblBtn styleClass:$e{jk-button} privilege:$f{addPrivilege} caption:$m{button.add}
eventHandler:$d{!ui-event event:onclick action:$c{prepareAddAct}}
!ui-button:editTblBtn styleClass:$e{jk-button} privilege:$f{editPrivilege} caption:$m{button.edit}
eventHandler:$d{!ui-event event:onclick action:$c{prepareEditAct}}
!ui-button:viewTblBtn styleClass:$e{jk-button} privilege:$f{viewPrivilege} caption:$m{button.view}
eventHandler:$d{!ui-event event:onclick action:$c{prepareViewAct}}
!ui-button:deleteTblBtn styleClass:$e{jk-button} privilege:$f{deletePrivilege} caption:$m{button.delete}
eventHandler:$d{!ui-event event:onclick action:$c{prepareDeleteAct}}
!ui-button:doneTblBtn styleClass:$e{jk-button-alert} caption:$m{button.close}
eventHandler:$d{!ui-event event:onclick action:$c{manageDoneAct}}
//Report buttons
!ui-hidden:reportType binding:reportType
!ui-button:reportBtn styleClass:$e{jk-button} caption:$m{button.report}
eventHandler:$d{!ui-event event:onclick action:$c{preparePdfRpt}} hint:$m{hint.report}
!ui-button:firstFrmBtn styleClass:$e{jk-button} caption:$m{button.first}
eventHandler:$d{!ui-event event:onclick action:$c{firstAct}}
!ui-button:prevFrmBtn styleClass:$e{jk-button} caption:$m{button.prev}
eventHandler:$d{!ui-event event:onclick action:$c{prevAct}}
!ui-button:nextFrmBtn styleClass:$e{jk-button} caption:$m{button.next}
eventHandler:$d{!ui-event event:onclick action:$c{nextAct}}
!ui-button:lastFrmBtn styleClass:$e{jk-button} caption:$m{button.last}
eventHandler:$d{!ui-event event:onclick action:$c{lastAct}}
!ui-button:copyFrmBtn styleClass:$e{jk-button} privilege:$f{addPrivilege} caption:$m{button.copy}
eventHandler:$d{!ui-event event:onclick action:$c{copyAct}}
!ui-button:pasteFrmBtn styleClass:$e{jk-button} privilege:$f{addPrivilege} caption:$m{button.paste}
eventHandler:$d{!ui-event event:onclick action:$c{pasteAct}}
!ui-button:createCloseFrmBtn styleClass:$e{jk-button} caption:$m{button.saveandclose}
eventHandler:$d{!ui-event event:onclick action:$c{addCloseAct}}
!ui-button:createNextFrmBtn styleClass:$e{jk-button} caption:$m{button.saveandnext}
eventHandler:$d{!ui-event event:onclick action:$c{addNextAct}}
!ui-button:saveCloseFrmBtn styleClass:$e{jk-button} caption:$m{button.saveandclose}
eventHandler:$d{!ui-event event:onclick action:$c{saveCloseAct}}
!ui-button:saveNextFrmBtn styleClass:$e{jk-button} caption:$m{button.saveandnext}
eventHandler:$d{!ui-event event:onclick action:$c{saveNextAct}}
!ui-button:deleteFrmBtn styleClass:$e{jk-button} caption:$m{button.delete}
eventHandler:$d{!ui-event event:onclick action:$c{deleteAct}}
!ui-button:doneFrmBtn styleClass:$e{jk-button-alert} caption:$m{button.close}
eventHandler:$d{!ui-event event:onclick action:$c{doneAct}}
!ui-button:cancelFrmBtn styleClass:$e{jk-button-alert} caption:$m{button.cancel}
eventHandler:$d{!ui-event event:onclick action:$c{cancelAct}}
!ui-button:activateFrmBtn styleClass:$e{jk-button} caption:$m{button.activate} privilege:$f{activatePrivilege}
eventHandler:$d{!ui-event event:onclick action:$c{activateAct}}
!ui-button:deactivateFrmBtn styleClass:$e{jk-button} caption:$m{button.deactivate} privilege:$f{deactivatePrivilege}
eventHandler:$d{!ui-event event:onclick action:$c{deactivateAct}}
//CRUD actions
!ui-post:prepareAddAct path:$n{/prepareCreateRecord}
!ui-post:prepareViewAct path:$n{/prepareViewRecord} components:$c{tablePanel}
!ui-post:prepareEditAct path:$n{/prepareUpdateRecord} components:$c{tablePanel}
!ui-post:prepareDeleteAct path:$n{/prepareDeleteRecord} components:$c{tablePanel}
!ui-post:firstAct path:$n{/firstRecord}
!ui-post:prevAct path:$n{/previousRecord}
!ui-post:nextAct path:$n{/nextRecord}
!ui-post:lastAct path:$n{/lastRecord}
!ui-post:addNextAct path:$n{/createAndNextRecord} components:$c{crudPanel} validations:$c{formValidation} validations:$f{addValidations}
!ui-post:addCloseAct path:$n{/createAndCloseRecord} components:$c{crudPanel} validations:$c{formValidation} validations:$f{addValidations}
!ui-post:saveNextAct path:$n{/updateAndNextRecord} components:$c{crudPanel} validations:$c{formValidation} validations:$f{saveValidations}
!ui-post:saveCloseAct path:$n{/updateAndCloseRecord} components:$c{crudPanel} validations:$c{formValidation} validations:$f{saveValidations}
!ui-post:deleteAct path:$n{/deleteRecord} confirm:$f{deleteConfirm}
!ui-post:doneAct path:$n{/done}
!ui-post:cancelAct path:$n{/cancel}
!ui-post:activateAct path:$n{/activateRecord} components:$c{crudPanel} validations:$f{activateValidations}
!ui-post:deactivateAct path:$n{/deactivateRecord} components:$c{crudPanel} validations:$f{deactivateValidations}
!ui-post:copyAct path:$n{/copyRecord}
!ui-post:pasteAct path:$n{/pasteRecord}
// Validations
!ui-validation:formValidation components:$c{crudFormPanel}
//Other actions
!ui-post:searchAct path:$n{/findRecords} components:$g{searchByList}
!ui-post:refreshSearchAct path:$n{/refreshSearch} components:$c{searchPanel}
!ui-post:refreshFormAct path:$n{/refreshForm} components:$c{crudPanel}
!ui-post:manageDoneAct path:$n{/closePage}
//Report actions
!ui-post:preparePdfRpt path:$n{/prepareGenerateReport} components:$c{reportType} valueList:$l{PDF}