myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mat...@apache.org
Subject cvs commit: incubator-myfaces/src/share/org/apache/myfaces/taglib UIComponentTagBase.java
Date Mon, 07 Mar 2005 09:06:51 GMT
matzew      2005/03/07 01:06:51

  Modified:    src/share/org/apache/myfaces/renderkit JSFAttr.java
               src/components/org/apache/myfaces/custom/tree2
                        HtmlTreeRenderer.java
               tlds     myfaces_ext.tld
               src/share/org/apache/myfaces/taglib UIComponentTagBase.java
  Added:       tlds/entities alt_location_attributes.xml
  Log:
  Patch for the new tree form Sean Schofield
  
  Revision  Changes    Path
  1.11      +6 -1      incubator-myfaces/src/share/org/apache/myfaces/renderkit/JSFAttr.java
  
  Index: JSFAttr.java
  ===================================================================
  RCS file: /home/cvs/incubator-myfaces/src/share/org/apache/myfaces/renderkit/JSFAttr.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- JSFAttr.java	21 Feb 2005 18:49:59 -0000	1.10
  +++ JSFAttr.java	7 Mar 2005 09:06:51 -0000	1.11
  @@ -120,6 +120,11 @@
       public static final String SHOW_LINES                  = "org.apache.myfaces.tree.SHOW_LINES";
       public static final String CLIENT_SIDE_TOGGLE          = "org.apache.myfaces.tree.CLIENT_SIDE_TOGGLE";
   
  +    // Alternate locations (instead of using AddResource)
  +    public static final String JAVASCRIPT_LOCATION         = "org.apache.myfaces.JAVASCRIPT_LOCATION";
  +    public static final String IMAGE_LOCATION              = "org.apache.myfaces.IMAGE_LOCATION";
  +    public static final String STYLE_LOCATION              = "org.apache.myfaces.STYLE_LOCATION";
  +
       //~ Myfaces Extensions -------------------------------------------------------------------------------
   
       // UISortData attributes
  
  
  
  1.8       +3 -1      incubator-myfaces/src/components/org/apache/myfaces/custom/tree2/HtmlTreeRenderer.java
  
  Index: HtmlTreeRenderer.java
  ===================================================================
  RCS file: /home/cvs/incubator-myfaces/src/components/org/apache/myfaces/custom/tree2/HtmlTreeRenderer.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- HtmlTreeRenderer.java	27 Feb 2005 14:30:21 -0000	1.7
  +++ HtmlTreeRenderer.java	7 Mar 2005 09:06:51 -0000	1.8
  @@ -523,6 +523,8 @@
           // render javascript function for client-side toggle (it won't be used if user
