You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sv...@apache.org on 2004/12/01 21:29:22 UTC

cvs commit: incubator-myfaces/src/components/org/apache/myfaces/component/html/util AddResource.java

svieujot    2004/12/01 12:29:22

  Modified:    src/components/org/apache/myfaces/component/html/util
                        AddResource.java
  Log:
  Add javadoc.
  
  Revision  Changes    Path
  1.3       +15 -1     incubator-myfaces/src/components/org/apache/myfaces/component/html/util/AddResource.java
  
  Index: AddResource.java
  ===================================================================
  RCS file: /home/cvs/incubator-myfaces/src/components/org/apache/myfaces/component/html/util/AddResource.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AddResource.java	1 Dec 2004 20:25:10 -0000	1.2
  +++ AddResource.java	1 Dec 2004 20:29:22 -0000	1.3
  @@ -31,6 +31,7 @@
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  +import org.apache.myfaces.custom.calendar.HtmlCalendarRenderer;
   import org.apache.myfaces.renderkit.html.HTML;
   
   /**
  @@ -41,6 +42,9 @@
    * @author Sylvain Vieujot (latest modification by $Author$)
    * @version $Revision$ $Date$
    * $Log$
  + * Revision 1.3  2004/12/01 20:29:22  svieujot
  + * Add javadoc.
  + *
    * Revision 1.2  2004/12/01 20:25:10  svieujot
    * Make the Extensions filter support css and image resources.
    * Convert the popup calendar to use this new filter.
  @@ -115,6 +119,15 @@
           return set;
       }
       
  +    /**
  +     * Get the Path used to retrieve an internal resource for a custom component.
  +     * Example : You can use this to initialize javascript scripts so that they know the path of some other resources
  +     * (image, css, ...).
  +     * <code>
  +     * 	AddResource.addJavaScriptOncePerPage(HtmlCalendarRenderer.class, "popcalendar.js", facesContext,
  +     * 		"jscalendarSetImageDirectory("+AddResource.getResourceMappedPath(HtmlCalendarRenderer.class, "DB", facesContext)+")");
  +     * </code>
  +     */
       public static String getResourceMappedPath(Class componentClass, String resourceFileName, FacesContext context){
           return getResourceMappedPath(
                   getComponentName(componentClass),