Friday, September 21, 2012

Accessing XPages global objects in Java (extended)

There is nice post "Accessing XPages global objects in Java". There is a little more information about returned objects.

It's a good idea to create some base class to extend it for all classes that need access to global xPage objects.

So I take variables from that articles and add Request and Response objects also.

Look more for the source.



4 comments:

NotesSensei said...

You need to be careful with this. If you store an instance in a longer living context (e.g. the XSP session), your Domino objects might not be valid anymore. Same applies for request and response

Andriy Kuba said...

Thank you NotesSensei. I will keep in mind.

Unknown said...

I tried placing the code in a java agent, but it give me a error showing cannot resolve javax.faces.context.ExternalContext?
How do i resolve it?

Andriy Kuba said...

This is not for the Java Agent, this is for the xPage