📄 hibernateproduction.js
字号:
isc.Label.create({ ID:"helpText", contents:"<ul>" + "<li>click a record in the grid to view and edit that record in the form</li>" + "<li>click <b>Save</b> to save changes to an edited record in the form</li>" + "<li>click <b>Clear</b> to clear all fields in the form</li>" + "<li>click <b>Filter</b> to filter (substring match) the grid based on the value of the 'Item' form value only.</li>" + "<li>click <b>Fetch</b> to fetch records (exact match) for the grid based on the value of the 'Item' form value only.</li>" + "<li>click <b>Delete</b> to delete all selected records</li>" + "<li>double-click a record in the grid to edit inline (press Return, or arrow/tab to another record, to save)</li>" + "</ul>"});// databound ListGrid// * click records to edit in boundForm and view in boundViewer// * double-click record to edit inline (Return or arrow/tab off current row to save)isc.ListGrid.create({ ID:"boundList", dataSource: supplyItemSpringDMI, height:200, canEdit:true, selectionChanged : function (record, state) { if (this.selection.anySelected()) { deleteBtn.enable(); saveBtn.setDisabled(this.selection.multipleSelected()); boundForm.editRecord(record); boundViewer.viewSelectedData(this); } else { deleteBtn.disable(); saveBtn.disable(); } }});// databound DynamicForm// * click boundList records to editisc.DynamicForm.create({ ID:"boundForm", dataSource: supplyItemSpringDMI, numCols:"6", autoFocus:false, useAllDataSourceFields: true, fields: [{name: "nextShipment", useTextField: true}]});// toolbar to perform various actions using the boundForm values (see helpText above)isc.Toolbar.create({ ID: "toolbar", membersMargin:10, buttonConstructor: "IButton", height: 22, buttons:[ {title:"Save", click:"boundForm.saveData()", ID:"saveBtn"}, {title:"Clear", click:"boundForm.clearValues();boundForm.editNewRecord();saveBtn.enable()"}, {title:"Filter", click:"boundList.filterData(boundForm.getValuesAsCriteria());"}, {title:"Fetch", click:"boundList.fetchData(boundForm.getValuesAsCriteria());"}, {title:"Delete", ID:"deleteBtn", disabled: true, click:"boundList.removeSelectedData();boundList.deselectAllRecords()"} ]}); // databound DetailViewer// * click boundList records to displayisc.DetailViewer.create({ ID:"boundViewer", dataSource: supplyItemSpringDMI});isc.VStack.create({ width:"100%", membersMargin:20, members:[ helpText, boundList, boundForm, toolbar, boundViewer]});boundList.filterData();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -