Class JavaScriptCallbackAction

  • All Implemented Interfaces:

    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 Detail

      • callbackCode

        private @NonNull String callbackCode
    • Constructor Detail

      • JavaScriptCallbackAction

        public JavaScriptCallbackAction​(@NonNull
                                        @NonNull String callbackCode)
    • Method Detail

      • getCallbackCode

        public @NonNull String getCallbackCode()
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        hashCode in class Object