Hi Korbinian,

I don’t think you can make “dependent” stateless ajax components.

Due to the stateful nature, the page is built anew for each ajax request.
As such you cannot depend on visibility being controlled from an earlier
(stateless) ajax request.

My suggestion would be to either

a) do the visibility change purely client side (so all nested components
are always available on recreation of the page)
b) pull the functionality up into a behavior that you add to the page
itself; So a custom ajax behavior that you pass some params in the url,
which you extract when the behavior is called

… and if it’s not really statelessness you are after but clean urls …

c) map the page using a mapper which doesn’t put the page id in the url;
The public URL is clean, but ajax urls will refer to stateful urls.

Met vriendelijke groet,
Kind regards,

Bas Gooren

Op 1 juli 2024 bij 10:14:31, Korbinian Bachl (
korbinian.ba...@whiskyworld.de.invalid) schreef:

Hi,

is there any guide or direct guidance on how to make complete stateless
ajax components?

For example on a simple AjaxEventBehaviour "onClick" its enought to supply
a unique ID thats reachable, but if you have an Ajaxified Panel that has
sub-"clicks" on it, I cant find a way to make the subcomponents stateless
since the parent is not visible all times (only after it hast been made
visible via an AJAX call) meaning the target ID is not existing in the DOM.

Best,

KB

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to