[
https://issues.apache.org/jira/browse/WICKET-4540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13270407#comment-13270407
]
Emond Papegaaij commented on WICKET-4540:
-----------------------------------------
All are right, except for the last: it's more like function(x) { var params = {
'x' : x.substring(0,3)}. You can use it, for example, when you want to
stringify an object or limit the string length.
Good catch about using jQuery. I'll open another ticket for that.
> Allow AJAX callback function generation to also generate parameters
> -------------------------------------------------------------------
>
> Key: WICKET-4540
> URL: https://issues.apache.org/jira/browse/WICKET-4540
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 6.0.0-beta1
> Reporter: Emond Papegaaij
> Assignee: Emond Papegaaij
> Fix For: 6.0.0-RC1
>
>
> 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira