Home > Notes & XPages > XPages: Validation of Tabbed Panels

XPages: Validation of Tabbed Panels

This article shall start my Blog about the horror we call XPages.

One or another has certainly noticed that, when you use a TabbedPanel on an XPage, the whole validation of the form is screwed. If you change to another tab, where are no fields which should be vaildated, you can save the whole document without filling the mandatory fields on the other tabs.

This is, IBM-typically no bug, it’s a feature.
If the tab is not shown, it isn’t rendered, so he doesn’t exist. Therefore it is clear that the validation of this tab can’t be executed.

IBM knows this problem, there is already an Enhancement-Request since February 2010… unfortunately there hasn’t happen anything
This is the official workaround: 10.Lotus.com

Unfortunately, this isn’t quite elegant.

Here is another solution:

If you add a save-event in the onClick-event of every tab in the tabbedPanel, the XPage tries to save the document everytime you want to change the tab, which fires the validation. The catch is, of cource, you have to accept that the document is saved on every change of the tab. This solution is only vaild, if you have all your mandatory fields on one tab.

Attention: You shouldn’t check “Process Data without validation”. Also you should pay attention, that the document is only saved in the edit-mode.

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: