You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "jstuyts (via GitHub)" <gi...@apache.org> on 2026/02/28 12:47:45 UTC
[PR] WICKET-7177: alternative replacment method support [wicket]
jstuyts opened a new pull request, #1385:
URL: https://github.com/apache/wicket/pull/1385
One implementation supporting the replacement of XML is provided.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@wicket.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] WICKET-7177: alternative replacment method support [wicket]
Posted by "jstuyts (via GitHub)" <gi...@apache.org>.
jstuyts commented on PR #1385:
URL: https://github.com/apache/wicket/pull/1385#issuecomment-4069048113
@kbachl Yes, jQuery does not support XML, so a different way of replacing markup is needed.
I do not mind removing jQuery, but that seems like a much larger change for supporting a very narrow use case. Also, the replacement of jQuery must be 100% compatible. If developers are already sending SVG or MathML (possibly surrounded by HTML) in their responses, a replacement must not change the semantics. So even with a jQuery replacement, alternative replacement methods will still be needed.
Side note: I first tried [Preact](https://preactjs.com/) because this would also give more efficient DOM updates, but ran into 2 problems:
* Because elements are not replaced but updated, listeners were registered multiple times.
* I could not get XML replacement to work reliably.
This implementation was also chosen because I want to be able to mix existing (third-party) Ajax code with replacement-method aware code. Both get the same `AjaxRequestTarget` and can use it without interfering with each other.
The logic for replacing markup is:
* Use the default jQuery method if no replacement method is specified. This ensures all current code behaves the same.
* Use a registered replacement method if one is registered for the identifier.
* Throw an error if an identifier in the response does not have a replacement method registered for it.
The changes can only be used if you are aware they are there. Existing JavaScript that calls Wicket directly will continue to work, and will see the current behavior.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@wicket.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] WICKET-7177: alternative replacement method support [wicket]
Posted by "jstuyts (via GitHub)" <gi...@apache.org>.
jstuyts commented on PR #1385:
URL: https://github.com/apache/wicket/pull/1385#issuecomment-4929716289
@kbachl @martin-g what can I do to get this approved?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@wicket.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] WICKET-7177: alternative replacment method support [wicket]
Posted by "martin-g (via GitHub)" <gi...@apache.org>.
martin-g commented on PR #1385:
URL: https://github.com/apache/wicket/pull/1385#issuecomment-4068068219
I am not doing web development since many years. The code looks OK but I am not the best person to review it at the moment.
I know that @kbachl is interested in removing the usage of jQuery for Wicket.NEXT.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@wicket.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] WICKET-7177: alternative replacment method support [wicket]
Posted by "kbachl (via GitHub)" <gi...@apache.org>.
kbachl commented on PR #1385:
URL: https://github.com/apache/wicket/pull/1385#issuecomment-4068221279
So if I understand it correctly, the whole idea behind this patch is to allow to overcome a limitation jQuery has?
Wouldn't it be more logical to rethink the jQuery need itself?
When looking at the code the only thing I've noticed is the absence of a default legacy method to be used when no replacementMethod is available? - this might be a problem for anyone that did some manual JS to talk to wicket before, wouldn't it be?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@wicket.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org