0

A common problem when you are working with forms and tabs, is the needs of keeps and validate fields before switching tabs.

Surfing on google, I found a lot of solutions about it. The common solution is override the NewLink method of AjaxTabbedPanel and create an AjaxSubmitLink instead.

My problem is a little different because the above solution create some sort of Wizard.

I have a Page with a form and an arbitrary number of tabs. Every Tab has its own form with its own property model object. Page's form has only a submit form to submit the sum of every fields of every tabs.

What I want to do is switching from a tab to another without the single tab form validation (but with the inner model filled) that has to be validated only with the Page Submit. An inner form may have a required field that has to be checked only with the final submit and not with the inner form validation.

All this without wiquery library.

Is it possible?

3 Answers 3

1

Just a first idea: Could you use a Wizard which kind of mocks the tab behavior?

It would need a custom button bar which has Ajax buttons to move between the steps, i.e. clicking these buttons only replaces the content of the wizard. The actual validation would then be triggered in onFinish(). This would give you nice control over the whole process, and you could also display a custom FeedbackPanel.

0

Tinker with #setDefaultFormProcessing(false).

Note that if you use some sort of a finish button, form processing will happen on the currently visible tab only.

0

After a lot of try, what I want is only available with WiQuery.

Setting setDefaultProcessing to false allows the tabs navigation without validating the inner FORM but the result is the model not filled and then when I return to a previous tab, every input will be blank again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.