jakarta-ecs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kurz <i...@martinkurz.com>
Subject Re: custom Table
Date Tue, 24 Feb 2009 22:13:37 GMT
Hi Thufir,

Zachary allready wrote a lot about possible problems with different 
scopes in jsp, passing the ResultSet this way shouldn't bring up any 
problem IMHO - as long as the instance is destroyed after the page has 
rendered (don't know exactly if the reference to a resultset in your 
instance blocks your database connection as long as the resultset can't 
get destroyed (but I assume this), so maybe you should consider 
executing an explicit close() on the resultset). But I didn't understand 
the first part of your mail:

Thufir schrieb:
> I think that the problem with this class is that setColumnNames and 
> setData aren't really setting attributes.  I suppose I should make 
> instance attributes like "header" and "data"?

You want to render a table, so you're creating rows for header an data 
and adding them to the parent table. If you want to alter the table 
after creation, you could additionally keep the TRs in a list as 
attributes or something like this.

But in difference to swing (or something like this), you're just 
generating HTML, sending it to the client and the server part is 
finished. The client renders the html you created and maybe, there well 
be a click on a link or a form will be submitted, so you're having a new 
request, you don't get a gui event like in swing. To simulate this 
behaviour over http, there are technologies like jsf (or some other 
frameworks like http://wingsframework.org/ what is some more like swing).

Greetings,

Martin

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


Mime
View raw message