[aida] Dropdown menus

Dirk Verleysen dirk at verleysen.net
Mon Oct 15 14:37:56 CEST 2007


Ouch !!! Does this mean that I can't use styles for labels and other layouts 
between the different menu's ?


----- Original Message ----- 
From: "Janko Mivšek" <janko.mivsek op eranova.si>
To: "AIDA/Web general discussion list" <aida op aidaweb.si>
Sent: Monday, October 15, 2007 2:09 PM
Subject: Re: [aida] Dropdown menus


> Dirk,
>
> Dirk Verleysen wrote:
>
>> I'm doing this and the updates to the domain are done but the WebElement
>> that should be refreshed is simply removed. When I refresh the page it's
>> returned on the browser with the updated fields.
>
> Be sure that an updatable element is in the separate method and not
> simply one of the elements in a method. This method must also return
> just that element.
>
> This is a rule for Ajax updatable elements - they must reside each in
> its own method.
>
> Best regards
> Janko
>
>>
>> ----- Original Message ----- 
>> From: "Janko Mivšek" <janko.mivsek op eranova.si>
>> To: "AIDA/Web general discussion list" <aida op aidaweb.si>
>> Sent: Monday, October 15, 2007 11:35 AM
>> Subject: Re: [aida] Dropdown menus (was: addMenuAspect:...)
>>
>>
>>> Dirk Verleysen wrote:
>>>> Can I send an event after an item in the menu is selected ? I want 3
>>>> menus
>>>> on 1 form and the collection of the 2nd menu is dependent on the
>>>> selection
>>>> of the first menu. The collection of the 3th menu is created after you
>>>> know
>>>> what was selected in the 2nd menu.
>>> This is very common pattern and very nicely solved with Ajax updating of
>>> an element containing all three menus. For that you use
>>> onChangePostAndUpdate: on your menus:
>>>
>>> menusElement
>>>   | e |
>>>   e := WebElement new.
>>>
>>>   menu1 := WebMenu aspect: ....
>>>   menu1 onCangePostAndUpdate: e.
>>>   e add: menu1; addBreak.
>>>
>>>   menu2 := WebMenu aspect: ....
>>>   menu2 onCangePostAndUpdate: e.
>>>   e add: menu2; addBreak.
>>>
>>>   menu3 := WebMenu aspect: ....
>>>   e add: menu3.
>>>   ^e
>>>
>>> Janko
>>>
>>>> ----- Original Message ----- 
>>>> From: "Janko Mivšek" <janko.mivsek op eranova.si>
>>>> To: "AIDA/Web general discussion list" <aida op aidaweb.si>
>>>> Sent: Monday, October 15, 2007 10:58 AM
>>>> Subject: Re: [aida] addMenuAspect:collection:selectedToAspect:of:
>>>>
>>>>
>>>>> 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
>>> _______________________________________________
>>> Aida mailing list
>>> Aida op aidaweb.si
>>> http://lists.aidaweb.si/mailman/listinfo/aida
>>>
>>
>> _______________________________________________
>> Aida mailing list
>> Aida op aidaweb.si
>> http://lists.aidaweb.si/mailman/listinfo/aida
>
> -- 
> Janko Mivšek
> AIDA/Web
> Smalltalk Web Application Server
> http://www.aidaweb.si
> _______________________________________________
> Aida mailing list
> Aida op aidaweb.si
> http://lists.aidaweb.si/mailman/listinfo/aida
> 



More information about the Aida mailing list