You implement the onClick() method of a link such as the AjaxFallbackLink
http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/ajax/markup/html/AjaxFallbackLink.html
If the AjaxRequestTarget is null then the browser does not have
JavaScript enabled.
@Override
public void onClick(AjaxRequestTarget target) {
if (target !=null)
target.addComponent(cart);
}
Scott
On Mon, Aug 18, 2008 at 10:22 AM, Gregg Bolinger
<[EMAIL PROTECTED]> wrote:
> I apologize if this question has been addressed before however I didn't find
> any thing doing a quick search. What is the recommended practice for
> handling HTML fragments from an AJAX response? For example, if I were doing
> something similar to jquery's load() or prototype's Updater() functions.
> Since in Wicket it seems that each WebPage class represents a single HTML
> page I'm having trouble wrapping my head around it. In an action based
> framework, like Stripes for example, I would simply have an event method
> forward to my JSP that is being returned for the ajax request. In Wicket,
> being a component model, I'm just not clear on the procedure.
>
> Take the Cheesr app from Wicket In Action, for example. In Chapter 3 a
> simple reusable cart component is made but it is plugged in and updated on a
> normal request/response (non AJAX). What would need to change for that
> WebPage/HTML to be updated via an AJAX call? Say if the Add link were
> clicked.
>
> Thanks.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]