Form actions
Actions for web use, is a way to replicate actions that you find in a DataEase form in Windows to the web. It it used in web buttons, but are executed by the deconnect.js engine. This document tells the action name and how it works on the web. For a form user, it should feel the same as in DataEase for Windows forms.
Only the actions with description is implemented.
DocumentOpen | DocName | This opens a new page the have the defined name in the WebServer table. The name should be the same as the ID field or the Name field in the table. You can also use the relative url defined. |
DocumentClose |
This is the same as document.back(); | |
PrintDocument | ||
PrintPreview | ||
PrinterSetup | ||
UndoEdit | ||
CutSelected | ||
CopySelected | ||
CopyRecord | ||
Paste | ||
FieldClear | ||
FormClear | Set all fields to blank and record number to -1 to indicate new record if RecordSave is called |
|
RecordSave | Save the data in from to the save record it came from or as new if -1 |
|
RecordSaveNew | ||
RecordDelete | ||
RecordRestore | ||
RefreshScreen | ||
ViewAsForm | ||
ViewAsTable | ||
FilterClear | ||
FilterSet | ||
RecordFirst | Load query model /0/ | |
RecordPrevious | Load data model /xx-1/ until you are at /0/ | |
RecordNext | Load data model /xx+1/ until you are at /last/ | |
RecordLast | Load query model /last/ | |
FormOpenRelated | TableName [DocName] |
|
ReturnToParentDoc | ||
LookupTo | TableName | |
ReturnDataToDoc | ||
RecordPreviousPage | ||
RecordNextPage | ||
SelectRecords | ||
RecordsSort | ||
SortAscending | ||
SortDescending | ||
SelectionFilter | FilterLSide FilterRSide |
|
QBM_NewReport | ||
ClearQueryFilters | ||
ClearSort | ||
AddFilterAND | FilterLSide FilterRSide |
|
AddFilterOR | FilterLSide FilterRSide |
|
ClearSelectionFilter |
To manually use these actions in a hand coded page, you will have to add the actions in a data-action attribute and add a deconnect.forminit() in you ready document function. This will check all the settings in the form and do all default functionality based on the data-somesetting in the form.
<script> $(document).ready(function() { // When the document is finished loading, we we do default form action to fetch record and activate all the buttons deconnect.forminit(); }); </script> .... <form class="form-horizontal" data-tablename="Stock" data-formtype="singerecord"> <div class="form-group"> <label for="StockCode" class="col-sm-2 control-label">Stock Code</label> <div class="col-sm-10"> <input type="text" class="form-control" id="StockCode" placeholder="Stock Code"> </div> </div> .... <div class="form-group"> <div class="col-sm-offset-2 col-sm-4"> <a class="btn btn-primary" data-action"RecordSave">Save</a> <a class="btn btn-primary" data-action"FormClear">Clear</a> <a id="delete" class="btn btn-primary" data-action"RecordDelete"">Delete</a> <a class="btn btn-primary" data-action"DocumentClose">Close</a> </div> <div class="col-sm-offset-8 col-sm-4"> <a class="btn btn-default" data-action"RecordFirst">First</a> <a class="btn btn-default" data-action"RecordPrevious">Previous</a> <a id="delete" class="btn btn-default" data-action"RecordNext"">Next</a> <a class="btn btn-default" data-action"RecordLast">Last</a> </div> </div> </form>
Example of a default form where you load the first record and can navigate, clear, create and update data in a stock table. We as showing the buttons here, to see the full form functionality have a look at the autoform document.