Problem with preEvent interceptor and preHandler

This is twofold as it appears that both do and have the exact same problem.

When dumping the rc and prc in ColdBox3.1 in both of these areas, I have noticed that the event is the previous event and not the current event. What is the best way to do this, and get the current event?

Regards,

Andrew Scott

http://www.andyscott.id.au/

You mean, like this? Event.getCurrentEvent() ?

Yeah, but the problem is that it is not working.

In both of the mentioned, if I do this.

var rc = event.getCollection();

var prc = event.getCollection(private=true);

rc.currentEventTesting123 = event.getCurrentEvent();

And dump them they contain the correct value, so I use this to then get certain information from the database.

However in my page view, when I dump rc and prc, the value of currentEventTesting123 is always the default event setup in config.cfc does that make more sense?

If you want to ping me off list I can run you through it and show you exactly what is happening, but I think this is explanatory enough.

Regards,

Andrew Scott

http://www.andyscott.id.au/

Solved, it is because I was caching the views…. Doh!!

Regards,

Andrew Scott

http://www.andyscott.id.au/