AjaxTabbedPanel – Store state when switching tabs

Normally when you switch tabs of an AjaxTabbedPanel it won’t store the state of all your input fields. If you do want this, without pressing a save button, you have to override the newLink(String linkId, final int index) method of the AjaxTabbedPanel class and use an AjaxSubmitLink instead of the default AjaxFallbackLink. Now all values will be stored in the model (not saved to the database).

Keep in mind that all Wicket validations will be validated, so we have to take care of the FeedbackPanel (refreshing) as well.

Continue reading AjaxTabbedPanel – Store state when switching tabs

AjaxTabbedPanel in combination with AjaxLazyLoadPanel

Wicket (extensions) offers a AjaxTabbedPanel to take care of your tabs. The constructor of the AjaxTabbedPanel expects a wicket id (obviously) and a list of ITabs. The implementation of this interface should return the panel via getPanel(String panelId) which will be the ‘actual’ tab. Out-of-the-box Wicket (extensions) offers an abstract implementation of this interface (AbstractTab).

What I want to achieve is that an AjaxIndicator (loading image) will be shown on the place were the actual panel will come till it is completely loaded. Especially when you have a lot of components to render this can be handy. See image below.

Example

Example

Continue reading AjaxTabbedPanel in combination with AjaxLazyLoadPanel