Class JavaScriptCallbackDisplay
- java.lang.Object
-
- com.funnelback.plugin.index.model.querycompletion.display.JavaScriptCallbackDisplay
-
- All Implemented Interfaces:
AutoCompletionDisplay
public class JavaScriptCallbackDisplay extends Object implements AutoCompletionDisplay
An auto-completion display type which invokes a JavaScript callback which is expected to return HTML, which is then used as the display. Note that the HTML is not sanitised by Funnelback so this should only be used for trusted sources. An example value might be `fetchStockPrice('some-suggestion-specific-code')` in the context of a results page which defines the following function...function fetchStockPrice(symbol) { // Fetch stock market data var data = remoteServiceCall(symbol); ... return data.companyName + ' (' + symbol + ') $' + data.currentPrice + ' (Higher: ' + data.hiPrice + ')'; }
-
-
Field Summary
Fields Modifier and Type Field Description private @NonNull String
callbackCode
-
Constructor Summary
Constructors Constructor Description JavaScriptCallbackDisplay(@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()
-