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:15:50 UTC
svn commit: r666794 -
/myfaces/core/trunk_1.2.x/api/src/main/java/javax/faces/component/UIViewRoot.java
Author: skitching
Date: Wed Jun 11 12:15:50 2008
New Revision: 666794
URL: http://svn.apache.org/viewvc?rev=666794&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_1.2.x/api/src/main/java/javax/faces/component/UIViewRoot.java
Modified: myfaces/core/trunk_1.2.x/api/src/main/java/javax/faces/component/UIViewRoot.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk_1.2.x/api/src/main/java/javax/faces/component/UIViewRoot.java?rev=666794&r1=666793&r2=666794&view=diff
==============================================================================
--- myfaces/core/trunk_1.2.x/api/src/main/java/javax/faces/component/UIViewRoot.java (original)
+++ myfaces/core/trunk_1.2.x/api/src/main/java/javax/faces/component/UIViewRoot.java Wed Jun 11 12:15:50 2008
@@ -1,6 +1,3 @@
-// WARNING: This file was automatically generated. Do not edit it directly,
-// or you will lose your changes.
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -53,10 +50,7 @@
* The root element.
*/
@JSFComponent
-@JSFJspProperties(properties={
-@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)})
+@JSFJspProperty(name = "binding",returnType = "java.lang.String",tagExcluded = true)
public class UIViewRoot extends UIComponentBase
{
@@ -431,6 +425,52 @@
this._renderKitId = 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"
+ */
+ @Override
+ public void setRendered(boolean state)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ 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;
+ }
+
// Property: viewId
private String _viewId;