You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2005/10/20 00:16:55 UTC

DO NOT REPLY [Bug 37176] New: - struts bean utils-problems with properties

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37176>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37176

           Summary: struts bean utils-problems with properties
           Product: Commons
           Version: unspecified
          Platform: Other
        OS/Version: Windows XP
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: Bean Utilities
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: hemanth3698@yahoo.com


Hi ,
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 
persons.
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 person1.name,person1.sex like that.
 
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 ();
 
BeanUtils.copyProperties(person1Model,personForm.getPerson1());
 
but this is failing to copy the properties and throwing 
illegalargumentexception.
 
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

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org