Home > Class Reference > ENSLIB namespace > EnsPortal.RecordMapper
Private  Storage   


class EnsPortal.RecordMapper extends EnsPortal.Template.devPage

RecordMapper Development Page. This page lets users construct a RecordMap definition (used to pull data out of flat files and map them into an object representation).


Parameters Properties Methods Queries Indices ForeignKeys Triggers
6 27 83


This is a Zen Page class. It belongs to the application EnsPortal.Application.

%condition %controller %import %includeFiles
%map %page %resource HelpAddress
ISREADONLY LocatorHeader ParentURL StdTitle
aboutPage align aux backgroundTimerInterval
blockSuperEvent canEdit canViewFileSystem cellAlign
cellSize cellStyle cellVAlign children
composite contactPage containerStyle controller
controllerId cssLevel currItem currItemType
currSortMode currStep currViewMode currentNamespace
currentProject currentUser disabled dragAndDrop
dragEnabled dropEnabled enableAutoRefresh enclosingClass
enclosingStyle errNameCollision error generatedClasses
groupClass groupStyle hasSCOutput height
hidden hint hintClass hintStyle
home homePage id index
keepAliveInterval label labelClass labelDisabledClass
labelPosition labelStyle lastLoc layout
lblTitle limitPopups msgAddSeparator msgDocReadOnly
msgMakeComposite msgMakeCompositeTooltip msgNotPermitted name
needProject onafterdrag onbeforedrag onclick
ondrag ondrop onhide onnotifyView
onrefresh onshow onupdate pageModified
parent readOnly readOnlyReason recordAsName
recordMap renamed sampleFile searchKey
showLabel showSample slice sourceControlEnabled
sourceControlManagerDialog sourceControlNewlineFormat sourceControlOutputDialog sourceControlVisible
studioMode tipAddField tipCSVWizard tipCompile
tipContractAll tipDelete tipExpandAll tipExport
tipGen tipImport tipImportLegacy tipMoveItemDown
tipMoveItemUp tipNew tipOpen tipRemoveItem
tipSave tipSaveAs title tuple
useSVG useSoftModals valign visible
width window zenPersistentPopup

