Martin,
I think possibly what you want is AjaxRequestTarget.get():
AjaxRequestTarget target = AjaxRequestTarget.get();
if (target != null) { //...then this is an ajax request, not a static one
target.addComponent(myComponent);
}
This gives you the ajax request target which is bound to the current request
cycle, if the request was generated by wicket's ajax mechanism. There is no
target if the request was not generated by ajax (so there is nothing for you to
add components to, but the whole page should be repainted anyway).
RUSSELL E. MORRISEY
Programmer Analyst Professional
Mission Solutions Engineering, LLC
| [email protected] | www.missionse.com
304 West Route 38, Moorestown, NJ 08057
-----Original Message-----
From: Martin Asenov [mailto:[email protected]]
Sent: Monday, February 15, 2010 10:38 AM
To: [email protected]
Subject: How to ajax update a component without triggered ajaxrequesttarget
Hello guys!
How can I update a component without having AjaxRequestTarget triggered from a
button or a link?
I tried this:
myComponent.renderComponent();
new AjaxRequestTarget(getPage()).addComponent(myComponent)
myComponent has output markup id set to true
both didn't work for me...
Thanks in advance for your help!
Regards,
Martin
This is a PRIVATE message. If you are not the intended recipient, please delete
without copying and kindly advise us by e-mail of the mistake in delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind MSE to any
order or other contract unless pursuant to explicit written agreement or
government initiative expressly permitting the use of e-mail for such purpose.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]