andyhot wrote: > hi, we'll take a better look at your suggestions - i too believe that > there are many ways > to improve on dojo:Widget > > Anyway, from a quick look, i'd suggest you try this: > > <div jwcid="@dojo:Widget" dojoType="MenuItem2" caption="Logout" > onClick="callback:function(){location.href='http://tacos.sourceforge.net/4.1/'}"/> > > >
This is the first solution I thought to but it seems not to be possible as the callback argument is quoted because a javascript function name is expected, so it's generated: dojo.event.connect(MyWidget, "onClick", "function() { location.href='http://tapestry.apache.org' }"); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function name while to work should be dojo.event.connect(MyWidget, "onClick", function() { location.href='http://tapestry.apache.org' }); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function reference in fact it does not work for me. Am I doing anything wrong? (dojo documentation is horrible...) In fact all my shortcut bindings where more or less a "removethosedamnquotes" binding :-) > > > The noasync idea looks interesting - perhaps it could just be > async="false" or "true" and > would affect all listeners defined on the widget? > well, this might be limiting: what if I want to show a popup (maybe an ajax one) while being over a menu entry while having a normal link when clicking on it. All in all is your nice binding system to be thought over dojo events :-) Ciao Martino ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Tacos-devel mailing list Tacos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tacos-devel