myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sc...@apache.org
Subject cvs commit: incubator-myfaces/tlds myfaces_ext.tld
Date Tue, 19 Apr 2005 12:12:47 GMT
schof       2005/04/19 05:12:47

  Modified:    src/components/org/apache/myfaces/custom/tree2
                        HtmlTreeRenderer.java TreeTag.java
               src/share/org/apache/myfaces/renderkit JSFAttr.java
               tlds     myfaces_ext.tld
  Log:
  Fixes MyFace-195
  
  Revision  Changes    Path
  1.14      +6 -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.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- HtmlTreeRenderer.java	16 Mar 2005 19:32:01 -0000	1.13
  +++ HtmlTreeRenderer.java	19 Apr 2005 12:12:47 -0000	1.14
  @@ -84,6 +84,11 @@
   
           if (getBoolean(component, JSFAttr.CLIENT_SIDE_TOGGLE, true))
           {
  +            if (!getBoolean(component, JSFAttr.PRESERVE_TOGGLE, true))
  +            {
  +                return;
  +            }
  +
               Map cookieMap = context.getExternalContext().getRequestCookieMap();
               Cookie treeCookie = (Cookie)cookieMap.get(component.getId());
               if (treeCookie == null || treeCookie.getValue() == null)
  
  
  
  1.8       +10 -2     incubator-myfaces/src/components/org/apache/myfaces/custom/tree2/TreeTag.java
  
  Index: TreeTag.java
  ===================================================================
  RCS file: /home/cvs/incubator-myfaces/src/components/org/apache/myfaces/custom/tree2/TreeTag.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TreeTag.java	16 Mar 2005 19:32:01 -0000	1.7
  +++ TreeTag.java	19 Apr 2005 12:12:47 -0000	1.8
  @@ -36,6 +36,7 @@
       private String _showNav;
       private String _clientSideToggle;
       private String _showRootNode;
  +    private String _preserveToggle;
   
       public void release()
       {
  @@ -48,6 +49,7 @@
           _showNav = null;
           _clientSideToggle = null;
           _showRootNode = null;
  +        _preserveToggle = null;
       }
   
       public String getComponentType()
  @@ -92,12 +94,17 @@
       {
           _clientSideToggle = clientSideToggle;
       }
  -    
  +
       public void setShowRootNode(String showRootNode)
       {
           _showRootNode = showRootNode;
       }
   
  +    public void setPreserveToggle(String preserveToggle)
  +    {
  +        _preserveToggle = preserveToggle;
  +    }
  +
       protected void setProperties(UIComponent component)
       {
           super.setProperties(component);
  @@ -124,5 +131,6 @@
           setBooleanProperty(component, JSFAttr.SHOW_LINES, _showLines);
           setBooleanProperty(component, JSFAttr.CLIENT_SIDE_TOGGLE, _clientSideToggle);
           setBooleanProperty(component, JSFAttr.SHOW_ROOT_NODE, _showRootNode);
  +        setBooleanProperty(component, JSFAttr.PRESERVE_TOGGLE, _preserveToggle);
       }
   }
  
  
  
  1.13      +7 -6      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.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- JSFAttr.java	7 Mar 2005 16:17:19 -0000	1.12
  +++ JSFAttr.java	19 Apr 2005 12:12:47 -0000	1.13
  @@ -115,11 +115,12 @@
       public static final String VAR_ATTR                    = "var";
       public static final String FIRST_ATTR                  = "first";
   
  -    // Tree attributes
  -    public static final String SHOW_NAV                    = "org.apache.myfaces.tree.SHOW_NAV";
  -    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";
  -    public static final String SHOW_ROOT_NODE              = "org.apache.myfaces.tree.SHOW_ROOT_NODE";
  +    // Tree2 attributes
  +    public static final String SHOW_NAV                    = "org.apache.myfaces.tree2.SHOW_NAV";
  +    public static final String SHOW_LINES                  = "org.apache.myfaces.tree2.SHOW_LINES";
  +    public static final String CLIENT_SIDE_TOGGLE          = "org.apache.myfaces.tree2.CLIENT_SIDE_TOGGLE";
  +    public static final String SHOW_ROOT_NODE              = "org.apache.myfaces.tree2.SHOW_ROOT_NODE";
  +    public static final String PRESERVE_TOGGLE             = "org.apache.myfaces.tree2.PRESERVE_TOGGLE";
   
       // Alternate locations (instead of using AddResource)
       public static final String JAVASCRIPT_LOCATION         = "org.apache.myfaces.JAVASCRIPT_LOCATION";
  
  
  
  1.190     +6 -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.189
  retrieving revision 1.190
  diff -u -r1.189 -r1.190
  --- myfaces_ext.tld	9 Apr 2005 19:14:05 -0000	1.189
  +++ myfaces_ext.tld	19 Apr 2005 12:12:47 -0000	1.190
  @@ -1802,6 +1802,12 @@
               <rtexprvalue>false</rtexprvalue>
               <description>Include the root node when rendering the tree (default is
true.)</description>
           </attribute>
  +        <attribute>
  +            <name>preserveToggle</name>
  +            <required>false</required>
  +            <rtexprvalue>false</rtexprvalue>
  +            <description>Preserve changes in client-side toggle information between
requests (default is true.)</description>
  +        </attribute>
           &alt_location_attributes;
           &ui_component_attributes;
       </tag>
  
  
  

Mime
View raw message