AJAX update and file download in one blowPage added by Ernesto Reinaldo BarreiroFollowing example shows how to use an AJAX request to refresh some components and at the same time make the browser ask bask for a file to be downloaded. import org.apache.wicket.IResourceListener; import org.apache.wicket.markup.html.WebMarkupContainer; /** * @author Ernesto Reinaldo Barreiro ([email protected]) * */ public class DocumentResourceListener extends WebMarkupContainer implements IResourceListener { private static final long serialVersionUID = 1L; private IResourceListener resourceListener; /** * Constructor receiving an IResourceListener.. * * @param id * @param resourceListener */ public DocumentResourceListener(final String id, IResourceListener resourceListener) { super(id); this.resourceListener = resourceListener; } /** * Gets the url to use for this link. * * @return The URL that this link links to */ protected CharSequence getURL() { return urlFor(IResourceListener.INTERFACE); } @Override protected boolean getStatelessHint() { return false; } public void onResourceRequested() { this.resourceListener.onResourceRequested(); } }
Change Notification Preferences
View Online
|
Add Comment
|
- [CONF] Apache Wicket > AJAX update and file download in one ... confluence
- [CONF] Apache Wicket > AJAX update and file download in... confluence
- [CONF] Apache Wicket > AJAX update and file download in... confluence
- [CONF] Apache Wicket > AJAX update and file download in... confluence
- [CONF] Apache Wicket > AJAX update and file download in... confluence
- [CONF] Apache Wicket > AJAX update and file download in... confluence
- [CONF] Apache Wicket > AJAX update and file download in... confluence
- [CONF] Apache Wicket > AJAX update and file download in... confluence
- [CONF] Apache Wicket > AJAX update and file download in... confluence
- [CONF] Apache Wicket > AJAX update and file download in... confluence