%AddCSPShareHyperevents %AddChild %AddChildAfter %AddChildBefore
%AddComponent %AddEnsExceptionHandler %AddImportedComponents %AddLocatorLinks
%AddToSaveSet %ApplyURLParms %Attr %BindExport
%ClassIsLatestVersion %ClassName %ConstructClone %DispatchClassMethod
%DispatchGetModified %DispatchGetProperty %DispatchMethod %DispatchSetModified
%DispatchSetMultidimProperty %DispatchSetProperty %DrawAutoLogout %DrawClassDefinitions
%DrawComponentHTML %DrawHTML %DrawHTMLPage %DrawJSStrings
%DrawObjectDefinitions %DrawSourceControlCommands %DrawSourceControlHead %DrawSourceControlJS
%DrawSourceControlStyle %EnclosingDivId %EndBackgroundMethod %EndScript
%Eval %EvalC %Extends %ForceClientRender
%GetChildIndex %GetComponent %GetComponentById %GetComponentByName
%GetEventHandlers %GetHomePage %GetHomeParam %GetLinks
%GetLocatorLinks %GetPageName %GetParameter %GetProductName
%GetRootLink %GetValueById %GetValueByName %GetXMLName
%IsA %IsModified %Link %LinkCSS
%LinkScript %MakeId %New %NormalizeObject
%ObjectModified %OnAddToPageAfter %OnAddToPageBefore %OnAfterCreatePage
%OnBeforeCreatePage %OnCreateApplication %OnCreatePage %OnDetermineCSSLevel
%OnDrawEnclosingDiv %OnDrawHTMLBody %OnDrawHTMLHead %OnDrawHTMLMeta
%OnDrawObjectProperties %OnFinishBackgroundTask %OnGetPageName %OnGetProductName
%OnGetSmallMenu %OnGetTitle %OnMonitorBackgroundTask %OnMutateChildren
%OnObjectSynch %OnPreHTTP %OnSubmit %OnUseSoftModals
%OnZENDeserialize %OriginalNamespace %PackageName %QuoteValue
%QuoteValueL10N %Register %RemoveChild %RemoveChildren
%RemoveComponent %RemoveFromSaveSet %RunBackgroundMethod %Self
%SerializeObject %SetBackgroundMethodStatus %SetErrorById %SetErrorByName
%SetModified %SetValueById %SetValueByName %SetValuesByName
%StartScript %ValidateObject %ZENVersion AfterUserAction
AppendSourceControlOutput BuildMenu CheckAllBlanks CheckContextLinks
CheckEnterpriseManager ClearSourceControlOutput Composite ConvertParameter
CreateProject CreateSourceControl Decrypt DoLogout
DocumentLoad DocumentSave DrawLocator DrawRibbon
DrawSampleData DrawTableHeader DrawTitle Encrypt
EscapeHTML EscapeURL EvalResult Field
GetCSPURL GetContextLinks GetCurrentProject GetDefaultDir
GetDocURL GetFullProjectName GetHomePage GetHyperEventResources
GetInternalName GetLastMap GetNewURL GetQuickLinks
GetRecordDefinition GetSourceControlClass GetSourceControlCommands GetTimestamp
HaveSourceControlOutput HyperEventCall HyperEventHead Include
InsertHiddenField InsertHiddenFields IsDocReadOnly IsEnabled
IsPrivate IsProjectRequired IsSourceControlReadOnly IsSubclassOf
Link LoadProject LoadSampleFilename OnDrawRibbon
OnGetRibbonInfo OnHTTPHeader OnPage OnPageError
OnPostHTTP OnPostHyperEvent OnPreHTTP OnPreHyperEvent
Page QuoteJS Record RegisterRecent
RewriteURL SaveSampleFilename SetCurrentProject SetDefaultDir
SetLastMap SetProjectRequired ShowError SimpleKeepAlive
StartTimer StopTimer SubmitHandler ThrowError
UnescapeHTML UnescapeURL UpdateSCMenus UserAction
XMLDTD XMLExport XMLExportToStream XMLExportToString
XMLNew XMLSchema XMLSchemaNamespace XMLSchemaType
addChild addChildAfter addChildBefore addItem
addPopupSuffix addSeparator addUndoAction adjustSizes
appendServerOutput applyDetails arrowClick canUndo
canUserModify cancelPopup changePassword changeSampleFile
changeTargetClassname changeURLNamespace checkEdit checkStudioHyperEvents
checkTextControls childrenMutated chooseSCMenu chooseSCProject
clearSCOutput clearUndoBuffer clientKeepAlive cloneObject
correctIELayering createComponent createComponentNS createSCMenuItem
createSCProject createSCSubMenu deleteComponent deleteRecordMap
disableCommandButton doSave dragFinishHandler dragHandler
dragNotifyHandler dragStartHandler dropHandler dropStartHandler
editSimpleBatch enableCommandButton endModal escapeCData
exposeComponent findElement findRowForItem fireOnResizeEvent
fireOnUnloadEvent fireOnUpdateEvent firePopupAction fixDocumentTitle
getCSSForType getChildIndex getClientModel getComponent
getComponentById getCompositeDepth getController getCurrentExtension
getCurrentLocation getCurrentName getEnclosingDiv getHidden
getHintElement getIsReadOnly getLabelElement getLastName
getNextName getOpener getPageTitle getProperty
getReadOnlyReason getRecordDepth getRecordObject getRowDetail
getSaveAction getSettings getTitleAreaHeight getType
goHome goMenu gotoNamespace gotoPage
grayOutButtons hideCommandButton inResizeLoop initPopupSuffix
initializeSourceControl initializeTextMonitor invokeAfterUserAction invokeSourceControl
invokeSuper isOfType itemSelected launchPopupWindow
loadCSVWizard loadDocument loadEditor logout
makeId moveItem navigate newRecordMap
onBatchClassChange onCreate onDelete onDisplayHandler
onDocumentLoad onDocumentLoadComplete onDocumentReload onDocumentSave
onDocumentSaveComplete onEndModalHandler onFieldNameChange onFieldTypeChange
onIgnoreFieldChange onPaddingCharChange onPopupAction onRecEscapingChange
onRecTermChange onRecordTypeChange onRefreshContents onSerialize
onServerMethodCall onServerMethodError onServerMethodReturn onStartModalHandler
ondisabledHandler onkeydownHandler onkeyupHandler onlayoutHandler
onloadHandler onlogoutHandler onoverlayHandler onresizeHandler
onunloadHandler onupdateHandler openRecordMap popupActionHandler
raiseEvent refreshContents reloadDocument removeChild
removeItem removePopupSuffix removeSeparator render
renderContents renderSVG reverseString rowClick
saveDocument saveRecordMap searchBlur searchBoxHandler
searchFocus searchKeyDown searchKeyPress selectItem
selectNewItem sendEventToController setComponentId setConnectivityStatusMsg
setControllerId setDescription setFieldType setHidden
setModified setOverlayMode setPageTitle setProperty
setPropertyAll setReadOnly setResultsDiv setSCProject
setSortMode setSortModeHandler setTraceOption setViewMode
setViewModeHandler showAbout showCommandButton showContact
showDocumentation showHelp showSCMenu showSCOutput
startKeepAlive startModal startProgressBar stopKeepAlive
stopProgressBar switchNamespace textControlKeyDown textControlKeyUp
toggleDisclosure toggleReadOnly toggleSVGElements toggleSampleDiv
undo updateDocumentState updateJSONSCReadOnly updateLastName
updateSCIndicator updateTable validateHexChars validateRecord


