<fx-submission>

Description

Send and receive data.

Attributes

NameDescriptionDefault
credentialssets credentials policy - one of ‘omit’, ‘same-origin’ or ‘include’same-origin
idrequired: id of submission for referral‘default’
refXPath reference pointing to the bound noderoot node of default instance
instanceid of instance when replace='instance'. Required when replace=‘instance’
intoXPath expr where to insert response nodes into
mediatypemediatype of request‘application/xml’
methodhttp methods GET, POST, PUT, DELETE, url-encoded-postGET
nonrelevanthandling of non relevant nodes during serialization. Can be one of ‘keep’, ’empty’ or ‘remove’remove
replaceone of ‘all’, ‘download’, ‘instance’, ’target’, ‘redirect’ or ’none’all
‘all’ - response replaces the viewport
‘download’ - save dialog is shown for response. use target attribute to specify filename
‘instance’ - response replaces the instance given by the instance attribute or if not present the default instance
’target’ - response will be attached to element identified by target (CSS Selector syntax e.g. ‘#mydiv’)
‘redirect’ - use response as redirect url.
’none’ - response will be ignored.
responsemediatypemediatype of responsemediatype being used for request
serialization’none’ or ‘xml’ at this pointxml
targetselector in CSS selector syntax. valid only when replace is ’target’.
targetrefXPath pointing to target node when replace="instance"
validateBoolean to turn validator mode on/offtrue

Events

NameDescription
submitdispatch before submission takes place
submit-errordispatched if the request returned an error
submit-donedispatched when submission was successfully completed

Setting headers

To set headers in submissions there’s the <fx-header> element. It has to be a direct child of the respective submission and has the name and value attributes to specify the desired header. The value attribute can use an XPath to point to the value. If a plain string is wanted it has to be enclosed within tickles.

Example:

<fx-header name="Authorization" value="'auth'"></fx-header>

Special URL Schemes

Beside http, https Fore supports:

  • ’localStore:[key]’ to manage data in the browsers’ localstorage (supports ‘get’, ‘post’, ‘delete’ and ‘consume’ methods
  • ‘#echo’ to echo back whatever got sent

Examples