Mapping Integer attribute to WOPopupButton list.
Mapping Integer attribute to WOPopupButton list.
- Subject: Mapping Integer attribute to WOPopupButton list.
- From: Q <email@hidden>
- Date: Mon, 7 Aug 2006 01:52:41 +1000
I am currently reimplementing parts of an existing legacy web application using WO as a learning exercise (I'm a WO newbie), and have been trying both D2W and regular components. One issue I have encountered with the database I am using is that it uses quite a number of integer fields to represent properties that map to strings when presented to the user. However this mapping is not present in the database, only the legacy application's interface code. (I am not able to modify the database schema)
After playing with D2W for a bit and creating a couple of custom components that were virtually identical it occurred to me that this mapping data doesn't really belong in a custom component, instead it should actually be in the eomodel. So I wrote a custom D2W component to map the integer value to the appropriate display string using some custom keys in the attribute's userinfo dictionary from the eomodel. This appears to be an elegant solution, works nicely and seems to fit well with the WO way of doing things, something I am still becoming familiar with.
Anyway, now that I have something working, I was curious how this actually "should" be done, but a search didn't reveal anything "out there" to actually do this using the eomodel to store the relational mapping.
Have I not looked in the right places, or is it just that nobody does it this way?
How does everyone else do this?
-- Seeya...Q
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
_____ / Quinton Dolan - email@hidden __ __/ / / __/ / / / __ / _/ / / Gold Coast, QLD, Australia __/ __/ __/ ____/ / - / Ph: +61 419 729 806 _______ / _\
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden