What I do is my BaseFormBean implements a collection.

So it's both!
It has getters/setters.
When iterator or next() is called it goes to the next item in list. Because it simplifies, it makes more complex designs possible.


Others make each getter and Array[].

hth,

[EMAIL PROTECTED] wrote:

Hi,

I am using Torque with Struts.

I need to display some data from database in .jsp file.

I retrieve my data in action class as:

Criteria criteria = new Criteria;
List customerList = CustomerPeer.doSelect(criteria)

Now I have a list populated with objects made by Torque..?

I would like to return a list of formbeans presenting the customer
instead of these objects.

Something like:

List customerList = (myCustomerFormBean)CustomerPeer.doSelect(criteria);

Is it possible to cast a CustomerPeer object to formbean? If not
how should I do this?

Should I even try to return formbeans or is ok to use objects?
Formbeans should be lighter as least???


Thanks in advance,



Ville Kaseva



-- Vic Cekvenich, Struts Instructor, 1-800-917-JAVA

Advanced <a href ="baseBeans.com">Struts Training</a> and project recovery in North 
East.
Open Source <a href ="baseBeans.com">Content Management</a>  basicPortal sofware
Best practice<a href ="baseBeans.com">Struts Support</a> v.1.1 helper ScafflodingXPress




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



Reply via email to