Apache Wicket > Framework Documentation > Reference library > How to do things in Wicket > AJAX > How To Make The Same Form Work With and Without Ajax
Added by Will Hoover, last edited by Will Hoover on Feb 22, 2008

In your WebPage:

AjaxFallbackButton a = new AjaxFallbackButton("id", form) {
		@Override
		protected void onSubmit(AjaxRequestTarget target, Form form) {
			if (target != null) {
				// Ajax submission
			} else {
				// Normal submission
			}
		}
	};
	form.add(a);