You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by de...@apache.org on 2006/11/06 01:59:52 UTC

svn commit: r471594 - /myfaces/core/branches/jsf12/api/src/main/java/javax/faces/context/FacesContext.java

Author: dennisbyrne
Date: Sun Nov  5 16:59:51 2006
New Revision: 471594

URL: http://svn.apache.org/viewvc?view=rev&rev=471594
Log:
The RI docs could be better.  This has to do more than throw UOE.

Modified:
    myfaces/core/branches/jsf12/api/src/main/java/javax/faces/context/FacesContext.java

Modified: myfaces/core/branches/jsf12/api/src/main/java/javax/faces/context/FacesContext.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/jsf12/api/src/main/java/javax/faces/context/FacesContext.java?view=diff&rev=471594&r1=471593&r2=471594
==============================================================================
--- myfaces/core/branches/jsf12/api/src/main/java/javax/faces/context/FacesContext.java (original)
+++ myfaces/core/branches/jsf12/api/src/main/java/javax/faces/context/FacesContext.java Sun Nov  5 16:59:51 2006
@@ -31,7 +31,18 @@
     // implementation that throws UnsupportedOperationException.  
     // This allows old FacesContext implementations to still work.
     public ELContext getELContext() {
-        throw new UnsupportedOperationException();
+        
+    	FacesContext ctx = getCurrentInstance();
+    	 
+    	if( ctx == null )
+    		throw new NullPointerException(FacesContext.class.getName());
+    	
+    	ELContext elctx = ctx.getELContext();
+    	
+    	if ( elctx == null )
+    		throw new UnsupportedOperationException();
+    	
+    	return elctx;
     }
     
     public abstract javax.faces.application.Application getApplication();