Hi Navjot,
I have been working with the BeanUtils things on this problem.
Are you referring to the 'describe' and 'populate' methods? That's what
I've been working on.
I am looking for yet a simpler way to do this. I should say, I wonder if
there's an easier way to do this.  
Let me explain a bit on the situation.
Multipage form. The form bean contains other value objects, and these
value objects have Collection properties, pointing to another set of
Value Objects.

That is, in my original formbean: 
   public MyEJBValueObject getXXX(){...}
   public void setXXXs(MyEJBValueObject e){...}
In the MyEJBValueObject.java, I have:
   public Collection getYYYs(){...}
   public void setYYYs(Collecton c){...}
And the collection YYY actually is a arraylist of AnotherEJBValueObject

With this kind of structure, it's quite tedious to build the
QueryString,
Is that right? I suppose I have to iterate thru the Map described by
BeanUtils and go into further levels, and describe again.  
The worst part is, I don't want to build the 'Form elements' myself.
That is,
I have to come up with indexed/mapped/mixed name, like, 
    SALES.ITEMS[2].DISCOUNT['MONTHLYSPECIAL'].DISCOUNTRATE
Do I have to do that manually? 

Thanks.
Patrick.

-----Original Message-----
From: Navjot Singh [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 05, 2004 2:03 PM
To: Struts Users Mailing List
Subject: RE: Querystring builder


that should be easy.

BeanUtils gives you the way to populate a MAP object from a Bean. Now al
you need to do is iterate over keys, form a querystring with each
name-value pair separated by &.

HTH
Navjot SIngh


>-----Original Message-----
>From: Patrick Cheng [mailto:[EMAIL PROTECTED]
>Sent: Monday, January 05, 2004 11:19 AM
>To: Struts Users Mailing List
>Subject: RE: Querystring builder
>
>
>What I wanted to do is, at some point during the user is completing a
>form,(multipage)
>He can save the form.  Instead of serializing the bean and saving Blob 
>in oracle, I am trying to put things in a QueryString and save the 
>string into oracle.
>And I want to populate that QueryString into a formbean when the user
>resumes.
>
>Any tools?
>
>Thanks a lot.
>Patrick.
>
>-----Original Message-----
>From: James Mitchell [mailto:[EMAIL PROTECTED]
>Sent: Monday, January 05, 2004 12:14 PM
>To: Struts Users Mailing List
>Subject: Re: Querystring builder
>
>
>On Mon, 5 Jan 2004, Patrick Cheng wrote:
>
>> Hi All,
>>
>> I have been trying to find helper class to build QueryString from
>> javabean. Does anyone know of any tool like this?
>
>What are you wanting to do?  Add parameters from your bean?
>
>>
>> Thanks,
>> Patrick.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>--
>James Mitchell
>Software Developer / Struts Evangelist http://www.struts-atlanta.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to