Question
DefaultUIComponentValidator and coupling
I have a simple validator that I am writing to add some business logic to Part and Document creation. I need to limit names to 40 characters (thank you SAP) and I do not want to touch DB. This is more of a guideline for users. Obviously, there are many ways that Parts and Docs can be created. As per customizer's guide, I need to figure out the validationKey and map my validator in a properties file to that key. I was able to guess these since they are action names typically.
Second thing I noticed is that the call out for the "name" field is not consistent. Example: In the standard create Part wizard, the field name for name is this big long String with "wt.part.WTPartMaster~MBA|name" in the middle somewhere. Also, there are two fields like that since one as "old" at the end. I am having to loop through the form data to id the right one.
However, for the rename action, the field name has "name_col_name" in it. So, I am noticing that my generic validator is tightly coupled to the action and its unique form attribute names. Not only do you have to specify them in a properties file, you need to account for the validationKey in the class file and the unique field name key word that corresponds with that validationKey. Messy.
Antonio Villanueva - Sr. Software Engineer - ISR Systems
UTC AEROSPACE SYSTEMS
100 Wooster Heights Road, Danbury, CT 06804
Tel: +1 203 797 5682
antonio.villanueva@utas.utc.com<">mailto:antonio.villanueva@utas.utc.com> www.utcaerospacesystems.com
CONFIDENTIALITY WARNING: This message may contain proprietary and/or privileged information of UTC Aerospace Systems and its affiliated companies. If you are not the intended recipient please 1) do not disclose, copy, distribute or use this message or its contents, 2) advise the sender by return e-mail, and 3) delete all copies (including all attachments) from your computer. Your cooperation is greatly appreciated.
Second thing I noticed is that the call out for the "name" field is not consistent. Example: In the standard create Part wizard, the field name for name is this big long String with "wt.part.WTPartMaster~MBA|name" in the middle somewhere. Also, there are two fields like that since one as "old" at the end. I am having to loop through the form data to id the right one.
However, for the rename action, the field name has "name_col_name" in it. So, I am noticing that my generic validator is tightly coupled to the action and its unique form attribute names. Not only do you have to specify them in a properties file, you need to account for the validationKey in the class file and the unique field name key word that corresponds with that validationKey. Messy.
Antonio Villanueva - Sr. Software Engineer - ISR Systems
UTC AEROSPACE SYSTEMS
100 Wooster Heights Road, Danbury, CT 06804
Tel: +1 203 797 5682
antonio.villanueva@utas.utc.com<">mailto:antonio.villanueva@utas.utc.com> www.utcaerospacesystems.com
CONFIDENTIALITY WARNING: This message may contain proprietary and/or privileged information of UTC Aerospace Systems and its affiliated companies. If you are not the intended recipient please 1) do not disclose, copy, distribute or use this message or its contents, 2) advise the sender by return e-mail, and 3) delete all copies (including all attachments) from your computer. Your cooperation is greatly appreciated.

