Hi Everyone,

Just wondering what the best practices were when it comes to
displaying friendly names of foreign key based values in an Entity
Bean at the View layer. So lets say for example I have a User bean
with all the standard getter/setter methods for id/name/dob/age etc,
but I also have a UserTypeId property which is stored as an ID value
only corresponding to the foreign key "variables.instance.usertypeid"

Now i will obviously have a getter and setter for getUserTypeId and
setUserTypeId, however at the View layer i also want to display the
actual User Type name somewhere, and I don't like the idea of making
additional Gateway calls just to grab a single name value? I've read
that some people will create objects out of all reference data such as
having a UserType object which is stored against the User directly,
and I can then output the name by writing
#objUser.getUserType.getName()# for example.

I seem to run into this issue a lot as the bigger the Entity bean the
more foreign key references will usually exist and somewhere at the
View layer i need to get the user friendly name value and display it.
Would love to hear what others are doing with regards to this?

Cheers
Phil

-- 
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.

Reply via email to