I have the following Bean, which represents an Account I am working on:

public class PaymentBean {
   String acctNumber;
DebtorBean debtor; // The person who owes money(s). MAkes sense to use this bean as I used it throughout the app PayorBean payor; // The person making the payment(s) Same reason as above.
   CreditCardBean cc;  // The card used to make the payment(s).
SinglePaymentBean[] singlePayment; // A bunch of singlePayments to be made, with a $ amount, a fee, and a date
}

I have tried several different ways in my AccountAction to populate this bean from the data entered on the form. I can, of course, read multiple layers down inside my nested beans and display it in a JSP, but how I do I allow for data entry into them? Does one create a simple form that has a bunch of simple text fields, and the action then uses all of these to populate the pieces of the various beans that make up Payment Bean. Or is there a correct way to represent this structure inside of my form so that the data goes directly into the appropriate subBean upon form submittal? I went through the person showcase, and thought I was on the right track, but based upon that simple example, i was never able to get the data from the form to the bean. Yes, I can get errors to you from the experiment if it helps.

I could supply jsp and action code examples, but they are all just failed tests at this point. I am so in need of direction on how best to design and implement this base concept in Struts 2. Any, ANY, advice and help would be greatly appreciated.

Skip Hollowell


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

Reply via email to