I’m new to wicket and stuck with the following problem:
I have a table with 5 rows. Each row contains 7 cells. Each cell has a unique value. Once a cell is clicked, its unqiue value should be posted to the server.
I would like to register only one ajaxfallbacklink (or similar) on the table and adjust the value of the model to the unique value of cell that has been clicked.
My immediate response would be “why do you want to it like that” – the obvious solution is to add an ajax onClick behaviour to each cell/cell content component (obviously you only have to write one behaviour). That’s how it is designed to work.
You could write a handler as you suggest, but it would have to trawl through the table’s component tree, adding the correct JS onClick callbacks to each cell. You then have to think about the semantics of adding an onClick behaviour to a component that doesn’t actually express the onClick event.
Basically a load of custom code, circumventing the frameworks (pretty neat) ajax model for no benefit at all.