has opted for server-side toggle)
           AddResource.addJavaScriptHere(HtmlTreeRenderer.class, "javascript/tree.js", context);
           AddResource.addJavaScriptHere(HtmlTreeRenderer.class, "javascript/cookielib.js",
context);
  +
  +        context.getExternalContext().getRequestMap().put(JAVASCRIPT_ENCODED, Boolean.TRUE);
       }
   
       /**
  
  
  
  1.1                  incubator-myfaces/tlds/entities/alt_location_attributes.xml
  
  Index: alt_location_attributes.xml
  ===================================================================
          <attribute>
              <name>javascriptLocation</name>
              <required>false</required>
              <rtexprvalue>false</rtexprvalue>
              <type>java.lang.String</type>
              <description>
                  An alternate location to find javascript resources.  If no values is specified,
javascript will
                  be loaded from the resources directory using AddResource and ExtensionsFilter.
              </description>
          </attribute>
  
          <attribute>
              <name>imageLocation</name>
              <required>false</required>
              <rtexprvalue>false</rtexprvalue>
              <type>java.lang.String</type>
              <description>
                  An alternate location to find image resources.  If no values is specified,
images will
                  be loaded from the resources directory using AddResource and ExtensionsFilter.
              </description>
          </attribute>
  
          <attribute>
              <name>styleLocation</name>
              <required>false</required>
              <rtexprvalue>false</rtexprvalue>
              <type>java.lang.String</type>
              <description>
                  An alternate location to find stylesheet resources.  If no values is specified,
stylesheets will
                  be loaded from the resources directory using AddResource and ExtensionsFilter.
              </description>
          </attribute>
  
  
  
  1.172     +2 -0      incubator-myfaces/tlds/myfaces_ext.tld
  
  Index: myfaces_ext.tld
  ===================================================================
  RCS file: /home/cvs/incubator-myfaces/tlds/myfaces_ext.tld,v
  retrieving revision 1.171
  retrieving revision 1.172
  diff -u -r1.171 -r1.172
  --- myfaces_ext.tld	26 Feb 2005 00:27:15 -0000	1.171
  +++ myfaces_ext.tld	7 Mar 2005 09:06:51 -0000	1.172
  @@ -62,6 +62,7 @@
   <!ENTITY standard_select_one_menu_attributes SYSTEM "entities/standard_select_one_menu_attributes.xml">
   <!ENTITY standard_select_one_radio_attributes SYSTEM "entities/standard_select_one_radio_attributes.xml">
   <!ENTITY standard_select_many_checkbox_attributes SYSTEM "entities/standard_select_many_checkbox_attributes.xml">
  +<!ENTITY alt_location_attributes             SYSTEM "entities/alt_location_attributes.xml">
   ]>
   
   <taglib xmlns="http://java.sun.com/xml/ns/j2ee">
  @@ -1771,6 +1772,7 @@
               <rtexprvalue>false</rtexprvalue>
               <description>Perform client-side toggling of expand/collapse state via
javascript (default is true.)</description>
           </attribute>
  +        &alt_location_attributes;
       </tag>
   
       <!-- panelStack -->
  
  
  
  1.13      +55 -13    incubator-myfaces/src/share/org/apache/myfaces/taglib/UIComponentTagBase.java
  
  Index: UIComponentTagBase.java
  ===================================================================
  RCS file: /home/cvs/incubator-myfaces/src/share/org/apache/myfaces/taglib/UIComponentTagBase.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- UIComponentTagBase.java	18 Feb 2005 17:19:30 -0000	1.12
  +++ UIComponentTagBase.java	7 Mar 2005 09:06:51 -0000	1.13
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -24,6 +24,9 @@
    * @author Manfred Geiler (latest modification by $Author$)
    * @version $Revision$ $Date$
    * $Log$
  + * Revision 1.13  2005/03/07 09:06:51  matzew
  + * Patch for the new tree form Sean Schofield
  + *
    * Revision 1.12  2005/02/18 17:19:30  matzew
    * added release() to tag clazzes.
    *
  @@ -66,7 +69,10 @@
       //UIComponent attributes
       private String _forceId;
       private String _forceIdIndex = "true";
  -    
  +    private String _javascriptLocation;
  +    private String _imageLocation;
  +    private String _styleLocation;
  +
       //Special UIComponent attributes (ValueHolder, ConvertibleValueHolder)
       private String _value;
       private String _converter;
  @@ -82,13 +88,16 @@
           _value=null;
           _converter=null;
       }
  -    
  +
       protected void setProperties(UIComponent component)
       {
           super.setProperties(component);
   
           setBooleanProperty(component, JSFAttr.FORCE_ID_ATTR, _forceId);
           setBooleanProperty(component, JSFAttr.FORCE_ID_INDEX_ATTR, _forceIdIndex);
  +        if (_javascriptLocation != null) setStringProperty(component, JSFAttr.JAVASCRIPT_LOCATION,
_javascriptLocation);
  +        if (_imageLocation != null) setStringProperty(component, JSFAttr.IMAGE_LOCATION,
_imageLocation);
  +        if (_styleLocation != null) setStringProperty(component, JSFAttr.STYLE_LOCATION,
_styleLocation);
   
           //rendererType already handled by UIComponentTag
   
  @@ -97,27 +106,27 @@
       }
   
       /**
  -     * Sets the forceId attribute of the tag.  NOTE: Not every tag that extends this class
will 
  -     * actually make use of this attribute.  Check the TLD to see which components actually

  +     * Sets the forceId attribute of the tag.  NOTE: Not every tag that extends this class
will
  +     * actually make use of this attribute.  Check the TLD to see which components actually
        * implement it.
  -     * 
  +     *
        * @param aForceId The value of the forceId attribute.
        */
       public void setForceId(String aForceId)
       {
           _forceId = aForceId;
       }
  -    
  +
       /**
  -     * Sets the forceIdIndex attribute of the tag.  NOTE: Not every tag that extends this
class will 
  +     * Sets the forceIdIndex attribute of the tag.  NOTE: Not every tag that extends this
class will
        * actually make use of this attribute.  Check the TLD to see which components actually
implement it.
  -     * 
  +     *
        * @param aForceIdIndex The value of the forceIdIndex attribute.
        */
       public void setForceIdIndex(String aForceIdIndex)
       {
           _forceIdIndex = aForceIdIndex;
  -    }    
  +    }
   
       public void setValue(String value)
       {
  @@ -130,6 +139,38 @@
       }
   
   
  +    /**
  +     * Sets the javascript location attribute of the tag.  NOTE: Not every tag that extends
this class will
  +     * actually make use of this attribute.  Check the TLD to see which components actually
implement it.
  +     *
  +     * @param aJavascriptLocation The alternate javascript location to use.
  +     */
  +    public void setJavascriptLocation(String aJavascriptLocation)
  +    {
  +        _javascriptLocation = aJavascriptLocation;
  +    }
  +
  +    /**
  +     * Sets the image location attribute of the tag.  NOTE: Not every tag that extends
this class will
  +     * actually make use of this attribute.  Check the TLD to see which components actually
implement it.
  +     *
  +     * @param aImageLocation The alternate image location to use.
  +     */
  +    public void setImageLocation(String aImageLocation)
  +    {
  +        _imageLocation = aImageLocation;
  +    }
  +
  +    /**
  +     * Sets the style location attribute of the tag.  NOTE: Not every tag that extends
this class will
  +     * actually make use of this attribute.  Check the TLD to see which components actually
implement it.
  +     *
  +     * @param aStyleLocation The alternate style location to use.
  +     */
  +    public void setStyleLocation(String aStyleLocation)
  +    {
  +        _styleLocation = aStyleLocation;
  +    }
   
       // sub class helpers
   
  @@ -187,3 +228,4 @@
   
   
   }
  +
  
  
  

Mime
View raw message