You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sk...@apache.org on 2008/06/11 21:12:47 UTC
svn commit: r666790 -
/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.java
Author: skitching
Date: Wed Jun 11 12:12:47 2008
New Revision: 666790
URL: http://svn.apache.org/viewvc?rev=666790&view=rev
Log:
* Remove "tagExcluded" property for rendered and id; add the annotation to the associated methods instead.
* Disable setId and setRendered methods on UIViewRoot; it doesn't make sense for this component to support these;
any code calling these methods is wrong.
Modified:
myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.java
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.java?rev=666790&r1=666789&r2=666790&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.java Wed Jun 11 12:12:47 2008
@@ -45,9 +45,7 @@
* tagClass = "org.apache.myfaces.taglib.core.ViewTag"
* desc = "UIViewRoot"
*
- * @JSFJspProperty name = "rendered" returnType = "boolean" tagExcluded = "true"
* @JSFJspProperty name = "binding" returnType = "java.lang.String" tagExcluded = "true"
- * @JSFJspProperty name = "id" returnType = "java.lang.String" tagExcluded = "true"
*
* @author Manfred Geiler (latest modification by $Author$)
* @version $Revision$ $Date$
@@ -289,8 +287,6 @@
_locale = locale;
}
- //------------------ GENERATED CODE BEGIN (do not modify!) --------------------
-
public static final String COMPONENT_TYPE = "javax.faces.ViewRoot";
public static final String COMPONENT_FAMILY = "javax.faces.ViewRoot";
//private static final String DEFAULT_RENDERKITID = RenderKitFactory.HTML_BASIC_RENDER_KIT;
@@ -315,7 +311,49 @@
return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : null; //DEFAULT_RENDERKITID
}
+ /**
+ * Disable this property; although this class extends a base-class that
+ * defines a read/write rendered property, this particular subclass
+ * does not support setting it. Yes, this is broken OO design: direct
+ * all complaints to the JSF spec group.
+ *
+ * @JSFProperty tagExcluded="true"
+ */
+ public void setRendered(boolean state)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isRendered()
+ {
+ return true;
+ }
+
+ /**
+ * Disable this property; although this class extends a base-class that
+ * defines a read/write id property, this particular subclass
+ * does not support setting it. Yes, this is broken OO design: direct
+ * all complaints to the JSF spec group.
+ *
+ * @JSFProperty tagExcluded="true"
+ */
+ public void setId(String id)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public String getId()
+ {
+ return null;
+ }
+ /**
+ * As this component has no "id" property, it has no clientId property either.
+ */
+ public String getClientId(FacesContext context)
+ {
+ return null;
+ }
public Object saveState(FacesContext context)
{