Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-4540

Allow AJAX callback function generation to also generate parameters

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 6.0.0-beta1
    • 6.0.0-beta2
    • wicket
    • None

    Description

      We need an easy way to pass parameters from JavaScript to Java via a function that takes parameters. For example, of JQuery UI event callbacks, the function takes two parameters: event and ui. But, these aren't the parameters you want to pass to Java. A conversion is needed.

      I was thinking about the following: let getCallbackFunction take a CallbackParameter vararg, with 4 implementations for CallbackParameter: ContextParameter, ExplicitParameter, ResolvedParameter and ConvertedParameter. A context parmater, only provides context to the function, it is not added to the Ajax call. Both event and ui are context parameter. Explicit parameters are context parameters that are also passed to the Ajax call. Resolved parameters are resolved using some javascript code. The last adds a context parameter and a conversion script to add it to the Ajax call.

      Attachments

        Activity

          People

            papegaaij Emond Papegaaij
            papegaaij Emond Papegaaij
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: