You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by jw...@apache.org on 2008/02/14 20:26:21 UTC
svn commit: r627852 - in
/myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-api/src/main/java/org/apache/myfaces/trinidad:
render/RenderUtils.java util/ComponentUtils.java
Author: jwaldman
Date: Thu Feb 14 11:26:17 2008
New Revision: 627852
URL: http://svn.apache.org/viewvc?rev=627852&view=rev
Log:
cleaned up Javadoc
Modified:
myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/RenderUtils.java
myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/ComponentUtils.java
Modified: myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/RenderUtils.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/RenderUtils.java?rev=627852&r1=627851&r2=627852&view=diff
==============================================================================
--- myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/RenderUtils.java (original)
+++ myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/RenderUtils.java Thu Feb 14 11:26:17 2008
@@ -24,7 +24,6 @@
import javax.faces.component.NamingContainer;
import javax.faces.component.UIComponent;
import javax.faces.component.UIForm;
-import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
import org.apache.myfaces.trinidad.component.UIXForm;
@@ -104,30 +103,31 @@
/**
* Given a 'from' component and a relativeId,
- * return an ID for use at rendering time that will identify the
+ * return the clientId for use at rendering time that will identify the
* id of the component you are referencing on the client.
* This is used for attributes like e.g. "for" and "chooseId".
*
- * <p>
+ * <p>
* e.g., given this hierarchy
- *
- * <f:subview id="aaa">
- <f:subview id="xxx">
- <tr:chooseColor id="cp1" .../>
- <f:subview id="yyy">
- <tr:inputColor id="sic1" chooseId="::cp1" .../>
- </f:subview>
- </f:subview>
- </f:subview>
- * The 'from' component is the inputColor component
+ * <br/>
+ * <f:subview id="aaa"><f:subview id="xxx"><br/>
+ <tr:chooseColor id="cp1" .../><br/>
+ <f:subview id="yyy"><br/>
+ <tr:inputColor id="sic1" chooseId="::cp1" .../><br/>
+ </f:subview><br/>
+ </f:subview></f:subview><br/>
+ </p>
+ <p>
+ * The 'from' component is the inputColor component.
* The 'relativeId' is "::cp1". ('::' pops up one naming container)
* The return value is 'aaa:xxx:cp1' when
* the clientId of the 'xxx' component is 'aaa:xxx'.
- * *
- * </p>
- * <p>
- * It does not assume that the target component can be located.
*
+ * </p>
+ * <p>
+ * It does not assume that the target component can be located.
+ * </p>
+ * <p>
* A relativeId starting with
* NamingContainer.SEPARATOR_CHAR (that is, ':') will be
* treated as absolute (after dropping that character).
@@ -139,12 +139,15 @@
* ComponentUtils.findRelativeComponent finds the component, whereas
* this method returns a relativeId that can be used during renderering
* so the component can be found in javascript on the client.
- *
- * </p>
+ * This code is faster because it doesn't have to find the component.
+ * </p>
* @param context
- * @param from
- * @param relativeId
- * @return
+ * @param from the component to search relative to
+ * @param relativeId the relative path from the 'from' component
+ * to the component to find
+ * @return the clientId for the 'relative' component.
+ @see ComponentUtils.findRelativeComponent(from, relativeId)
+
*/
public static String getRelativeId(
FacesContext context,
Modified: myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/ComponentUtils.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/ComponentUtils.java?rev=627852&r1=627851&r2=627852&view=diff
==============================================================================
--- myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/ComponentUtils.java (original)
+++ myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/ComponentUtils.java Thu Feb 14 11:26:17 2008
@@ -327,13 +327,14 @@
* The relative ID must account for NamingContainers. If the component is already inside
* of a naming container, you can use a single colon to start the search from the root,
* or multiple colons to move up through the NamingContainers - "::" will
- * pop out of the current naming container, ":::" will[pop out of two
+ * pop out of the current naming container, ":::" will pop out of two
* naming containers, etc.
* </p>
*
* @param from the component to search relative to
* @param relativeId the relative path to the component to find
* @return the component if found, null otherwise
+ * @see RenderUtils.getRelativeId(from, relativeId)
*/
public static UIComponent findRelativeComponent(
UIComponent from,