The best approach here was probably not to copy the source of
ProgressiveDisplay and make some odd modifications to it.  You haven't
described a specific case you need to account for here. If, for example,
you wanted to display some sort of a waiting modal box, you could show it
after a button is pressed, using javascript.  If the result of the
operation reloads the page, then the "waiting" modal will obviously
disappear.  If the operation results in a zone update, you can simply
listen for the zone update event and hide the element using javascript.

On Fri, Aug 17, 2012 at 6:19 PM, George Ludwig <georgelud...@gmail.com>wrote:

> ProgressiveDisplay does almost exactly what I need, with a small exception.
> On the same page, some actionlinks should trigger it, while others should
> not. So today I hacked it to work the way I wanted...I'd appreciate it if
> someone can tell me if I did something monumentally stupid!
>
> I copied ProgressiveDisplay and all its resources in to my project, renamed
> to MyProgressiveDisplay.
>
> In MyProgressiveDisplay.java I added a persistent boolean called "skip".
>
> I then modified the last few lines of beginRender:
>
> // do everything normally
> // check if we should skip the progress message
> if(isSkip())
>
>      return null;
>
> return initial;
>
>
> In onAction I did something similar:
>
> if(!isSkip())
>
>      resources.triggerContextEvent(EventConstants.PROGRESSIVE_DISPLAY,
> context, eventCallback);
>
>
> Those were the only hacks I did to ProgressiveDisplay. In my page code, I
> did this:
>
> @InjectComponent
>
> private MyProgressiveDisplay myProgressiveDisplay;
>
> Then at the appropriate points in my code, I
> called myProgressiveDisplay.setSkip(true) and myProgressiveDisplay(false).
>
> The end result is that it works exactly the way I wanted it to. My
> questions is, did I do anything that will cause issues when multiple users
> are on the system? I.e., is MyProgressiveDisplay a singleton? Because that
> would screw things up.
>
>
> -George
>

Reply via email to