Enum RPCTransport
- All Implemented Interfaces:
ValueEnum
,Serializable
,Comparable<RPCTransport>
,Constable
RPCRequest.transport
and defaultTransport
are exposed as override points. -
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionAvailable with Smart GWT Server only.Write a SCRIPT tag into the DOM with a SRC attribute that targets an arbitrary URL.Uses the XMLHttpRequest object to make the request to the server. -
Method Summary
Modifier and TypeMethodDescriptiongetValue()
static RPCTransport
Returns the enum constant of this type with the specified name.static RPCTransport[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
XMLHTTPREQUEST
Uses the XMLHttpRequest object to make the request to the server. Note that in some browsers with certain configurations, this transport may not be available. SeePlatformDependencies
for more information. This transport is not useful with file uploads. Cannot be used to target cross-domain URLs directly.If this enumerated value is used in a
Component XML
file or server-side DataSource descriptor (.ds.xml file), use the value "xmlHttpRequest". -
SCRIPTINCLUDE
Write a SCRIPT tag into the DOM with a SRC attribute that targets an arbitrary URL. This transport is the only one that allows direct cross-domain URL access.For
RPCRequest.callback
to work, the server being contacted must support the ability to generate JavaScript code in the response that will call a JavaScript function generated by Smart GWT. Smart GWT passes the name of the function to call via a URL parameter, which can be controlled withRPCRequest.callbackParam
. This callback mechanism is sometimes called the "JSONP" (JSON with Padding) approach.If this enumerated value is used in a
Component XML
file or server-side DataSource descriptor (.ds.xml file), use the value "scriptInclude". -
HIDDENFRAME
Available with Smart GWT Server only. An HTML form is dynamically assembled that targets a hidden IFRAME. This mechanism is supported on all browsers and cannot be disabled by end users.If using the Smart GWT Server and using
Server-side data integration
, the "hiddenFrame" transport is automatically used for all RPCManager and DataSource requests if the "xmlHttpRequest" transport is not available.Cannot be used to target cross-domain URLs directly.
If this enumerated value is used in a
Component XML
file or server-side DataSource descriptor (.ds.xml file), use the value "hiddenFrame".
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getValue
-