cpr.protocols.AbstractSubmission

Hierarchy

Index

Properties
Name Type Description
action String Returns the url to send data.
async Boolean Returns the value of whether it is asynchronous.
contextPath String Returns a ContextPath of server URLs that are set up separately.
disposed Boolean Returns whether the control should be removed.
encoding String Returns the character encoding value of content-type in http.
id String Returns the ID of the control.
mediaType String Returns the value of media-type of content-type in http.
method String Returns the value of the specified http request method.
responseType String Returns the response data type specified in the submission.
status String Returns the communication status value of the submission.
timeout Number Returns the timeout value of the submission.
type ControlType Returns the signature string of the Control's unique Type that can distinguish the Control.
uuid String Returns the unique ID of the control.
withCredentials Boolean Whether to send credential information upon request of Cross Domain.
xhr XMLHttpRequest Returns the XMLHttpRequest object used for communication.
Methods
Name Return Type Description
abort Abort communication.
addEventListener Add listeners by EventType to the control.
addEventListenerOnce (e: cpr.events.CEvent)=>Void Add a listener to the control that will run only once per EventType.
bind IBindFactory Bind that property.
dispatchEvent Boolean Forwards specific events.
dispose Discards the information contained in the object, and also deletes the object.
getAppInstance AppInstance Returns the app instance to which the control belongs.
getBindContext BindContext Returns the bind context.
getBindInfo BindInfo Returns the bind property information for the control.
getHeader String Returns the value of the request header.
getHeaderNames String[] Returns the names of the specified request headers.
getRequestActionUrl String Returns the full URL information to be requested to the server that is initialized whenever a submission request is completed.
getUserAttrNames String[] Returns all custom attribute names.
isAvailableBinding Boolean Returns whether the queried property is bindable and the binding has been configured to obtain a valid value.
isBindable Boolean Make sure it is a bindable property.
isSuccess Boolean Returns whether the submission was successful.
removeAllEventListeners Removes all event listeners for the control.
removeAllHeader Removes all specified headers.
removeAllUserAttr Delete all custom attributes.
removeEventListener Remove Listener for each EventType in the control.
removeEventListeners Remove all EventType listeners from the control.
removeHeader String Removes the header with the specified name.
removeUserAttr Removes user-defined attributes for a specific attribute name.
send Promise<cpr.events.CSubmissionEvent> Transfer the data.
setHeader Specifies the value of the request header.
setRequestActionUrl Set the complete URL information to request to the server that is initialized whenever a submission request is completed.
setRequestEncoder Register a function that can encode data sent to the server in a separate format.
setResponseDecoder Register a Decoding function that can convert data in a format not supported by eXBuilder6 received from the server into a format supported by eXBuilder6 or process it by itself.
unbind Unbind that property.
userAttr Specifies custom properties.
userData Specifies custom data.
userattr Object Returns a user-defined property.

Properties

action
type String
get
Returns the url to send data.
set
Specify the url to send data. ex) "/action_data.do"
async
type Boolean
get
Returns the value of whether it is asynchronous.
set
Specifies the value of asynchronous.
contextPath
type String
get
Returns a ContextPath of server URLs that are set up separately.
set
Sets the ContextPath of the configured server URLs.
disposed
declaring type Control
type Boolean
readonly
Returns whether the control should be removed.
encoding
type String
readonly
Returns the character encoding value of content-type in http.
id
declaring type Control
type String
readonly
Returns the ID of the control.
mediaType
type String
get
Returns the value of media-type of content-type in http.
set
Specifies the value of media-type of content-type in http.
method
type String
get
Returns the value of the specified http request method.
set
Specifies the value of http request method.
responseType
type String
get
Returns the response data type specified in the submission.
set
Specifies the response data type specified in the submission.
status
type String
readonly
Returns the communication status value of the submission. A submission can have three states (IDLE, SENDING, DONE).
timeout
type Number
get
Returns the timeout value of the submission.
set
If the specified time is exceeded, it is aborted and a timeout event occurs. The input value is received in ms (Millisecond).
type
declaring type Control
type ControlType
readonly
Returns the signature string of the Control's unique Type that can distinguish the Control. Please refer to ControlType for available constant values. For UDC controls, each unique type name is returned. Example: udc.MyUDC
uuid
declaring type Control
type String
readonly
Returns the unique ID of the control.
withCredentials
type Boolean
get
Whether to send credential information upon request of Cross Domain.
set
Specify whether to send credential information when requesting Cross Domain.
xhr
type XMLHttpRequest
readonly
Returns the XMLHttpRequest object used for communication.

