Package com.adobe.xfa.form
Class FormModel
java.lang.Object
com.adobe.xfa.Obj
com.adobe.xfa.Node
com.adobe.xfa.Element
com.adobe.xfa.Model
com.adobe.xfa.form.FormModel
- All Implemented Interfaces:
Element.DualDomNode,Peer
A class to represent the result of joining a template and data.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic enumstatic classstatic interfaceDefines the callback interface that will be invoked immediately after a merge but before any initialize events are fired.static classProvides a mechanism for FormModel to execute an event on a server.static classstatic classA base class that an implementation can derive from to interact with the form validation process.Nested classes/interfaces inherited from class com.adobe.xfa.Model
Model.DualDomModel, Model.PublisherNested classes/interfaces inherited from class com.adobe.xfa.Element
Element.DualDomNode, Element.ReplaceContentNested classes/interfaces inherited from class com.adobe.xfa.Node
Node.ChangeLogger -
Field Summary
Fields inherited from class com.adobe.xfa.Element
AttrIsDefault, AttrIsFragment, AttrIsTransient, CREATEACTIONFields inherited from class com.adobe.xfa.Node
CREATE_ALWAYS_NEW, CREATE_IF_NOT_EXIST, CREATE_MUST_NOT_EXIST, CREATE_REPLACE, gsXFANamespacePrefixFields inherited from interface com.adobe.xfa.ut.Peer
ATTR_CHANGED, CHILD_ADDED, CHILD_REMOVED, DESCENDENT_ADDED, DESCENDENT_ATTR_CHANGED, DESCENDENT_REMOVED, DESCENDENT_VALUE_CHANGED, PARENT_CHANGED, PERMS_LOCK_CLEARED, PERMS_LOCK_SET, PROTO_ATTR_CHANGED, PROTO_CHILD_ADDED, PROTO_CHILD_REMOVED, PROTO_DESCENDENT_ADDED, PROTO_DESCENDENT_ATTR_CHANGED, PROTO_DESCENDENT_REMOVED, PROTO_DESCENDENT_VALUE_CHANGED, PROTO_VALUE_CHANGED, UPDATED, VALUE_CHANGED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddUseHRefNode(Element useHRefNode) Not supported on FormModelvoidaddUseNode(Element useNode) add a new new node to the useNodeListvoidResets the focus.createNode(int eClassTag, Element parent, String aNodeName, String aNS, boolean bDoVersionCheck) Create an element with the given tag, parent, name and uri.voidcreatePanelOverlayData(int nPanel) Creates an overlayData section under dataSets.booleaneventOccurred(String sActivity, Obj container) Notifies event listeners that an event has occurred on a container.voidexportConnectionData(String strConnectionName, String sDataDescriptionName) booleanDetermines whether the nextremerge()operation will adjust the structure of the DataModel to match the TemplateModel.Gets the ambient locale override for the top level subform.booleanDetermines if calculations are enabled.Gets the default Validate object.booleanDisable/enable calls to remerge()Gets the Execute associated with this FormModel.getFocus()Gets the field that has focus for the FormModel.static FormModelgetFormModel(AppModel appModel, boolean bCreateIfNotFound) Returns the FormModel held within the AppModel.booleanDetermines if theformStatepacket has been removed.getFriendlyName(Element formNode) Gets the friendly name (to use in user-facing communication) for a form nodegetHost()booleanGets the OverlayDataMerge setting.intGets the panel to merge against.Gets the callback method that is to be invoked after merge but before any initialization scripts are run.Keep track of proto Nodes and 'use' tags for quick lookup later ourintGets the runAt property that specifies where scripts should be executed (client, server or both).Gets the ServerExchange implementation associated with this FormModel.Gets the Submit implementation associated with this FormModel.Gets the submit URL override for the top level subform.booleanDetermines whether validations are enabled.voidimportConnectionData(String strConnectionName) importNode(ProtoableNode templateNode, Element formParent, boolean bFull) Imports a template node into this model, while resolving any global or dataRef fields.booleanFires the initialize event on all containers on the form, and fires the indexChange event on all subforms.booleanInitializes the new content nodesbooleanisCompatibleNS(String aNS) Determine if a specified namespace string is compatible with the namespace of this model.voidmerge(boolean bEmptyMerge, boolean bAdjustData, boolean bInitialize, boolean bRestoreDeltas, boolean bForceRestore) Merges the TemplateModel and the DataModel to create the FormModel.voidmerge(boolean bEmptyMerge, boolean bAdjustData, String sConnectionName, boolean bInitialize, boolean bRestoreDeltas, boolean bForceRestore) Merges the TemplateModel and the DataModel to create the FormModel.intIndicates whether the current merge mode is globally consumptive (XFAEnum::CONSUME_DATA) or not (XFAEnum::MATCH_TEMPLATE).voidmergeOverlayData(Node formNode, Node overlayData) Merges overlayData with a subform (FormServer requirement)voidvoidpreSave(boolean bSaveXMLScript) Prepares thisModelto be saved.booleanrecalculate(boolean bFullRecalculate, FormModel.Validate validate, boolean bIgnoreCalcEnabledFlag) Executes calculation and validation scripts.static voidrecurseConnectOnNode(Node node, String strConnectionName, int eUsage, FormModel.ConnectHandler handler, Object handlerData) booleanregisterNewEvents(boolean bAllow) Helper function to permit the temporary update the mbRegisterNewEvents setting This should call registerNewEvents(false) before cloning any form node to orphaned nodes being registered with the event modelvoidremerge()Forces the remerging of the DataModel and TemplateModel to recreate this FormModel.voidremove()Removes a FormModel from its parents child list.voidremoveReferences(Node node) Recursively unmaps node from any DataNode it is mapped to.voidreset()Resets this FormModel to its initial state.voidResets a container to its template default value.voidresolveProtos(boolean bForceExternalProtoResolve) voidrestoreValidateDisableAll(Element formNode, Node delta) restore the validate.disableAll property for a form nodevoidsetAdjustData(boolean bAdjustData) Sets whether the nextremerge()operation will adjust the structure of the DataModel to match the structure of the TemplateModel.voidsetAmbientLocale(String sLocale) Set the ambient locale override for the top level subform.voidsetDefaultValidate(FormModel.Validate validate) Sets the default Validate.voidsetDisableFormRemerge(boolean bDisable) Disable/enable calls to remerge()voidsetEmptyMerge(boolean bEmptyMerge) Sets whether the nextremerge()operation will do an empty merge.voidsetExcludedActivities(String sExclude) Sets event activites that are to be excluded from execution.voidsetExecute(FormModel.Execute execute) Associates an Execute object with this FormModel.voidLets the form model know which field has focus.voidsetGlobalConsumption(Boolean bVal) voidsetPostMergeHandler(FormModel.PostMergeHandler handler, Object clientData) Sets the callback method that is to be invoked after merge but before any initialize scripts are run.voidsetRunScripts(int eRunAtSetting) Sets the runAt property that specifies where scripts should be executed (client, server or both).voidsetServerExchange(FormModel.ServerExchange serverExchange) Sets the ServerExchange implementation with this FormModel.voidsetSubmit(FormModel.Submit submit) Associates a Submit object with this FormModel.voidsetSubmitURL(String sSubmitURL) Sets the submit URL from the config.voidsetValidateBeforeExecute(boolean bValidate) Sets the flag for performing validations before executing.voidsetValidateBeforeSubmit(boolean bValidate) Sets the flag for performing validations before submitting.booleanReturns true if the last merge was an incremental merge.Methods inherited from class com.adobe.xfa.Model
addErrorList, addXMLLoadErrorContext, allowUpdates, checkforCompatibleNS, clearErrorList, clone, createElement, createElement, createElement, createElement, createElement, createTextNode, createTextNode, doAttributeCleanup, getAliasNode, getAppModel, getAppModelIsTransient, getCachedLocale, getContext, getCurrentVersion, getDeltas, getDocument, getErrorContextList, getErrorList, getEventManager, getGenerator, getHeadVersion, getIDValueMap, getLegacySetting, getLogMessenger, getName, getNeedsNSNormalize, getNode, getNS, getOriginalVersion, getOriginalVersionNode, getOriginalXFAVersion, getSchema, getSourceBelow, getVersion, getXmlPeer, isContainer, isLoading, isVersionCompatible, loadNode, loadRootAttributes, loadSpecialAttribute, loadSpecialNode, modelCleanup, nodeCleanup, normalizeNameSpaces, normalizeNameSpaces, preLoadNode, publish, ready, remapTag, removeLastError, resolveNodes, serialize, setAliasNode, setAppModel, setAppModelIsTransient, setContext, setCurrentVersion, setDOMProperties, setIDValueMap, setName, setNeedsNSNormalize, setOriginalXFAVersion, setXmlPeer, shortCutName, validateUsage, validateUsageFailedIsFatal, willDirtyDoc, willDirtyDocMethods inherited from class com.adobe.xfa.Element
appendChild, appendChild, appendPI, appendPI, assignNode, clone, connectPeerToDocument, constructKey, constructKeys, copyContent, defaultAttribute, defaultElement, defaultElement, establishID, evaluate, explodeQName, findAttr, findSchemaAttr, foundBadAttribute, foundBadAttribute, getAll, getAtom, getAttr, getAttribute, getAttribute, getAttributeByName, getAttrIndex, getAttrName, getAttrNS, getAttrProp, getAttrQName, getAttrVal, getChildReln, getClassAll, getClassIndex, getClassName, getDeltas, getElement, getElement, getElementClass, getElementLocal, getEnum, getEnum, getEventTable, getFirstXFAChild, getFirstXMLChild, getID, getIndex, getInheritedNS, getInstalledLocale, getIsNull, getLastXMLChild, getLineNumber, getLocalName, getModel, getNode, getNodes, getNodeSchema, getNumAttrs, getOneOfChild, getOneOfChild, getPI, getPI, getPrefix, getProperty, getProperty, getSaveXMLSaveTransient, getSchemaType, getScriptMethodInfo, getSibling, getText, getXFAChild, getXMLChild, getXMLName, getXPath, getXsiNilAttribute, inhibitPrettyPrint, inhibitPrettyPrint, insertChild, isFragment, isHidden, isHidden, isIndexed, isInstalledLocaleAmbient, isLeaf, isNameSpaceAttr, isPropertySpecified, isPropertySpecified, isPropertyValid, isSpecified, isSpecified, isSpecified, isTransient, isTransparent, isValidAttr, isValidChild, isValidElement, loadXML, loadXML, makeDefault, makeNonDefault, newAttribute, optimizeNameSpace, peekAttribute, peekElement, peekOneOfChild, peekProperty, peekProperty, postSave, privateSetName, processTextChildrenDuringParse, removeAttr, removeAttr, removeChild, removePI, removePI, removeWhiteSpace, removeXsiNilAttribute, replaceChild, resetPostLoadXML, resolveAndEnumerateChildren, resolveNodeCreate, resolvePrefix, saveFilteredXML, saveXML, saveXML, setAttribute, setAttribute, setAttribute, setAttribute, setAttrProp, setDefaultFlag, setElement, setIsDataWindowRoot, setIsIndexed, setLineNumber, setLocalName, setModel, setNS, setOneOfChild, setProperty, setProperty, setQName, setSaveXMLSaveTransient, setTransparent, setXMLName, setXsiNilAttribute, updateFromPeerMethods inherited from class com.adobe.xfa.Node
checkAncestorPerms, checkDescendentPerms, checkPerms, cleanDirtyFlags, compareVersions, getData, getFirstXMLChildElement, getLocked, getNextXFASibling, getNextXMLSibling, getNextXMLSiblingElement, getNodeAsXML, getOwnerDocument, getPIAsXML, getPIName, getPreviousXMLSibling, getPrivateName, getPropName, getSOMExpression, getSOMExpression, getSomName, getUniqueSOMName, getWillDirty, getXFAChildCount, getXFAParent, getXfaPeer, getXMLChildCount, getXMLParent, hasChanged, isDefault, isDirty, isMapped, isPermsLockSet, isTransient, locateChildByClass, locateChildByName, logValueChangeHelper, notifyPeers, performSOMAssignment, resolveNode, resolveNode, resolveNode, resolveNodes, sendMessenge, setDirty, setDocument, setLocked, setMapped, setPermsLock, setPrivateName, setWillDirty, setXfaPeer, unLock, validateSchemaMethods inherited from class com.adobe.xfa.Obj
addPeer, addPeeredNode, clearPeers, deafen, getClassAtom, getClassTag, getPeer, getScriptProperty, getScriptThis, invokeFunction, isDeaf, isMute, isSameClass, isSameClass, isSameClass, mute, peerRemoved, removePeer, removePeeredNode, setClass, setClassTag, setScriptProperty, unDeafen, unMute
-
Constructor Details
-
FormModel
-
-
Method Details
-
getFormModel
Returns the FormModel held within the AppModel.- Parameters:
appModel- the AppModel to searchbCreateIfNotFound- iftrue, and the FormModel does not exist, then one will be created and returned; iffalseand the FormModel does not exist,nullis returned- Returns:
- the FormModel contained within appModel;
nullif not found and bCreateIfNotFound isfalse.
-
recurseConnectOnNode
public static void recurseConnectOnNode(Node node, String strConnectionName, int eUsage, FormModel.ConnectHandler handler, Object handlerData) -
addUseNode
Description copied from class:Modeladd a new new node to the useNodeList- Overrides:
addUseNodein classModel
-
addUseHRefNode
Not supported on FormModel- Overrides:
addUseHRefNodein classModel
-
clearFocus
public void clearFocus()Resets the focus. No field will have focus after but the form model will remember which field had the focus last. -
mergeMode
public int mergeMode()Indicates whether the current merge mode is globally consumptive (XFAEnum::CONSUME_DATA) or not (XFAEnum::MATCH_TEMPLATE). -
createNode
public Node createNode(int eClassTag, Element parent, String aNodeName, String aNS, boolean bDoVersionCheck) Description copied from class:ModelCreate an element with the given tag, parent, name and uri.- Specified by:
createNodein classModel- Parameters:
eClassTag- the element's tag.parent- the element's parent.aNodeName- the element's name.aNS- the element's namespace.bDoVersionCheck- check the element's version.- Returns:
- a new element.
- See Also:
-
createPanelOverlayData
public void createPanelOverlayData(int nPanel) Creates an overlayData section under dataSets. This method is for Form Server support.- Parameters:
nPanel- the panel to create the overlayData section for
-
eventOccurred
Notifies event listeners that an event has occurred on a container. This method may fire additional events before and/or after firing the event.- Parameters:
sActivity- the name of the eventcontainer- the container on which the event occurs- Returns:
trueif one or more events were dispatched.
-
exportConnectionData
-
getAdjustData
public boolean getAdjustData()Determines whether the nextremerge()operation will adjust the structure of the DataModel to match the TemplateModel. The default value isfalse.- Returns:
trueif the nextremerge()operation will adjust the structure of the DataModel to match the TemplateModel.- See Also:
-
getAmbientLocale
Gets the ambient locale override for the top level subform. This will be used when resolving locales for fields and subforms. If a field/subform does not have a locale specified, then they will inherit it from their ancestory hierarchy.- Returns:
- the ambient locale (e.g. "en_US").
-
getBaseNS
-
getCalculationsEnabled
public boolean getCalculationsEnabled()Determines if calculations are enabled.- Returns:
trueif calculations are enabled.
-
getDefaultValidate
Gets the default Validate object. The default Validate object is used whenever validation is initiated by some method that does not use a Validate parameter, or when validation is initiated byvalidate(Validate, Element, boolean, boolean)orrecalculate(boolean, Validate, boolean)andnullis passed to the validate parameter. For example, the default Validate object is used when validation is initiated by theexecValidatescripting method of the FormModel.- Returns:
- a reference to an object derived from Validate, or
nullif no default Validate object has been set. - See Also:
-
getDelta
-
getDeltas
-
getExecute
Gets the Execute associated with this FormModel. May be null.- Returns:
- the Execute.
-
getFocus
Gets the field that has focus for the FormModel.- Returns:
- the field that has focus.
-
getFormStateRemoved
public boolean getFormStateRemoved()Determines if theformStatepacket has been removed.- Returns:
trueif theformStatepacket has been removed
-
getFriendlyName
Gets the friendly name (to use in user-facing communication) for a form node- Parameters:
formNode- aFormSubform,FormFieldorFormExclGroupto get a user-friendly name for.- Returns:
- a string containing a user-friendly name for the form node.
-
getHeadNS
-
getHost
-
getOverlayDataMergeUsage
public boolean getOverlayDataMergeUsage()Gets the OverlayDataMerge setting.- Returns:
- true if OverlayDataMergeUsage must occur
-
getPanelToMergeAgainst
public int getPanelToMergeAgainst()Gets the panel to merge against.- Returns:
- the panel (second-level subform) to merge against
-
getPostMergeHandler
Gets the callback method that is to be invoked after merge but before any initialization scripts are run.- See Also:
-
getProtoList
Description copied from class:ModelKeep track of proto Nodes and 'use' tags for quick lookup later our- Overrides:
getProtoListin classModel- Returns:
- our list of protos
- See Also:
-
getRunScripts
public int getRunScripts()Gets the runAt property that specifies where scripts should be executed (client, server or both). The default is both.- Returns:
- one of:
EnumAttr.RUNSCRIPTS_CLIENT,EnumAttr.RUNSCRIPTS_SERVER,EnumAttr.RUNSCRIPTS_BOTHorEnumAttr.RUNSCRIPTS_NONE - See Also:
-
getScriptTable
- Overrides:
getScriptTablein classModel- See Also:
-
getServerExchange
Gets the ServerExchange implementation associated with this FormModel.- Returns:
- a ServerExchange implementation, or
nullif no ServerExchange has been set. - See Also:
-
getSubmit
Gets the Submit implementation associated with this FormModel.- Returns:
- a pointer to a class derived from Submit.
-
getSubmitURL
Gets the submit URL override for the top level subform. This will be used to determine if we are submitting to FormServer.- Returns:
- String, the submit URL.
-
getValidationsEnabled
public boolean getValidationsEnabled()Determines whether validations are enabled.- Returns:
trueif validations are enabled.
-
importConnectionData
-
importNode
Imports a template node into this model, while resolving any global or dataRef fields. This will simply walk the template DOM and create a form node for each one it encounters. This will also set up the appropriate proto relationships- Parameters:
templateNode- the template node to importformParent- the parent we'll add the created form node toobFull- if true, do merge and process the children.- Returns:
- the newly created Form node
-
initialize
public boolean initialize()Fires the initialize event on all containers on the form, and fires the indexChange event on all subforms.- Returns:
trueif one or more events were dispatched.
-
initializeNewContentNodes
public boolean initializeNewContentNodes()Initializes the new content nodes- Returns:
trueif one or more events were dispatched.
-
isCompatibleNS
Description copied from class:ModelDetermine if a specified namespace string is compatible with the namespace of this model. Essentially this determines if the two namespaces are equivalent (though the strings that represent them may not be identical).- Overrides:
isCompatibleNSin classModel- Parameters:
aNS- The namespace to compare.- See Also:
-
merge
public void merge(boolean bEmptyMerge, boolean bAdjustData, boolean bInitialize, boolean bRestoreDeltas, boolean bForceRestore) Merges the TemplateModel and the DataModel to create the FormModel. The first two parameters are implicitly used to callsetEmptyMerge(boolean)andsetAdjustData(boolean)respectively.- Parameters:
bEmptyMerge- iftruethen merge against an empty DataModel, iffalseuse the DataModel found in the AppModelbAdjustData- iftrueadjust the structure of the DataModel to match the structure of the TemplateModel; iffalsedon't modify the DataModel.bInitialize- iftrueall the initialize events will be fired; iffalseno initialization is performedbRestoreDeltas- iftrueand if the restoreState property on the form's root subform is "auto" (the default is "manual"), all deltas are restored from the form packet. The locale attribute is always restored from the form packet, regardless of the value of this parameter.bForceRestore- iftrue, restore the state regardless of the the restoreState property on the form's root subform.
-
merge
public void merge(boolean bEmptyMerge, boolean bAdjustData, String sConnectionName, boolean bInitialize, boolean bRestoreDeltas, boolean bForceRestore) Merges the TemplateModel and the DataModel to create the FormModel.- Parameters:
bEmptyMerge- iftruethen merge against an empty DataModel, iffalseuse the DataModel found in the AppModelbAdjustData- iftrue, adjust the structure of the DataModel to match the structure of the TemplateModel; iffalse, don't modify the DataModelsConnectionName- if specified get all the data for the merge from the !connectionData.sConnectionName part of the DataModel. Also, use connect elements rather than bind elements of the TemplateModelbInitialize- iftrue, all the initialize events will be fired; iffalse, no initialization is performedbRestoreDeltas- iftrueand if the restoreState property on the form's root subform is "auto" (the default is "manual"), all deltas are restored from the form packet. The locale attribute is always restored from the form packet, regardless of the value of this parameter.bForceRestore- iftrue, restore the state regardless of the the restoreState property on the form's root subform.
-
mergeOverlayData
Merges overlayData with a subform (FormServer requirement)- Parameters:
formNode- The subform to merge withoverlayData- The data to merge with
-
normalizeNameSpaces
public void normalizeNameSpaces()- Overrides:
normalizeNameSpacesin classModel- See Also:
-
preSave
public void preSave(boolean bSaveXMLScript) Description copied from class:ModelPrepares thisModelto be saved. Any model maintenance that may have been deferred is performed to ensure that the serialized form of theModelis correct. This method is called automatically before aModelis serialized to a stream, so it does not normally need to be called directly. The exception is when aDocumentis saved usingDocument.saveAs(java.io.OutputStream, Node, DOMSaveOptions)orDocument.saveXML(java.io.OutputStream, DOMSaveOptions). -
recalculate
public boolean recalculate(boolean bFullRecalculate, FormModel.Validate validate, boolean bIgnoreCalcEnabledFlag) Executes calculation and validation scripts. After a merge operation, a full recalculate must be done to ensure that all calculations and validations are done using current data values. If data values are changed, this should be called to re-run the calculations. The FormModel tracks changes to data values, so recalculation efficiency can be improved by setting the bFullRecalculate parameter tofalseto perform only those calculations and validations that are dependent on the changed data values.- Parameters:
bFullRecalculate- iftrueall calculations and validations are run. Iffalsecalculations and validations are run as needed (i.e. if values that the validate or calculate script are dependent on have changed since the last recalculate).validate- an object derived from Validate. Ifnullthe default Validate is used, and if the default Validate is also null, no validations are performed.bIgnoreCalcEnabledFlag- iftruethe calculations will be performed even if they are disabled on the host.- Returns:
trueif any calculations were performed- See Also:
-
registerNewEvents
public boolean registerNewEvents(boolean bAllow) Helper function to permit the temporary update the mbRegisterNewEvents setting This should call registerNewEvents(false) before cloning any form node to orphaned nodes being registered with the event model- Parameters:
bAllow- the new value of mbRegisterEvents- Returns:
- the old value of mbRegisterEvents
-
remerge
public void remerge()Forces the remerging of the DataModel and TemplateModel to recreate this FormModel. This is equivalent to callingmerge(boolean, boolean, boolean, boolean, boolean), and specifyinggetEmptyMerge()andgetAdjustData()for the bEmptyMerge and bAdjustData parameters, and specifyingtrue,false,falsefor the bInitialize, bRestoreDeltas and bForceRestore parameters.- See Also:
-
remove
public void remove()Removes a FormModel from its parents child list. Since a FormModel can't really exist outside of the context of an AppModel (i.e., because of connections between the form and data models), the form gets reset before it is removed. -
removeReferences
Recursively unmaps node from any DataNode it is mapped to.- Overrides:
removeReferencesin classModel- Parameters:
node- the Node to be unmapped.
-
reset
public void reset()Resets this FormModel to its initial state. All children are removed. -
resetData
Resets a container to its template default value. If container is a field it will reset it. If container is a subform it will recursively reset all the containers it contains. If container isnullthen it will reset the root subform, and therefore all fields in the form.- Parameters:
container- the container to be reset
-
resolveProtos
public void resolveProtos(boolean bForceExternalProtoResolve) - Overrides:
resolveProtosin classModel
-
restoreValidateDisableAll
restore the validate.disableAll property for a form node -
setAdjustData
public void setAdjustData(boolean bAdjustData) Sets whether the nextremerge()operation will adjust the structure of the DataModel to match the structure of the TemplateModel.- Parameters:
bAdjustData- iftruethe nextremerge()operation will adjust the structure of the DataModel to match the structure of the TemplateModel.- See Also:
-
setAmbientLocale
Set the ambient locale override for the top level subform. This will be used when resolving locales for fields and subforms. If a field/subform does not have a locale specified, then they will inherit it from their ancestory hierarchy.- Parameters:
sLocale- the ambient locale (i.e. en_US).
-
setDefaultValidate
Sets the default Validate. The default Validate is used during validation when validation is initiated by some method other thanrecalculate(boolean, Validate, boolean)orvalidate(Validate, Element, boolean, boolean), or when validate or recalculate are called andnullis passed to the validate parameter. If no Validate instance is available, then no validations are performed.- Parameters:
validate- a reference to an object derived from Validate.- See Also:
-
setEmptyMerge
public void setEmptyMerge(boolean bEmptyMerge) Sets whether the nextremerge()operation will do an empty merge. This property is also set implicity from the first parameter of any call tomerge(boolean, boolean, boolean, boolean, boolean).- See Also:
-
setExcludedActivities
Sets event activites that are to be excluded from execution.- Parameters:
sExclude- a space-delimited list of activities.
-
setExecute
Associates an Execute object with this FormModel. This allows a client to execute a connection.- Parameters:
execute- an object derived from Execute. It will be cloned, so the original can be discarded. May be null.
-
setFocus
Lets the form model know which field has focus.- Parameters:
field- the field that has focus.
-
setPostMergeHandler
Sets the callback method that is to be invoked after merge but before any initialize scripts are run.- Parameters:
handler- the PostMergeHandler implementation to be invoked after merge but before any initialize scripts are run.clientData- this value will be passed as the parameter toFormModel.PostMergeHandler.handlePostMerge(Object)when the callback method is invoked.- See Also:
-
setRunScripts
public void setRunScripts(int eRunAtSetting) Sets the runAt property that specifies where scripts should be executed (client, server or both). The default is both.- Parameters:
eRunAtSetting- one of:EnumAttr.RUNSCRIPTS_CLIENT,EnumAttr.RUNSCRIPTS_SERVER,EnumAttr.RUNSCRIPTS_BOTHorEnumAttr.RUNSCRIPTS_NONE- See Also:
-
setServerExchange
Sets the ServerExchange implementation with this FormModel. This allows a form to invoke a web service.- Parameters:
serverExchange- an implementation ServerExchange. It will be cloned, so the original can be discarded. May be null.- See Also:
-
setSubmit
Associates a Submit object with this FormModel. This allows a client to submit data to the server.- Parameters:
submit- an object derived from Submit. It will be cloned, so the original can be discarded. May be null.
-
setSubmitURL
Sets the submit URL from the config. This will be used to determine if we are submitting to FormServer.- Parameters:
sSubmitURL- the submit URL.
-
setValidateBeforeExecute
public void setValidateBeforeExecute(boolean bValidate) Sets the flag for performing validations before executing.- Parameters:
bValidate- if true, validate before executing, don't validate otherwise.
-
setValidateBeforeSubmit
public void setValidateBeforeSubmit(boolean bValidate) Sets the flag for performing validations before submitting.- Parameters:
bValidate- if true, validate before submitting, don't validate otherwise.
-
wasIncrementalMerge
public boolean wasIncrementalMerge()Returns true if the last merge was an incremental merge. -
setDisableFormRemerge
public void setDisableFormRemerge(boolean bDisable) Disable/enable calls to remerge() -
getDisableFormRemerge
public boolean getDisableFormRemerge()Disable/enable calls to remerge() -
setGlobalConsumption
-