[Seaside] liveAction using existing method

William E Harford seaside at harford.org
Thu Jun 30 00:00:00 CEST 2005


Hi all,

Ok I stumped. I spent a couple hours trying to figure this out and I
figure you all will be able to answer this question with out much
difficulty. 

I have a div on my page that is drawn using ...

html divNamed: 'patientContainer' with: [
		self renderPatientOn: html.
	].

When a user clicks on a link somewhere else on the page I would like
that div to be updated using the renderPatientOn method. My thought was
that I would create a new instance of WAHtmlRender and pass that to
renderPatientOn but an instance var of WAHtmlRender (document) is left
undefined. 

html anchorWithAction: [] 
    liveAction:[:h | 
    self showPatient: (row at: 'ionumber') .
    fh _ WAHtmlRenderer new.
    self renderPatientOn: fh.
    h divNamed:'patientContainer' with:fh.
] text: (row at: 'lastname') .


I also simply tried using the WAHtmlRender object that is passed to
liveAction ...

html anchorWithAction: [] 
    liveAction:[:h | 
    self showPatient: (row at: 'ionumber') .
    self renderPatientOn: fh.
    h divNamed:'patientContainer' with:fh.
] text: (row at: 'lastname') .

When doing it that way liveAction insisted on changing a child div of
patientContainer and I figured that usage was incorrect. 

At this point I am starting to think I am over complicating this
problem. 

I have portions of my page that are rendered via a method that takes
WAHtmlRender as an argument. I would like to update those divs (using
liveAction) using the same method. 

Thanks
Will



William E Harford <seaside at harford.org>



More information about the Seaside mailing list