• parameter CSSINCLUDES = "ensemble/Ensemble_RecordMapper.css";
Comma-separated list of additional CSS include files for the page. If this page is using CSS3 then the CSS3INCLUDES parameter is used (if defined).
• parameter DEFAULTVIEWMODE = "list";
If this page has multiple views, this is its initial display mode.
• parameter EDITRESOURCE = "%Ens_Code:WRITE,%Ens_RecordMap:WRITE";
User needs WRITE permissions on either the %Ens_Code or the %Ens_RecordMap resource to make changes on this page.
• parameter JSINCLUDES = "zenCSLM.js";
Comma-separated list of additional JS include files for the page.
• parameter PAGENAME = "Record Mapper";
Displayed name of this page.
• parameter RESOURCE = "%Ens_Code:READ,%Ens_RecordMap:READ";
User needs READ permissions on either the %Ens_Code or the %Ens_RecordMap resource to view this page.


• property %map as EnsLib.RecordMap.Model.Record;
Property to temporarily contain model during page load.
• property blockSuperEvent as %ZEN.Datatype.integer;
Temporary flag to indicate when a new item has been added to the RecordMap. The flag is used to ensure the item is selected after being created, by stopping the row containing the "add" button from selected after creating the new item.
• property canViewFileSystem as %Boolean [ InitialExpression = $system.Security.Check("%Ens_ViewFileSystem","USE") ];
Is the user permitted to access the fileSelect popup.
• property currItem as %ZEN.Datatype.integer [ InitialExpression = -1 ];
ID (index number, 0-based) of current selected item.
• property currItemType as %ZEN.Datatype.string;
Type of the current selected item.
• property errNameCollision as %ZEN.Datatype.caption [ InitialExpression = $$$TextJS("Name already exists: %1") ];
• property generatedClasses as list of %ZEN.Datatype.string;
List of classes generated by a given RecordMap after the Generate option is selected.
• property lastLoc as %ZEN.Datatype.string(ZENURL="LOC");
CSV-string used to remember last location across page redraws, especially involving popups.
• property msgAddSeparator as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Add Separator") ];
• property msgDocReadOnly as %ZEN.Datatype.caption [ InitialExpression = $$$TextJS("This record map is read only") ];
• property msgMakeComposite as %ZEN.Datatype.caption [ InitialExpression = $$$TextJS("Make Composite") ];
• property msgMakeCompositeTooltip as %ZEN.Datatype.caption [ InitialExpression = $$$TextJS("Click to make this field a composite") ];
• property recordAsName as %ZEN.Datatype.string;
• property recordMap as %ZEN.Datatype.string(ZENURL="MAP");
Name of RecordMap being viewed.
• property sampleFile as %ZEN.Datatype.string(ZENURL="sampleFile");
Name of current sample file (on server).
• property showSample as %ZEN.Datatype.boolean(ZENURL="SHOWSAMPLE") [ InitialExpression = 1 ];
Flag to indicate whether the sample file should be displayed.
• property tipAddField as %ZEN.Datatype.caption [ InitialExpression = $$$TextJS("Add a new field") ];
• property tipCSVWizard as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Create a record map from a CSV-style sample") ];
• property tipDelete as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Delete the current RecordMap") ];
• property tipGen as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Save this record map and generate target") ];
• property tipMoveItemDown as %ZEN.Datatype.caption [ InitialExpression = $$$TextJS("Move this item down") ];
• property tipMoveItemUp as %ZEN.Datatype.caption [ InitialExpression = $$$TextJS("Move this item up") ];
• property tipNew as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Create a new record map") ];
• property tipOpen as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Open a saved record map") ];
• property tipRemoveItem as %ZEN.Datatype.caption [ InitialExpression = $$$TextJS("Remove this item") ];
• property tipSave as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Save this record map") ];
• property tipSaveAs as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Save this record map with a new name") ];


