commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex" <>
Subject RE: struts bean utils-problems with properties
Date Thu, 20 Oct 2005 07:34:44 GMT
First of all debug and see that personForm return what it is expceted.
If it is true, then be sure that all methods of personForm.getPerson()
names equals that in model, and third, (what i would do is debug
BeanUtils.copyProperties to see what is really executing.

If the problem persists i recomend you using Dozer API rather than

-----Mensaje original-----
De: hem hem [] 
Enviado el: jueves, 20 de octubre de 2005 9:30
Asunto: struts bean utils-problems with properties

Hi all,
i am new to this forum.this is my first post.i hope this mailing list
helps me.
in the first page in my struts web app, i need to enter the details of 5
they have proprties name,sex,rollnumber and age
for that i created a bean with these 4 properties which have getter and
setter methods in it.
then i instantiated the bean 5 times for the properties of 5 persons
the bean name is person
in my action form i instatiated like this:
Person person1=new Person();
Person person2=new Person();
Person person3=new Person(); and so on
in my jsp i used the property names as, like
so far its ok
but i need to populate the model objects from this form.
for that 
i used apache commons beanutils as below:
PersonModel is exactly the same bean as my Person bean with exactly the
same properties and same getter and setter methods.
but the datatypes of properties in PersonModel are diffrent from Person
bean(all the properties are Strings in Person but 2 are
Strings,1Long,1int in PersonModel)
PersonModel  person1Model=new PersonModel ();
but this is failing to copy the properties and throwing
can anyone help how can i achieve this(copying properties)
it seems to be nested property problem.i am new to struts.
your suggestion are very much appreciated.
regards and thanks in advance

 Yahoo! Music Unlimited - Access over 1 million songs. Try it free.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message