We have a listform component that display email addresses. These email addresses are editable fields. We were given a requirement to validate the entered email addresses, are a valid format. If they are not a valid format, they want the field highlighed in red. We can check the changed element's value and validate it but, when we add style classes the the element, something like this... elements.emailaddr.addStyleClasses("error"). The style gets applied to ALL elements with this name. So, if we have 5 email addresses showing in the listform component... we now have all 5 text boxes have the style class applied.
How can we make it so just the element associated with the validation error have the style class applied?
On inspection it appears as if servoy gives each instantiation of the element the original id with an _1 or _2 etc. is there a way to programmatically gain access to that element?