Right ... building progress bars should be quite easy but just have your page contain the comet actor.So roughly the steps would be:
1. Include your comet in the page. In this state it renders nothing visible 2. hen you open the dialog, send an ajax response 3. From your ajax scal function send a message to your comet actor to "activate" the progress 4. From your comet actor I assume you would know the "progress of an operation" and you'd send progress bar updates using partialUpdate. ... you got the idea. I'm doing something similar with multiple progress bars monitoring the progress of some backgroud server processes using comet but not really inside of a dialog. Putting them inside a modal dialog would be very easy. Br's, Marius On Jan 21, 9:54 am, ced <docpom...@googlemail.com> wrote: > @David: Thanks. Now the approach is clear. > > > Is that your use-case ? .... so see async intems coming from server > > only when the dialog is opened? > > @Marius: Yes, it is. I'd like to display a progressbar in the dialog. > It seemed to me quite natural to deliver it (the comet component) > along with the dialog, but as I now know that this is not possible, > it's really no problem to have it prepared in the page and bring it to > life when needed, i.e. make it visible. Another solution would be to > redirect to a whole new page with the progressbar on it, but I wanted > to look it more like a desktop application. > > Thanks, > Chris > > On 20 Jan., 23:22, Marius <marius.dan...@gmail.com> wrote: > > > I really don't see the need for such use-case. I mean if one wants to > > see async stuff in a dialog only when the dialog is opened this could > > be easily done via Ajax requests that will "activate"/"deactivate" > > async messages to client by sending from the ajax functions messages > > to the comet actor. > > > Is that your use-case ? .... so see async intems coming from server > > only when the dialog is opened? > > > Br's, > > Marius > > > On Jan 20, 11:00 pm, ced <docpom...@googlemail.com> wrote: > > > > Hi all, > > > > I'm trying to create some sort of progress notification for a long > > > lasting request. The idea is to answer an ajax request with a > > > JqJsCmds.ModalDialog which embeds a comet actor like so: > > > > ajaxButton("Start process", () => ModalDialog(<div><div>Progress</ > > > div><lift:comet type="Progress"/></div>)) > > > > Unfortunately this doesn't work, the dialog doesn't get displayed. > > > Embedding a "normal" snippet works just fine though. > > > > The code returned in the response to the button click seems ok also. > > > > As a workaround I place the comet actor in the page enclosed in a > > > hidden <div id="progress-actor"><lift:comet type="Progress"/></div>. > > > Then I return the ModalDialog(<div><div>Progress</div><div id="actor- > > > goes-here"></div>) along with some JS-code that takes the "progress- > > > actor" div, moves it into the "actor-goes-here" div and makes it > > > visible. > > > > Does anyone tried something similar? Any help is appreciated... > > > > Chris
-- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.