links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Seaside menus
Last updated at 1:40 am UTC on 15 September 2017


describes how to set up a application and implement a reusable menu component.

It shows how to "glue" components together.

There the root component StRootComponent has


 super initialize.
     menuComponent: StMenuComponent new;
     listComponent: StListComponent new.

All the three components have to implement
    renderContentOn: html

which is compulsory in Seaside.

StRootComponent has

 renderContentOn: html
    html heading: 'ToDo-List'.
    html div
       class: 'menu';
       with: self menuComponent.
    html div
       class: 'list';
       with: self listComponent.

StMenuComponent has
 renderContentOn: html
    html anchor
        callback: ["what to execute when clicked here"];
        with: 'Menu entry'. 

The full method for rendering the menus:
 renderContentOn: html 
	self entries
		do: [:entry | html anchor callback: entry value;
				 with: entry key]
		separatedBy: [html space]

a dummy method for StListComponent (later to be replaced)
 renderContentOn: html 
	table: [html
		    tableRow: [html
				  tableData: [html text: 'Table entry']];
		    tableRow: [html
				  tableData: [html text: 'Table entry']]]

Do not use the approach as described below under the heading 2009. There #render is sent to the components which should not be done in a recent version of Seaside.


Seaside menus is a Seaside sample application which shows how an application might implement a menu structure.


If you turn on the halos you see the component structure