Class CallbackPageAction
[JsonObject]
public class CallbackPageAction : FeaturePageAction
Inherited Members
Namespace: HomeSeer.PluginSdk.Features.Responses.PageActions
Assembly: PluginSdk.dll
A FeaturePageAction used to instruct the client to callback to the plugin after waiting a specified amount of time
Remarks
Uses the setTimeout() method to schedule a call to the featurePagePost JS method after a specified amount of time.
The javascript that handles this is not included in the FeaturePagePost.js file by default and must be included manually. Add the following to the end of the switch statement in the onFeaturePagePostSuccess, replacing PUTCALLBACKURLHERE with the URL for your page:
case "callback":
setTimeout(function() {featurePagePost(pageAction.data, PUTCALLBACKURLHERE)}, pageAction.selector);
break;
Constructors
View SourceCallbackPageAction()
Create a new FeaturePageAction with the Callback action type
Declaration
[JsonConstructor]
public CallbackPageAction()
CallbackPageAction(String, Int32)
Create a new instance of a FeaturePageAction with the Callback action type that will send the specified data blob after waiting the specified amount of time
Declaration
public CallbackPageAction(string data, int timeout)
Parameters
Type | Name | Description |
---|---|---|
System.String | data | The data to include in the next request |
System.Int32 | timeout | The amount of time to wait, in millisecond, before making the callback request |