[Seaside] Changes in GOODS not showing in browser

Avi Bryant avi at beta4.com
Tue Aug 3 20:15:06 CEST 2004

On Aug 3, 2004, at 7:54 AM, C. David Shaffer wrote:

> LK wrote:
>> allRecords get filled in:
>> PMLogsView>>initialize
>>    db _ self connect.
>>    allRecords _ db root at: 'logs'.
>> I added 'db refresh' to the top of  PMLogsView>>renderContentOn: ...
>> It seems to do the trick. But, I was wondering if there was a better 
>> way.
>> -Larry
> Again, I'd put the database in the session then your entire session 
> would see the same view of the database.  See Brian Brown's tutorial 
> at http://www.techgame.net/projects/Seaside/wiki/UsingGOODS.

Yeah, let me second that.  There's no reason to open a brand new 
database connection each time you create a component (well, maybe not 
*no* reason, I can see it if you're playing complicated transactional 
games), and it's just going to complicate things.  Either pass the db 
instance from component to component, or store it somewhere like the 
session where they can all get at it.


More information about the Seaside mailing list