there is a quick way to make displaytag work with resultset using Dynabean, see:
 
http://jakarta.apache.org/commons/beanutils/api/org/apache/commons/beanutils/RowSetDynaClass.html
 
a sample from the RowSetDynaClass javadoc:
 
   Connection conn = ...;  // Acquire connection from pool
   Statement stmt = conn.createStatement();
   ResultSet rs = stmt.executeQuery("SELECT ...");
   RowSetDynaClass rsdc = new RowSetDynaClass(rs);
   rs.close();
   stmt.close();
 
 
at this point "rsdc" can be used directly as a source for the displaytag table

(this should be added to the faq...)

fabrizio


Da: Matt Raible
Inviato: lun 02/02/2004 21.08
A: [EMAIL PROTECTED]
Oggetto: RE: [displaytag-user] how to use dt with database

You are correct, the displaytag does not currenly support recordsets.
The main reason for this is because recordsets maintain an active
connection to the databaes, and you'd have to close this connection in
your JSP - which is bad for MVC-based design.

Matt

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Fefer Dušan
> Sent: Monday, February 02, 2004 12:17 AM
> To: [EMAIL PROTECTED]
> Subject: [displaytag-user] how to use dt with database
> 
> 
> hi,
> 
> first, nice job you did / are doing with dispalytag.
> 
> i hope it's not to annoying to ask this, but how to use dt 
> with database (recorset...) ? you allways start with a 
> predefined list. i tried with database and failed, exept when i 
> create generic list object and copy everything from rcordset 
> to this object
> 
> Best regards, 
> 
> Dušan Fefer 
> mailto:[EMAIL PROTECTED]
> mailto:[EMAIL PROTECTED] 
> Phone  : +386 (1) 4722 622 
> Fax    : +386 (1) 4722 606 
> Mobile : +386 41 718 067 
> 
http://www.mobitel.si
http://www.biddingquest.com



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the
breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
displaytag-user mailing list [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-user




-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
displaytag-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to