You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Kapadia Mitesh-C23457 <Mi...@motorola.com> on 2003/08/21 18:53:03 UTC

DB Access from BLB

Hello.  I am fairly new to STRUTS and am trying to write a BLB (Business
Logic Bean) in the 'Model' to connect to a database, do a simple query, and
return a resultset.

Should I then read the resultset into the DTO/Value Object/DataBean so I can
dispay them on the appropriate page?  

Any advice and assistance would be most appreciated.

Thanks in advance.

- Mitesh

Re: DB Access from BLB

Posted by Emerson Cargnin <em...@tre-sc.gov.br>.
I'm not so expericed in struts, so any correction  from the gurus are 
welcome.

If your DTO is a list, I think you have to put it at some context 
(req,session or app, it depends of the your app). So at at the page you 
use iterate (for a table list), or select/options (for a combobox), etc. 
If it's the data for changing (eg: editing data from a business entity), 
you can use BeanUtils.copyProperty to copy the data from your DTO to 
your from FormBean.

Emerson Cargnin

Kapadia Mitesh-C23457 wrote:
> Hello.  I am fairly new to STRUTS and am trying to write a BLB (Business
> Logic Bean) in the 'Model' to connect to a database, do a simple query, and
> return a resultset.
> 
> Should I then read the resultset into the DTO/Value Object/DataBean so I can
> dispay them on the appropriate page?  
> 
> Any advice and assistance would be most appreciated.
> 
> Thanks in advance.
> 
> - Mitesh
> 


-- 
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181


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