Database query inserting null.

I

infonote

I have everything working in a registration form. I can submit to
database etc. (Using Struts EJB3). I have the same datatypes in both
actionform and entity bean.

Do the names of the methods have to be the same in entity and
actionform?
It seems that what the user enters in the form is not stored.

This is 1 get anf set method of actionform.

public String getAddress1() {
return cAddr1;
}

public void setAddress1(String string) {
cAddr1 = string;
}

Does the ordering of methods matter?

The only problem is that it is submitting null values when i
use beanutils.copyproperties(client,registeractionform).
1) I have get and set methods of field in actionform
2) I call the registerform from register action using:

RegisterActionForm registerform = new RegisterActionForm();

Client client = new Client();
// using the BeanUtils class to copy data from form to
object
//client
BeanUtils.copyProperties(client,registerform);

Thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,225
Latest member
Top Crypto Podcasts

Latest Threads

Top