Methods

abort()
Abort communication.
addEventListener(type, listener)
declaring typeControl
Add listeners by EventType to the control.
Add a listener to the control to handle when a specific event occurs.
var button = new cpr.controls.Button("btn01");
button.addEventListener("click", function(e) {
// event code...
});
Parameters
name type description
type String Event type.
listener (e: cpr.events.CEvent)=>Void Event listeners.
addEventListenerOnce(type, listener)
declaring typeControl
Add a listener to the control that will run only once per EventType.
Add a listener to the control to handle when a specific event occurs. The added listener is automatically deleted after running once. Since the object of the added listener is changed, when the listener is deleted It is an object returned after calling addEventListenerOnce and can be deleted.
var button = new cpr.controls.Button("btn01");
button.addEventListenerOnce("click", function(e) {
// event code...
});
Parameters
name type description
type String Event type.
listener (e: cpr.events.CEvent)=>Void Event listeners.
return (e: cpr.events.CEvent)=>Void The modified Listener object.
bind(propertyName)
declaring typeControl
Bind that property.
Parameters
name type description
propertyName #bindable-property_name The attribute name to bind.
return IBindFactory Factory showing bind type.
dispatchEvent(e)
declaring typeControl
Forwards specific events.
Parameters
name type description
e CEvent event
return Boolean Successful event delivery.
dispose()
Discards the information contained in the object, and also deletes the object.
getAppInstance()
declaring typeControl
Returns the app instance to which the control belongs.
return AppInstance The app instance the control belongs to.
getBindContext()
declaring typeControl
Returns the bind context.
return BindContext bind context
getBindInfo(propertyName)
declaring typeControl
Returns the bind property information for the control.
Parameters
name type description
propertyName #bindable-property_name The name of the attribute being bound.
return BindInfo BindInfo Properties
getHeader(name)
Returns the value of the request header.
Parameters
name type description
name String The name of the header.
return String The value of the header.
getHeaderNames()
Returns the names of the specified request headers.
return String[] An array of header names.
getRequestActionUrl()
Returns the full URL information to be requested to the server that is initialized whenever a submission request is completed. If the result value is null, the contextPath value set in the environment variable (protocol.submission in default.js) when the Submission is sent The action value set in Submission is automatically set as the combined URL.
return String The full URL to send to the server.
getUserAttrNames()
declaring typeControl
Returns all custom attribute names.
return String[] An array of all custom attribute names.
isAvailableBinding(propertyName)
declaring typeControl
Returns whether the queried property is bindable and the binding has been configured to obtain a valid value. Even if no binding is configured and a simple value is specified, it is treated as configured so that a valid value is obtained. For example, binding to a row index that does not exist in the DataSet is an invalid binding.
Parameters
name type description
propertyName #bindable-property_name Property name to check whether binding is valid.
return Boolean
isBindable(propertyName)
declaring typeControl
Make sure it is a bindable property.
Parameters
name type description
propertyName #bindable-property_name Attribute name
return Boolean Confirmation.
isSuccess()
Returns whether the submission was successful.
return Boolean Success: true, Failure: false
removeAllEventListeners()
declaring typeControl
Removes all event listeners for the control.
removeAllHeader()
Removes all specified headers.
removeAllUserAttr()
declaring typeControl
Delete all custom attributes.
removeEventListener(type, listener)
declaring typeControl
Remove Listener for each EventType in the control.
control.removeEventListener ('click', listener);  
Parameters
name type description
type String Event type.
listener (e: cpr.events.CEvent)=>Void Event listeners.
removeEventListeners(type)
declaring typeControl
Remove all EventType listeners from the control.
control.removeEventListeners ('click');  
Parameters
name type description
type String Event type.
removeHeader(name)
Removes the header with the specified name.
Parameters
name type description
name String Name of header
return String The value of the removed header.
removeUserAttr(key)
declaring typeControl
Removes user-defined attributes for a specific attribute name.
Parameters
name type description
key String The custom attribute name to remove.
send()
Transfer the data. It will not run if you are already submitting to the same submission.
return Promise<cpr.events.CSubmissionEvent>
setHeader(name, value)
Specifies the value of the request header.
Parameters
name type description
name String Name of header
value String The value of the header
setRequestActionUrl(action)
Set the complete URL information to request to the server that is initialized whenever a submission request is completed. If the setting value is null, the contextPath value set in the environment variable (protocol.submission in default.js) when the Submission is sent The action value set in Submission is automatically set as the combined URL. If the setting value is not null, it communicates with the server using the URL set when the Submission is sent. The set URL is initialized to null whenever a submission request is completed.
var submission = app.lookup ("sub_main");
submission.setRequestActionUrl ("http://test.exbuilder.co.kr/" + submission.action);
submission.send ();
 
