ViewValidation unable to validate components on hidden tabs

Hi Jmix Support team,

Currently we are facing an issue while using a method from the ViewValidation class viewValidation.validateUiComponent(Component component) when the components is inside of a Jmix TabSheet’s Tab that is hidden or not selected (in the background).

From my observation this is probably because the components are treated as disabled when they are in unselected tabs during the validation process? (isEnabled() = false) and that the method will ignore the components that are disabled.

Could you please verify the behavior of this, and also how can we validate all of the components/fields, including the ones behind “hidden” tabs during an event such as “saveBtnClick” for example, since previously in CUBA it will validate all the components alongside the ones in unselected tabs.

Best Regards,
Wei Jian.

Hi Wei Jian

I can imagine, that if you have lazy loading for the tabs data are not loaded.

Best regards
Felix

Hi Felix,

For my case I’m pretty sure the tabs and the components in there are loaded since I do test scenarios where I open up those tabs before validating them, just that during the validation it only considers the components at the current selected tab.

Also tried to dump out the properties of the other components that are in the other tabs and they are considered disabled, so not sure how can I prevent this.

P.S. Some components are in a fragment that is in the tab, wondering if this would cause a different behavior.

Best regards,
Wei Jian.