Hi Koen, I typically try to keep my action forms as simple as possible, so I would go with the former approach. This leaves a clearer separation between your presentation objects and business objects.
One place where this is important is in clustered environments, as action forms are typically stored in the session, when deployed in the beans need to serialised and the less complex the beans, the less chance of problems here. Regards, Ron -----Original Message----- From: Koen Jans [mailto:[EMAIL PROTECTED] Sent: 21 September 2005 14:45 To: Struts Users Mailing List Subject: passing JavaBeans through an ActionForm? Here's my problem; A user has several accounts, represented by AccountBean objects, all having a unique accountId. Now, i have a form where the user can select one of his accounts to edit through a radio button selection. For the associated ActionForm, i see two options to represent the selected account; 1) on my ActionForm; a property "int selectedAccountId" 2) on my ActionForm; a property "AccountBean selectedAccount" The first option seems good because it preserves the philosophy that an ActionForm represents the user's input.. The second is nice because the edit-Action, associated with the form, can immediately extract the selectedAccount from the ActionForm, whereas using the first approach, a database call is needed to retrieve the selected account again by the account's id. Which option would you prefer, and especially why? Thanks for your time --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] E-Mail Disclaimer Aus Rechts- und Sicherheitsgruenden ist die in dieser E-Mail gegebene Information nicht rechtsverbindlich. Eine rechtsverbindliche Bestaetigung reichen wir Ihnen gerne auf Anforderung in schriftlicher Form nach. Beachten Sie bitte, dass jede Form der unautorisierten Nutzung, Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser E-Mail nicht gestattet ist. Diese Nachricht ist ausschliesslich fuer den bezeichneten Adressaten oder dessen Vertreter bestimmt. Sollten Sie nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein, so bitten wir Sie, sich mit dem Absender der E-Mail in Verbindung zu setzen. For legal and security reasons the information provided in this e-mail is not legally binding. Upon request we would be pleased to provide you with a legally binding confirmation in written form. Any form of unauthorised use, publication, reproduction, copying or disclosure of the content of this e-mail is not permitted. This message is exclusively for the person addressed or their representative. If you are not the intended recipient of this message and its contents, please notify the sender immediately. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]