cancel
Showing results for 
Search instead for 
Did you mean: 

How can I instantiate a new FacesContext instance?

cuchillo
Champ in-the-making
Champ in-the-making
Hi there!  Smiley Happy
I am modifying Alfresco 3.1.1 source code.
In many points I need an instance of the class FacesContext. In order to get the current instance, I call this method:
FacesContext.getCurrentInstance()
But I get a NullPointerException.

I think this happens because I am not in the right context.
How can I instantiate a new FacesContext instance?
I need to know how Alfresco does from the JSF/Spring level.

Thanks in advance!
Stefano
3 REPLIES 3

nowhere
Champ in-the-making
Champ in-the-making
Hi Chuchillo,
I have the same problem as you…did you solve it? If yes, could you gently share solution?

Thanks! Smiley Happy

Cheers,
Nowhere

cheffilet
Champ in-the-making
Champ in-the-making
How do you accessing your Alfresco? Via Webscripts or somewhat else?

nowhere
Champ in-the-making
Champ in-the-making
Hi Cheffilet,
from me, I terminated working at alfresco project and I solved that problem in another way, I can't say how now (I haven't the code to look at), but I'd be happy if you could share with me solution (just curiosity, I didn't need to study more the problem).

I'm accessing Alfresco by webscritps!

Thanks!

nowhere