cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

DefaultUIComponentValidator and coupling

avillanueva
22-Sapphire I

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.

2 REPLIES 2

Thanks to Patrick Williams who pointed out in 10.x, this is configurable. Temp customization at best, oh well...

I've id some validation keys but I am stumped on others. The two are multi-object rename and paste as a copy. Does anyone know how I can discover the validation keys to hook into these actions?

Multi-object rename is trigged when you rename a Cad Doc and the interface appears allowing you to add more items, like a WTPart to the collection. Assumed it was "MULTIRENAME" but does not seem to work. I suspect that this is still using template processors. Does that mean that a validator will not work in this case?

The second is paste as a copy. This is triggered when you copy a few parts and click the Paste icon. An interface appears to make copies of the parts by changing name and number. Assumed it was "pasteAsCopy" but does not seem to work. Tried using jcaDebug but this trial and error. Any thoughts?

Antonio,


Did you ever get your validator working?I am now delving into UI validators and am facing some challenges "hooking up" my validator to the "Finish" click of the Create Change Task Wizard. Do you know what action I need to use and how to register my validator? I did find that in 10.x you can enable a "Customization" button through the Site preference "Client Customization -> Client Customization" = yes. This creates a new button in the Navigator for customization examples and tools. Click Tools->Action to search for available actions.


Top Tags