Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Validation for dynamically created fields on WizardPage
Validation for dynamically created fields on WizardPage [message #1827443] Thu, 14 May 2020 15:10
Marie-Saphira Flug is currently offline Marie-Saphira FlugFriend
Messages: 21
Registered: January 2019
Junior Member
Hello,
on my WizardPage, there are a numberOfTexts of Text(main, SWT.BORDER). The numberOfTexts is passed to the Constructor of the WizardPage.
The textfields are created in a for loop in createControl(), so they are not fields of the WizardPage.
I want to check if every Text is not empty. So every ModifyListener calls validate(). My ideas for validate():
1. Have a List of all Texts (as field in WizardPage) that gets validated.
2. Use Control[] composite = ((Composite) this.getControl()).getChildren(); to get all fields (while there are children).

All the examples for validation I found so far use the Texts directly. Is there a better way for validation than one of the above?

Also what to do if the validation differs for each Text?
Previous Topic:Optional Fields on WizardPage
Next Topic:Show filepaths as links in TextViewer
Goto Forum:
  


Current Time: Thu Apr 15 05:23:25 GMT 2021

Powered by FUDForum. Page generated in 0.01846 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top