Parameters
name type description
action String Full URL to request to the server.
setRequestEncoder(requestEncoder, usingBuildData)
Register a function that can encode data sent to the server in a separate format.
Parameters
name type description
requestEncoder RequestEncoder (submission: cpr.protocols.Submission, data: {} | string) => Promise <{key: string, content: {} | string}> | Callback handler of the form {key: string, content: {} | string}
usingBuildDataoptional Boolean defaulttrue Whether built-in request data is required for RequestEncoder operation.
setResponseDecoder(responseDecoder)
Register a Decoding function that can convert data in a format not supported by eXBuilder6 received from the server into a format supported by eXBuilder6 or process it by itself. Submissions registered with ResponseDecoder do not trigger "submit-load-progress" event.
Parameters
name type description
responseDecoder ResponseDecoder (submission: cpr.protocols.Submission, data: string) => Promise <{contentType: string, content: {} | string}> | Callback handler of the form {contentType: string, content: {} | string}
unbind(propertyName)
declaring typeControl
Unbind that property.
Parameters
name type description
propertyName #bindable-property_name Attribute name to unbind.
userAttr(key, value)
declaring typeControl
Specifies custom properties.
Parameters
name type description
key String The attribute name to assign
value String The attribute value to specify.
userAttr(key)
declaring typeControl
Returns a user-defined property.
Parameters
name type description
key String The attribute name to get.
return String Custom properties.
userAttr(values)
declaring typeControl
Specify multiple custom properties at once.
Parameters
name type description
values {[key:string]: String} A JSON object containing custom attribute keys/values.
userAttr()
declaring typeControl
Get all custom properties in the form of a map.
return {[key:string]: String}
userData(key, value)
declaring typeControl
Specifies custom data. Unlike user-defined attributes, you can use arbitrary types in addition to strings. When the control is dispose, all custom data is removed.
Parameters
name type description
key String The key of the data to be specified.
value Object Data to specify.
userData(key)
declaring typeControl
get custom data
Parameters
name type description
key String The key of the data to get.
return Object
userData(override)
declaring typeControl
Specifies multiple user-defined data.
Parameters
name type description
override {[key:string]: Object} A JSON object containing user-defined data.
userData()
declaring typeControl
Get all your custom data.
return {[key:string]: Object}
userattr()
declaring typeControl
deprecatedPlease use userAttr.
Returns a user-defined property.
return Object Custom properties.