cpr.protocols.AbstractSubmission
Index
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. |
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
type
|
String |
get
|
Returns the url to send data.
|
set
|
Specify the url to send data. ex) "/action_data.do"
|
type
|
Boolean |
get
|
Returns the value of whether it is asynchronous.
|
set
|
Specifies the value of asynchronous.
|
type
|
String |
get
|
Returns a ContextPath of server URLs that are set up separately.
|
set
|
Sets the ContextPath of the configured server URLs.
|
declaring type
|
Control |
type
|
Boolean |
readonly
|
Returns whether the control should be removed.
|
type
|
String |
readonly
|
Returns the character encoding value of content-type in http.
|
declaring type
|
Control |
type
|
String |
readonly
|
Returns the ID of the control.
|
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.
|
type
|
String |
get
|
Returns the value of the specified http request method.
|
set
|
Specifies the value of http request method.
|
type
|
String |
get
|
Returns the response data type specified in the submission.
|
set
|
Specifies the response data type specified in the submission.
|
type
|
String |
readonly
|
Returns the communication status value of the submission.
A submission can have three states (IDLE, SENDING, DONE).
|
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).
|
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
|
declaring type
|
Control |
type
|
String |
readonly
|
Returns the unique ID of the control.
|
type
|
Boolean |
get
|
Whether to send credential information upon request of Cross Domain.
|
set
|
Specify whether to send credential information when requesting Cross Domain.
|
type
|
XMLHttpRequest |
readonly
|
Returns the XMLHttpRequest object used for communication.
|
Methods
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...
});
name |
type |
description |
type
|
String |
Event type. |
listener
|
(e: cpr.events.CEvent)=>Void |
Event listeners. |
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...
});
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 that property.
name |
type |
description |
propertyName
|
#bindable-property_name |
The attribute name to bind. |
Forwards specific events.
name |
type |
description |
e
|
CEvent |
event |
return
|
Boolean |
Successful event delivery. |
Discards the information contained in the object, and also deletes the object.
Returns the app instance to which the control belongs.
return
|
AppInstance |
The app instance the control belongs to. |
Returns the bind context.
Returns the bind property information for the control.
name |
type |
description |
propertyName
|
#bindable-property_name |
The name of the attribute being bound. |
Returns the value of the request header.
name |
type |
description |
name
|
String |
The name of the header. |
return
|
String |
The value of the header. |
Returns the names of the specified request headers.
return
|
String[] |
An array of header names. |
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. |
Returns all custom attribute names.
return
|
String[] |
An array of all custom attribute names. |
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.
name |
type |
description |
propertyName
|
#bindable-property_name |
Property name to check whether binding is valid. |
Make sure it is a bindable property.
name |
type |
description |
propertyName
|
#bindable-property_name |
Attribute name |
return
|
Boolean |
Confirmation. |
Returns whether the submission was successful.
return
|
Boolean |
Success: true, Failure: false |
Removes all event listeners for the control.
Removes all specified headers.
Delete all custom attributes.
Remove Listener for each EventType in the control.
control.removeEventListener ('click', listener); code> pre>
name |
type |
description |
type
|
String |
Event type. |
listener
|
(e: cpr.events.CEvent)=>Void |
Event listeners. |
Remove all EventType listeners from the control.
control.removeEventListeners ('click'); code> pre>
name |
type |
description |
type
|
String |
Event type. |
Removes the header with the specified name.
name |
type |
description |
name
|
String |
Name of header |
return
|
String |
The value of the removed header. |
Removes user-defined attributes for a specific attribute name.
name |
type |
description |
key
|
String |
The custom attribute name to remove. |
Transfer the data. It will not run if you are already submitting to the same submission.
return
|
Promise<cpr.events.CSubmissionEvent> |
|
Specifies the value of the request header.
name |
type |
description |
name
|
String |
Name of header |
value
|
String |
The value of the header |
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 ();
code> pre>
name |
type |
description |
action
|
String |
Full URL to request to the server. |
Register a function that can encode data sent to the server in a separate format.
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. |
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.
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 that property.
name |
type |
description |
propertyName
|
#bindable-property_name |
Attribute name to unbind. |
Specifies custom properties.
name |
type |
description |
key
|
String |
The attribute name to assign |
value
|
String |
The attribute value to specify. |
Returns a user-defined property.
name |
type |
description |
key
|
String |
The attribute name to get. |
return
|
String |
Custom properties. |
Specify multiple custom properties at once.
name |
type |
description |
values
|
{[key:string]: String} |
A JSON object containing custom attribute keys/values. |
Get all custom properties in the form of a map.
return
|
{[key:string]: String} |
|
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.
name |
type |
description |
key
|
String |
The key of the data to be specified. |
value
|
Object |
Data to specify. |
get custom data
name |
type |
description |
key
|
String |
The key of the data to get. |
Specifies multiple user-defined data.
name |
type |
description |
override
|
{[key:string]: Object} |
A JSON object containing user-defined data. |
Get all your custom data.
return
|
{[key:string]: Object} |
|
Returns a user-defined property.
return
|
Object |
Custom properties. |