Lets say i have a multi layer application may be with EJBs for business and some web layer framework for front end. I have some trouble mapping attribute validation across the layers.
For basic field level 'null check' validations i use the validation in the front end framework itself. But for cross field business validations obviously have to be done in the business layer only.
The trouble i am facing is the context of the web layer is a bit different from the existing business layer. So same attribtues are named differently in web layer and business layer.
For example, a 13 digit id code will know as 'item id' in business layer and '
unit upc' in web layer. So after validation, an error will be thrown from business layer, saying 'item code invalid'. But the message means nothing to the front end user. I have to display a message like 'unit upc invalid'. Any inputs on how i can effectively manage all these metadata on attibute names across layers generically???