You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-commits@incubator.apache.org by aw...@apache.org on 2007/04/14 19:12:03 UTC

svn commit: r528857 - /incubator/adffaces/branches/faces-1_2-070316/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/webapp/UIXComponentELTag.java

Author: awiner
Date: Sat Apr 14 12:12:03 2007
New Revision: 528857

URL: http://svn.apache.org/viewvc?view=rev&rev=528857
Log:
ADFFACES-420: Give better error message when UIXComponentTag is used without <f:view>

Modified:
    incubator/adffaces/branches/faces-1_2-070316/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/webapp/UIXComponentELTag.java

Modified: incubator/adffaces/branches/faces-1_2-070316/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/webapp/UIXComponentELTag.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070316/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/webapp/UIXComponentELTag.java?view=diff&rev=528857&r1=528856&r2=528857
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070316/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/webapp/UIXComponentELTag.java (original)
+++ incubator/adffaces/branches/faces-1_2-070316/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/webapp/UIXComponentELTag.java Sat Apr 14 12:12:03 2007
@@ -27,6 +27,7 @@
 import javax.el.ValueExpression;
 
 import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
 import javax.faces.context.FacesContext;
 import javax.faces.webapp.UIComponentELTag;
 
@@ -94,6 +95,13 @@
   @Override
   protected final void setProperties(UIComponent component)
   {
+    if (component instanceof UIViewRoot)
+    {
+      throw new IllegalStateException(
+         "<f:view> was not present on this page; tag " + this +
+         "encountered without an <f:view> being processed.");
+    }
+
     super.setProperties(component);
 
     UIXComponent uixComponent = (UIXComponent) component;