• method %OnAfterCreatePage() as %Status
This class method callback is called just before the server-side page object is created.
• method %OnGetPageName() as %String
Get the (localized) name of the page.
• method %OnGetTitle() as %String
Get the (localized) title string for the page.
• method Composite(name, rectype, required, annotation, ignored) [ Language = javascript ]
Client-side constructor for a Composite object.
• method DrawSampleData(pSeed As %String) as %Status
Draw the contents of the Data Sample panel.
• method DrawTableHeader(pSeed As %String) as %Status
Draw the contents of the Header section.
• method Field(name, rectype, required, datatype, index, width, trailingData, params, repeating, annotation, ignored) [ Language = javascript ]
Client-side constructor for a Field object.
• method GetDefaultDir() as %String [ ZenMethod ]
• method GetInternalName() as %String
Return the internal name of the current document, including the three letter extension in upper-case. For example, MyPackage.MyClass.CLS would be the internal name for the class MyPackage.MyClass. Subclasses MUST override this method.
• classmethod GetLastMap() as %String
• method GetRecordDefinition(ByRef pParms, Output pObject As %RegisteredObject) as %Status
Get Record definition for JSON provider.
• classmethod IsSubclassOf(classname As %String, superclass As %String) as %Integer [ ZenMethod ]
• classmethod LoadSampleFilename(recordMap="") as %String [ ZenMethod ]
Load the last used sample file for the current user.
• method OnGetRibbonInfo(Output pDisplay As %Boolean, Output pViewIcons As %List, Output pSortOptions As %List, Output pSearchBox As %Boolean, Output pRibbonTitle As %String, Output pCommands As %List) as %Status
Get information to display in the ribbon bar.
• method Record(name, charEncoding, targetClassname, rectype, required, label, padChars, padFromLeft, recTerm, fieldSep, seps, contents) [ Language = javascript ]
A client-side constructor for a Record object. It can be invoked using either:
var record = new zenPage.Record(args...)
var record = new this.Record(args...)
where the latter would be invoked from a ClientMethod.
• classmethod SaveSampleFilename(recordMap="", filename) [ ZenMethod ]
Save the sample file name for the current user so that it is initialised for later sessions.
• classmethod SetDefaultDir(pPathname As %String) [ ZenMethod ]
• classmethod SetLastMap(pMapName As %String = "") [ ZenMethod ]
• method SubmitHandler(pCommand As %String, pProvider As %ZEN.Auxiliary.jsonProvider, ByRef pObject As %RegisteredObject, Output pResponse As %RegisteredObject) as %Status
Process submitted JSON content based on the object created
• method addItem(type, row, path) [ Language = javascript ]
Add a new item to the table. One needs to supply the type of the container object, the row of the container, and the path to the clicked element, which is specified by integers separated by _ (underscore) characters.
• method addSeparator(sepValue, inRender) [ Language = javascript ]
• method addUndoAction() [ Language = javascript ]
Remember the current state in the undo buffer.
• method adjustSizes() [ Language = javascript ]
Adjust sizes of components on the page.
• method applyDetails() [ Language = javascript ]
Apply changes from detail form.
• method canUndo() [ Language = javascript ]
Return true if it is possible to undo an action
• method changeSampleFile() [ Language = javascript ]
Launch the file dialog to select a sample file.
• method changeTargetClassname(newRecordName) [ Language = javascript ]
Check that the Target Classname is changed along with the RecordMap name
• method chooseSCMenu(menuName, commandName, saveFlags) [ Language = javascript ]
Handle a source control menu selection.
• method clearUndoBuffer() [ Language = javascript ]
Clear the undo buffer.
• method cloneObject(obj, clone) [ Language = javascript ]
Create a clone of the given object.
• method deleteRecordMap() [ Language = javascript ]
• method doSave(force, noload, alertWindow) [ Language = javascript ]
Method to save the RecordMap to disk without generating any classes.
• method editSimpleBatch() [ Language = javascript ]
• method findRowForItem(item) [ Language = javascript ]
Find the row number in the table for the given model item. This must be called after the table has been rendered.
• method getCSSForType(type) [ Language = javascript ]
Find the css class for the given row type.
• method getClientModel() [ Language = javascript ]
Get the jsonProvider object on the client. Subclasses MUST override this method to return the jsonProvider.
• method getCompositeDepth(composite) [ Language = javascript ]
Get the distance to a given composite's "furthest" field, which represents the number of separators it needs.
• method getCurrentLocation() [ Language = javascript ]
Returns the index of the currently selected item and the offsets of the main window in a comma separated list. It returns the empty string "" if no item is selected.
• method getCurrentName() [ Language = javascript ]
Return the current name of the class/object being modified
• method getLastName(type, parentName) [ Language = javascript ]
Helper method to get the last name used for a specific parent object.
• method getNextName(type, parentName) [ Language = javascript ]
Helper method to calculate the next name to use for a given parent.
• method getRecordDepth(record) [ Language = javascript ]
Get the expected number of separators for a given record.
• method getRecordObject() [ Language = javascript ]
Return the RecordMap definition object.
• method getRowDetail(field) [ Language = javascript ]
• method itemSelected(item) [ Language = javascript ]
Item selected within the Finder.
• method loadCSVWizard(url) [ Language = javascript ]
Helper method for loading the CSV Wizard with the current sample file.
• method loadEditor(recordMapName, location, newMap, showSample, renamed) [ Language = javascript ]
Load the page for the specified RecordMap.
• method logout() [ Language = javascript ]
To avoid unloadHandler loop, override logout() and do the unload check ourselves.
• method moveItem(row, path, direction) [ Language = javascript ]
Helper method to move items in the table. row is the row in the rowIndex, path is the path to item in the diagram, and direction is either the text string 'up' or 'down'. Note that any direction value != 'up' is assumed to mean 'down'.
• method newRecordMap() [ Language = javascript ]
Add a new RecordMap.
• method onBatchClassChange() [ Language = javascript ]
• method onDocumentReload(reason) [ Language = javascript ]
Ensure we redraw the diagram if a reload was requested
• method onDocumentSaveComplete(contentUpdated) [ Language = javascript ]
Ensure we redraw the table if the model was updated.
• method onFieldNameChange(newName) [ Language = javascript ]
Remember last entered name
• method onFieldTypeChange() [ Language = javascript ]
Modify available input fields based on whether an entry is a Field or Composite.
• method onIgnoreFieldChange(noApply) [ Language = javascript ]
• method onPaddingCharChange(newValue, isRadio, noApply) [ Language = javascript ]
• method onPopupAction(popupName, action, value) [ Language = javascript ]
This client event is fired when the a popup page launched from this page fires an action.
• method onRecEscapingChange(escapeValue, noApply) [ Language = javascript ]
• method onRecTermChange(newValue, isRadio, noApply) [ Language = javascript ]
• method onRecordTypeChange(recordType, promptUser) [ Language = javascript ]
Modify the available input fields based on the Record type
• method onlayoutHandler(load) [ Language = javascript ]
Adjust sizes of components on the page.
• method onunloadHandler() [ Language = javascript ]
Check if user really wants to exit if they have not saved changes
• method openRecordMap() [ Language = javascript ]
Launch the finder dialog to select a RecordMap.
• method removeItem(type, row, path) [ Language = javascript ]
Remove a row from the table.
• method removeSeparator(index) [ Language = javascript ]
• method reverseString(str) [ Language = javascript ]
• method rowClick(type, row) [ Language = javascript ]
Handle user click on a row in the table.
• method saveRecordMap(doGenerate, showDialog) [ Language = javascript ]
Save the current model. This includes initial validation on the RecordMap.
• method selectItem(type, row, force) [ Language = javascript ]
Select a row in the table.
• method selectNewItem(newItem, newType, blockSuper) [ Language = javascript ]
Helper method: select an item, make sure it is visible and give focus to the details panel. The blockSuper variable is used to control whether the next selectItem() event will be honored: when adding an item from the + button, the new parent's onclick() will be triggered, and we want to keep the new element in focus.
• method setDescription(desc) [ Language = javascript ]
Update the description (annotation) of this record map.
• method setFieldType(newType, update) [ Language = javascript ]
• method setReadOnly(readOnly) [ Language = javascript ]
Set readOnly to the value of readOnly. Subclasses MUST implement this method to update the controls on the page so that the page's behaviour actually matches the value of the readOnly flag.
• method setViewModeHandler(mode) [ Language = javascript ]
Do the actual work of updating the view to match the current view mode.
• method showSCMenu() [ Language = javascript ]
Call UpdateSCMenu() first in case the document has been modified elsewhere, then display the source control menu based on the contents of the _sourceControlMenu data created by UpdateSCMenu().
• method toggleDisclosure(key) [ Language = javascript ]
User click on disclosure icon in table.
• method toggleSampleDiv(show) [ Language = javascript ]
Hide/display the sample file section in the display
• method undo() [ Language = javascript ]
Undo the most recent change.
• method updateLastName(name, type, parentName) [ Language = javascript ]
Helper method to record the last name used on the client.
• method updateTable() [ Language = javascript ]
Update the contents of the model table.
• method validateHexChars(chars) [ Language = javascript ]
• method validateRecord() [ Language = javascript ]
Basic validation to check that:
  • Record and Composite elements have children
  • Enough separators have been defined for delimited records