White, Joshua A (CASD, IT) wrote:
This is what I have done thus far:

1 Developed domain objects.
2 Developed persistence tier

Problem:

Where should the code which takes a key from a domain object (for example
orderTypeId) and looks it up in a database to get the corresponding values?
This type of logic doesn't really fit in the domain object tier.  Is this
done by DAO only?  Assuming that all I need is a name/value pair, what type
of object/collection should this DAO return?  How/where should I then
convert these values into an object/collection of objects the struts
html:select tags can use?

Select does not use a collection. Select just gets/sets a current value.
If confused, just use a html:text first and validate (for example w/CRUD). Set dept id = 101

Then.... you could use optionsCollection; and like you said it needs a collection of all possible values. As long as it ends up in JSP scope (request? or nested) you should be set. (101/Marketing, 102/Sales, 103/ Accounting, etc.)

hth,
.V

-Joshua



This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return email and delete this communication and destroy all copies.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to