petraNemcova
Programmer
Hi there,
I wonder if it's to create a form bean with composition. I mean, assuming I have the following 2 classes:
AccountInformation ( fname, lname...)
CreditCard (number, type...)
I would like to know if I can create a form, registration, that is composed from AccountInformation and CreditCard???
it will look like this:
class Regitration
AccountInfomration accountInfo;
CreditCard creditCard;
So...
1. is it possible to do that?
2. if yes, how would the registration.jsp page will look like?
If it was a regular form, it would have been:
<td>
<fmt:message key="register.creditcard.number"/>
</td>
<td>
<html:text property="ccNumber"
size="30"
maxlength="30" />
<html:errors property="ccNumber" />
</td>
what comes in the property (i tought creditCard.number but that doesn't work)
thanks for any advise.
I wonder if it's to create a form bean with composition. I mean, assuming I have the following 2 classes:
AccountInformation ( fname, lname...)
CreditCard (number, type...)
I would like to know if I can create a form, registration, that is composed from AccountInformation and CreditCard???
it will look like this:
class Regitration
AccountInfomration accountInfo;
CreditCard creditCard;
So...
1. is it possible to do that?
2. if yes, how would the registration.jsp page will look like?
If it was a regular form, it would have been:
<td>
<fmt:message key="register.creditcard.number"/>
</td>
<td>
<html:text property="ccNumber"
size="30"
maxlength="30" />
<html:errors property="ccNumber" />
</td>
what comes in the property (i tought creditCard.number but that doesn't work)
thanks for any advise.