About PRWidgets

Martial Boniou martial.boniou at ifrance.com
Mon Apr 30 20:03:16 MEST 2007


Thank you Lukas but that was what I actually did. I detail here with
component has i-var:

MyWAComponent>>#initialize
	component ifNil: [component := PRTocWidget new]
MyWAComponent>>#children
	^ Array with: component
MyWAComponent>>#renderContentOn: html
	html render: component

And it works well when it's PRTocWidget but not when this is
PRTreeWidget or any other PRWidget instances with class descriptions.

--
Martial

On Mon, 2007-04-30 at 19:16 +0200, Lukas Renggli wrote:
> Hi Martial,
> 
> > I was a bit busy those days so I could sent this email before. I told
> > you I got problems with the 'Magritted' PRWidgets. Actually what I  
> > would
> > like to understand is why mightn't I write those lines (a bit  
> > incorrect
> > because I should write a custom #initialize and #children:
> >  WAComponent/PRWidget>>renderContentOn: html
> > 	html render: (PRTreeWidget new)
> 
> this is Seaside code that will not work. You have to initialize your  
> child component in #initialize and store it into an i-var and return  
> it from #children.
> 
> Your code will re-instantiate the PRTreeWidget every time you display  
> the page and it will be impossible for Seaside to keep the state and  
> to perform the callbacks. Have a look in the Seaside mailing-list  
> archives.
> 
> Hope this helps,
> Lukas
> 



More information about the smallwiki mailing list