[prev in list] [next in list] [prev in thread] [next in thread] 

List:       struts-user
Subject:    RE: Passing collection Objects from html form to Action class
From:       "Mark Benussi" <mark_benussi () hotmail ! com>
Date:       2005-06-30 22:43:24
Message-ID: BAY17-DAV18FDEF3496FD9A4CA01AF3F0E30 () phx ! gbl
[Download RAW message or body]

You're quite right, the scenario you described would be very inefficient.
But in the same sentence I assume those 50 - 60 items are reference data
(Countries, UOMs etc) and to hit the database to get a list of data like
that every time would in my eyes be expensive even for each user. A façade
or any other caching mechanism could hold those pieces of data to be
retrieved by the form when needs be.

Enough already, I have had a Stella and am ranting (Fired by today's drivel
OT conversations). I find the session forms annoying from my perspective as
I use them in a Wizard based approach (Back and Next) which handles creates
and updates so I have to be really careful about what I do and don't reset.
I would love a tag I could drop into my forms to copy properties to the next
request form without having to describe the underlying data, as suggested.
In fact I like this idea so much that I am going to crack on with it, I may
let you know how I get on if it is a worthy solution.

-----Original Message-----
From: Phani [mailto:phanidhar_j@yahoo.com] 
Sent: 30 June 2005 17:38
To: Struts Users Mailing List
Subject: RE: Passing collection Objects from html form to Action class

Tell me which is performance efficient & desired way:

Putting the form in session or making a trip to the
database..

assuming we have collection of 50 - 60 records..

Phani..

--- Mark Benussi <mark_benussi@hotmail.com> wrote:

> Sadly you cannot unless you make the scope of the
> form session.
> 
> I find it limiting to say the least!
> 
> 
> 
> -----Original Message-----
> From: Phani [mailto:phanidhar_j@yahoo.com] 
> Sent: 30 June 2005 16:14
> To: Struts Users Mailing List
> Subject: Passing collection Objects from html form
> to Action class
> 
> I have a Collection Object in my JSP which I am able
> to display using display Tag.
> 
> I want to render those collection objects when I
> submit my html form, so that I can retrieve them in
> my
> Action class as form property.
> 
> If it is a string, I can render it as hidden field..
> 
> <input type="hidden" name="name"
> value="<%=myForm.getName()%>"/>
> 
> And in the Action class I can just say, 
> 
> String name = myForm.getName();
> 
> How can I achieve the same thing for a collection
> object.
> 
> Thanks,
> Phani.
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic