Hi,
Do something like this:
* create a form with hidden field(s) and a hidden submit-button, and
configure this button to be ajax-submitted.
* on page onload scan the DOM, and attach an onclick event handler to
all the "tons" of links you want to do something on ajax. I'd use some
javascript framework like JQuery or YUI to bind these event handlers,
but some plain js code will do too.
* when such a link is clicked, then put the parameters into the hidden
fields of your ajax-form, and call the "click" or "submit" method of its
button.
If you really have 100s/1000s of such ajax links then you may consider
using event delegation for better performance in the browser. But first
just do the simple stuff. See:
http://developer.yahoo.com/yui/examples/event/event-delegation.html
Cheers,
Zoltan
Douglas Ferguson wrote:
well the specs are for ajax. they want the controls to not get redrawn just the
data table.
which looks awesome when they click on the controls and see the list change
quickly.
I made the links external links and applied the same behavior to all of them using
"getComplent().getParent().getModel()"
That seemed to make things a little better...
D/
On Dec 10, 2009, at 1:49 AM, Per Lundholm wrote:
... or do not use ajax ... what happens when you click ... are you not taken
to a search result ... might as well redraw the page.
/Per
On Thu, Dec 10, 2009 at 7:47 AM, Douglas Ferguson <
[email protected]> wrote:
I'm supporting some code that builds an ajax link per "tag" aka. tag cloud.
When there are tons of tags, this can take quite some time.
My guess is all the overhead in having wicket build all the callbacks for
each link.
Is there a way to implement a group of ajax links that share the same
callback?
D/
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]