struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Kennedy <>
Subject Re: Easy form populate question for gurus
Date Fri, 20 May 2005 13:44:09 GMT

Here is a snippet from my initializing action before it goes to the form 

        LazyValidatorForm ppForm = (LazyValidatorForm)form;
        ProtectedPersonLocal ppl = null;
        ProtectedPersonDTO dto = null;
        String sid = null;
        sid = request.getParameter("sid");
        ppl = 
        dto = ppl.getProtectedPersonBySid(sid);
        BeanUtils.copyProperties(ppForm, dto);

The values in question are java.lang.String objects.  Should be basic 
stuff right?  I stepped through the debugger, and the LazyValidatorForm 
object is being set correctly for the null strings from my VO; however, 
when it comes to displaying the form for editing, the "null" fields 
contain an object reference like java.lang.Object@75ea85.  If I update 
the form with any type of text values, it'll show correctly the next 
time that I go to update the data.  It's only happening when there are 
null values involved.

Hubert Rabago wrote:

>Please provide more information.  How is your form configured/written?
> Are there "initial" values?  What is the type of the data from which
>you're copying a value?
>On 5/20/05, Randy Kennedy <> wrote:
>>Why does an object reference (e.g. java.lang.Object@75ea85) show up in
>>my text fields when I prepopulate the form using Jakarta commons
>>BeanUtils.copyProperties(...)?  The values in the database are null, and
>>I know this has something to do with it, so I guess my real question is,
>>"How do I fix it?".
>>Randy Kennedy
>>Appriss, Inc.

Randy Kennedy
Software Engineer
Appriss, Inc. (Provider of the VINE Service)
10401 Linn Station Road, Suite 200
Louisville, KY  40223-3842

Web   :,
Email :

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

View raw message