can't make WebMenu return selection

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

can't make WebMenu return selection

Herbert König
Hi,

when I crate a webMenu a selection always returns nil. The menu is
displayed with the correct items and the correct initial selection, so
I must be doing something right.

Also when selecting a new item #selectedToAspect (in my case
#positionSelected:) gets sent but the argument is always nil.

this is what I do:

positionsSelectorComponent
        |e positionen positionsSelektor |
        e := WebElement new.
        positionen := observee abrechnung positionen.
        positionsSelektor :=
                WebMenu
                        aspect: #printForWebMenu
                        collection: positionen
                        selectedToAspect: #positionSelected
                        of: self.
        positionsSelektor
                onChangePost.
        e add: positionsSelektor.
        ^e

BTW in Trunk I have a different Problem, see other mail.

Thanks,

Herbert                          mailto:[hidden email]

_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: can't make WebMenu return selection

Herbert König
Hi,

HK> when I crate a webMenu a selection always returns nil. The menu is
HK> displayed with the correct items and the correct initial selection, so
HK> I must be doing something right.
further debugging shows, nothing is wrong with my code but the post
request coming from the browser is wrong.
This is the post as inspected by firebug:
aidaCtx 82970
ajaxGetElementId        nil
ajaxRequest    
ajaxSingleField field3
field3  1.1 Position 1      <----------- Here is the bug
view    positionen

field 3 should read: "1.1  Position 1", note the two blanks after
"1.1", the post has eaten one of the blanks. The HTML inspected in
Firebug still contains the blank.

OK so I worked around it by making sure, that any input that goes to a
WebMenu does not contain any two consecutive blanks.

Actually I think this might be a bug in Prototype not in Aida. Or I
lack some knowledge here.

Any opinion or enlightenment eagerly awaited :-))

Head scratching,

Herbert                            mailto:[hidden email]

_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida