I think I forgot to mention that fx.js was my inspiration ;) @ShowOnAjax should also have a parameter with a list of components. @ShowOnAjax then only reacts on Ajax-Events within those components. @ShowOnAjax could also have two subcomponents like a4j:status.
ciao.michael. > -----Ursprüngliche Nachricht----- > Von: "Tapestry users" <users@tapestry.apache.org> > Gesendet: 16.01.07 15:27:12 > An: Tapestry users <users@tapestry.apache.org> > Betreff: Re: Ajax Loading Indicator (google style) > Yep, that's a nice way of doing this... > > It's also how effects are currently implemented > http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/fx.js?view=markup > > Anyway, Daniel, it wouldn't hurt adding a JIRA request for this feature > - i know i'll need something like this > in the very near future. > > I also think i like the Microsoft way of doing this, i.e. with a component > <div jwcid="@contrib:ShowOnAjax"> ... </div> > instead of the tacos way, i.e. with the statusElement parameter for > every link of form > component ( http://tacos.sourceforge.net/components/AjaxDirectLink.html ) > > > [EMAIL PROTECTED] wrote: > > Hi Daniel, > > > > in the onLoad of Dojo you have to registered two functions > > > > dojo.event.connect("around", tapestry, "loadContent", this, "postLoading"); > > > > dojo.event.connect("around", tapestry, "linkOnClick", this, "preLoading"); > > > > These functions surround the tapestry functions responsible for updating > > content. > > > > function preLoading(miObj) > > { > > // > > // Get the id of updated component > > var id = miObj.args[1]; > > // > > // Here your code > > Dojo.byId("loader").Show > > > > return miObj.proceed(); > > } > > > > function postLost(miObj) > > { > > // > > // Get the id of updated component > > var id = miObj.args[0]; > > // > > // Here your code > > Dojo.byId("loader").Show > > > > return miObj.proceed(); > > } > > > > ciao.michael. > > > > > >> -----Ursprüngliche Nachricht----- > >> Von: "Tapestry users" <users@tapestry.apache.org> > >> Gesendet: 16.01.07 14:03:40 > >> An: Tapestry users <users@tapestry.apache.org> > >> Betreff: Ajax Loading Indicator (google style) > >> > > > > > > > >> Hello all. > >> > >> I'm using Tapestry 4.1.1 and i'm learning to use ajax with it. > >> Now i'm trying to make a loading indicator for ajax request when are > >> loading, like google. So i make a simple div like this: > >> > >> <div id="loader" class="loader">Loading...</div> > >> > >> and i want to make it visible when i run an EventListener and when it's > >> finish, make it invisible. In other frameworks making this was very > >> easy, but i dont know how to make it with Dojo, using something like > >> > >> Dojo.byId("loader").Show <- when i get "onloading" ajax thing. > >> Dojo.byId("loader").Hide <- and whern i get "oncomplete" ajax thing. > >> > >> Anyone knows any way to do this? Theres is something like > >> updateComponent to make it visible and invisible? > >> > >> Cheers > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > >> > > > > > > _______________________________________________________________________ > > Viren-Scan für Ihren PC! Jetzt für jeden. Sofort, online und kostenlos. > > Gleich testen! http://www.pc-sicherheit.web.de/freescan/?mc=022222 > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > -- > Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr > Tapestry / Tacos developer > Open Source / J2EE Consulting > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > ______________________________________________________________________ XXL-Speicher, PC-Virenschutz, Spartarife & mehr: Nur im WEB.DE Club! Jetzt gratis testen! http://freemail.web.de/home/landingpad/?mc=021130 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]