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/'}"/> As you see, it is possible to provide one liners inside callback The noasync idea looks interesting - perhaps it could just be async="false" or "true" and would affect all listeners defined on the widget? Martino Piccinato wrote: > Hi all, > > don't know whether anybody reads this mailing list, because apparently > the archive is broken :-) > > I'd like to pose you a couple of possible improvements to the wonderful > DojoWidget component, I've been experimenting it with dojo menu lately > and I see a couple of problems and possible improvements: > > The problem with dojo Menu2 (but I think the same could apply also with > dojo menu button and maybe other widget) is that it mostly need non > async listeners while the DojoWidget (as far as I understand it) just > provide async listener. Most of the time I'd like to put a simple link when > > At the moment the only possibility is using the callback binding and > having lots of small javascript functions looking like "function > newEntryCallback(e) { location.href='/NewPage'}" each for a menu entry. > So I'm not saying this is not possible at all, I'm just saying it's a > bit annoying and not very "tapestry" > > > These in my opinion are the possible solutions: > > - externallink binding, automatically generating a dojo event connection > to a "function() { location.href='externallink'}": > <div jwcid="@dojo:Widget" dojoType="MenuItem2" caption="Logout" > onClick="externallink:http://tacos.sourceforge.net/4.1/"/> > > - javascript binding: a simple shortcut for callback where you can > specify javascript oneliner > <div jwcid="@dojo:Widget" dojoType="MenuItem2" caption="Logout" > onClick="javascript:alert('Menu entry not active');"/> > > - an additional (optional) attribute noasync, e.g. : > <div jwcid="@dojo:Widget" dojoType="MenuItem2" caption="Logout" > onClick="listener:onMenuClick" parameters="literal:LogoutProcess" > noasync="onClick"/> > > For this last case one could also think to have a special > "sync-listener" binding but this would mean to replicate all "listener" > stuff (plus the eventname parameter stuff) so I thought it would be > easier to have this additional parameter. > > If you think these ideas are valid I could easily provide code for it, > otherwise I'll just add it to my application because we need it :-) > > 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 > > -- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / JEE Consulting ------------------------------------------------------------------------- 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