So, here's a sketch of a process for making a form that, when you submit it, replaces its surrounding zone with a loading message. I haven't done this, so I might be wrong on a few key points.
Pop open a basic Javascript tutorial and learn how to show/hide a <div>. Learn enough CSS and HTML to style that div the way you want it. (This might be a day's time.) Tapestry bundles Prototype and Scriptaculous, so (if you feel like it), you can the special effects those frameworks offer for smoother fading in and out - those libraries' sites have tutorials that will show you how to do that. Then, read all the docs associated with Tapestry Zones, and then read the code for Zone and its attendant JavaScript. (At this point you may find it useful to cross-reference with how Tapestry lets you incorporate JS libraries through annotations, and a bit about how client-side and server-side events are wired together.) The Zone spinner might be some sort of animated GIF (you could use Chrome's right-click 'Inspect Element' to probe), so that's a good thing to look for, since that's what you're trying to replace. Most of the components render themselves in code, with a MarkupWriter, rather than having a .tml template, so the HTML you're looking for will be slightly obfuscated in that regard. Or.. whatever Taha just sent. :-) Michael On 16 August 2012 21:39, George Ludwig <georgelud...@gmail.com> wrote: > Michael, > > Ideally, the "please wait" message would appear over the existing layout, > and would go away after the operation is complete and the new data is > available. But I've already Wasted so many hours on this topic, I don't > really give a crap anymore how it works. I'll take whatever I can get. > > "being prepared to roll up your > sleeves a bit and learn how to show/hide a few blocks of HTML in response > to events is a good idea" > > I would love to do this, and have spent a fair number of hours searching > for resources on that very subject, and have yet to find any solid starting > point. I'm actually fairly blown away by how completely fruitless the > search has been. If you have suggestions, pelase let me know! > > -George > > > On Thu, Aug 16, 2012 at 6:15 PM, Michael Prescott < > michael.r.presc...@gmail.com> wrote: > > > Can you describe the layout of your page in a bit more detail? > > > > I'm imagining a form, and when you submit it, you want a 'saving' message > > to take the place of the form. Is that right? (This sounds like a hack > of > > Zone to me.) Or is the message some kind of lightbox while the page > behind > > changes completely? (That's a different kettle of fish entirely.) > > > > The UI is a lot more like glue code, so while most simple things like > > displaying messages aren't that hard, being prepared to roll up your > > sleeves a bit and learn how to show/hide a few blocks of HTML in response > > to events is a good idea. Tapestry isn't really about doing fancy UI > > things while still pretending you're only writing server code. In terms > of > > client-side code, I think of Tapestry as a bit like an IoC service for > the > > page. > > > > Michael > > > > On 16 August 2012 21:04, George Ludwig <georgelud...@gmail.com> wrote: > > > > > Can anyone give me any pointers? All I need is to be able to > > enable/disable > > > a busy busy message based on what else is happening in my page. This is > > > such an obvious use case, I can't believe I'm the only one doing it. > And > > > every time I look at the Tapestry docs I get nowhere. I don't > understand > > > how the lifecycle or render cycle of this message can mesh with > > Tapestry's > > > render cycle. > > > > > > > > > On Thu, Aug 16, 2012 at 4:36 PM, George Ludwig <georgelud...@gmail.com > > > >wrote: > > > > > > > Christian, > > > > > > > > The thing is, I'm server-side guy being forced to do UI...I really > > don't > > > > know where to start on building such an object. Isn't there some > > > component > > > > already out there or must I re-invent the wheel? > > > > > > > > -George > > > > > > > > > > > > On Thu, Aug 16, 2012 at 2:31 PM, Christian Riedel < > > > cr.ml...@googlemail.com > > > > > wrote: > > > > > > > >> Hi George, > > > >> > > > >> ProgressiveDisplay's initial block may be used to display a > "loading" > > > >> message / spinning icon. > > > >> But I wouldn't recommend this component to be used just as a > feedback > > > >> mechanism. Build your own component that may listen to certain > events > > > and > > > >> show/hide itself as needed. > > > >> > > > >> ProgressiveDisplay is rather useful if you have expensive > server-side > > > >> stuff going on but don't want the user to wait 10 seconds until the > > page > > > >> can be loaded. The component will first show a placeholder and > > > immediately > > > >> send a separate request using XHR to the server to get the expensive > > > stuff. > > > >> > > > >> Best > > > >> Christian > > > >> > > > >> Am 16.08.2012 um 23:05 schrieb George Ludwig: > > > >> > > > >> > I want to use ProgressiveDisplay to display a message and spinner > > icon > > > >> when > > > >> > an operation is taking place. For example, when saving changes, > the > > > >> message > > > >> > would be "Saving..." If the page was loading, the message would be > > > >> > "Loading...". > > > >> > > > > >> > Is this an appropriate use of ProgressiveDisplay, or is there a > > better > > > >> way? > > > >> > > > > >> > Second, when using "t:initial="block:..." what is the easiest way > > to > > > >> get > > > >> > the spinning icon in it? > > > >> > > > > >> > -George > > > >> > > > >> > > > >> > --------------------------------------------------------------------- > > > >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > > > >> For additional commands, e-mail: users-h...@tapestry.apache.org > > > >> > > > >> > > > > > > > > > >