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