Just curious as to how others would implement this example.

Let's say I have an Order object that has a field called prdCde (product code). The value for product code that I store in the Order object is it's unique id. That unique id is associated with a Description in the PRDCDELUP (Product Code Lookup) table.

I am displaying a list of Order objects using <h:datatable> and when I get to the "Product Code" column I want to display the description of the product code rather than it's unique id, because the unique id will mean nothing to the user. My thought is to build a custom converter to do this but am wondering if that is the right direction to go or not.

I know I could do it other ways, but it seems I would always be messing with my model objects, making them provide lookups that they should not have to do (i.e. having the Order object provide a method called getPrdCdeDescr() just isn't the way I want to go)

Thoughts?
Aaron Bartell



Reply via email to