private void generateCallbackConfiguration(Map<String, Object> mainConf, TableConfiguration tableConfiguration) { if (tableConfiguration.getCallbacks() != null) { for (Callback callback : tableConfiguration.getCallbacks()) { mainConf.put(callback.getType().getName(), callback.getFunction()); } } } }
private void generateCallbackConfiguration(Map<String, Object> mainConf, TableConfiguration tableConfiguration) { if (tableConfiguration.getCallbacks() != null) { for (Callback callback : tableConfiguration.getCallbacks()) { mainConf.put(callback.getType().getName(), callback.getFunction()); } } } }
/** * <p> * Adds a {@link Callback} to the DataTables generated configuration, * specifying a method of updating if the {@link CallbackType} already exists * in the configuration. * * @param callbackType * The type of the callback. * @param javascript * The Javascript code to execute in the callback. * @param mode * Method of updating used for this parameter. */ public void addCallback(CallbackType callbackType, String javascript, Mode mode) { addParameter(new Parameter(callbackType.getName(), new JsFunction(javascript, callbackType.getArgs()), mode)); }
/** * <p> * Adds a {@link Callback} to the DataTables generated configuration, * specifying a method of updating if the {@link CallbackType} already exists * in the configuration. * * @param callbackType * The type of the callback. * @param javascript * The Javascript code to execute in the callback. * @param mode * Method of updating used for this parameter. */ public void addCallback(CallbackType callbackType, String javascript, Mode mode) { addParameter(new Parameter(callbackType.getName(), new JsFunction(javascript, callbackType.getArgs()), mode)); }
/** * <p> * Adds a {@link Callback} to the DataTables generated configuration. * * <p> * By default, if the {@link CallbackType} already exists in the * configuration, the code will be appended to the existing code. * * @param callbackType * The type of the callback. * @param javascript * The Javascript code to execute in the callback. */ public void addCallback(CallbackType callbackType, String javascript) { addParameter( new Parameter(callbackType.getName(), new JsFunction(javascript, callbackType.getArgs()), Mode.APPEND)); }
/** * <p> * Adds a {@link Callback} to the DataTables generated configuration. * * <p> * By default, if the {@link CallbackType} already exists in the * configuration, the code will be appended to the existing code. * * @param callbackType * The type of the callback. * @param javascript * The Javascript code to execute in the callback. */ public void addCallback(CallbackType callbackType, String javascript) { addParameter( new Parameter(callbackType.getName(), new JsFunction(javascript, callbackType.getArgs()), Mode.APPEND)); }