hi!
i have the following scenario
in my database i have an Agency table(which includes the attribute AGENCY_ID) and a Client tables(which includes a AGENCY_ID that maps to the id in the Agency table)
agencies are created first through a web interface.
after that you create Clients. what i want is that when you are filling in the details for the client, i want a drop down list that includes the AGENCY_ID of all agencies that are in the database. so the person fiiling in the info can select a particular AGENCY_ID for that client)
right now in my ClientForm, i have an int agencyId. i want this populated on the basis of the selection made form the drop down list.


how do i do this? any suggestions?
i'm thinking of reading all agencies, chucking them into a collection, placing the collection in the session context and then reading off it in the jsp page using html:options


The downside to that is that my ClientAction forwrads to client.jsp(where you add client details). And i do not particularly want to put all the Agency reading bit into ClientAction.
I could use a separate Java class, but i have an action DisplayAgency that reads all the agencies from the database, adds them to a User bean, puts this in session context and later the page this action forwards to uses logic:iterate to move through the collection in the User bean and display it. Having another Java class to read only the id's and put them in a collection and place this in sesision seems like duplicatng an existing task(with sme minor differences)


are there any other ways of doing this?

thanks
cheers
ajay

_________________________________________________________________
Chat via SMS. Simply send 'CHAT' to 1889918. More info at http://ninemsn.com.au/mobilemania/MoChat.asp?blipid=6800



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



Reply via email to