Class JavaScriptCallbackAction
- java.lang.Object
-
- com.funnelback.plugin.index.model.querycompletion.action.JavaScriptCallbackAction
-
- All Implemented Interfaces:
AutoCompletionAction
public class JavaScriptCallbackAction extends Object implements AutoCompletionAction
An auto-completion action type which executes the given JavaScript code when the completion is selected. The code itself is expected to have some side-effect which modifies the page or navigates in response to the user's action. An example value might be `refreshData('some-suggestion-specific-code')` in the context of a results page which defines the following function...function refreshData(symbol) { // Fetch stock market data var data = remoteServiceCall(symbol); ... document.getElementById('price_info').value = data.currentPrice; if (data.currentPrice > data.lastWeekPrice) { document.getElementById('status').src = 'green.png'; } }
-
-
Field Summary
Fields Modifier and Type Field Description private @NonNull String
callbackCode
-
Constructor Summary
Constructors Constructor Description JavaScriptCallbackAction(@NonNull String callbackCode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(Object other)
boolean
equals(Object o)
@NonNull String
getCallbackCode()
int
hashCode()
-