[aida] addMenuAspect:collection:selectedToAspect:of:

Janko Mivšek janko.mivsek at eranova.si
Mon Oct 15 10:58:08 CEST 2007


Hi Dirk,

Dirk Verleysen wrote:

> Is there an example of this available ? I guess I can use this to create 
> a kind of dropdownlist ?

In HTML it called menu 
http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.6. In Aida 
there is a WebMenu and here s short example of usage:


menu := WebMenu
	  aspect: #name
	  collection: self authors
	  selectedToAspect: #author
	  of: self.

or with convenience method:

anElement addMenuAspect:collection:selectedToAspect:of:


Here you select an author by name from self authors and save selected 
object (not a name string!) to aspect #author (this calls 
accessor/mutator #author and #author: ) of self. Note that if there is 
author selected from before, it will be preselected.


>  
> I use "anElement addMenuAspect: #name collection: self observee 
> seasonColl selectedToAspect: #season of: self observee." but by the time 
> my HTML is generated my aspectToStore has become #name and my 
> objectToStore is nil.

And this you already solved by yourself.

Best regards
Janko

-- 
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si


More information about the Aida mailing list