You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Nicolas Belisle (JIRA)" <de...@myfaces.apache.org> on 2006/01/18 20:28:42 UTC

[jira] Created: (MYFACES-1039) Tree2 component does not provide getters/setters for some properties

Tree2 component does not provide getters/setters for some properties
--------------------------------------------------------------------

         Key: MYFACES-1039
         URL: http://issues.apache.org/jira/browse/MYFACES-1039
     Project: MyFaces
        Type: Bug
  Components: Tomahawk  
    Versions: 1.1.1    
 Environment: Facelets 
    Reporter: Nicolas Belisle


Hi, 

The Tree2 component should provide getter and setter for the properties:
 - showLines
 - showNav
 - clientSideToggle 
 - showRootNode
 - preserveToggle

Instread, HtmlTreeRenderer is now using the method getBoolean to get access to the above values (which are set by TreeTag). 

This strategy only works with JSP. These properties cannot be set in Facelets. 


A patch will follow shortly.

Regards, 

Nicolas

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (TOMAHAWK-47) Tree2 component does not provide getters/setters for some properties

Posted by "Mike Kienenberger (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-47?page=comments#action_12378039 ] 

Mike Kienenberger commented on TOMAHAWK-47:
-------------------------------------------

The simplest and most backward-compatible (BC) fix is to simply provide setters and getters that set the existing generic attribute names as appropriate.

In terms of design, I think it's cleaner to dump the FQNs and not use generic attributes, but unfortunately, that's not BC, and it will require changing a lot more code.

> Tree2 component does not provide getters/setters for some properties
> --------------------------------------------------------------------
>
>          Key: TOMAHAWK-47
>          URL: http://issues.apache.org/jira/browse/TOMAHAWK-47
>      Project: MyFaces Tomahawk
>         Type: Bug

>   Components: Tree2
>     Versions: 1.1.1
>  Environment: Facelets 
>     Reporter: Nicolas Belisle
>     Assignee: sean schofield
>      Fix For: 1.1.3-SNAPSHOT
>  Attachments: tree2Patch.patch
>
> Hi, 
> The Tree2 component should provide getter and setter for the properties:
>  - showLines
>  - showNav
>  - clientSideToggle 
>  - showRootNode
>  - preserveToggle
> Instread, HtmlTreeRenderer is now using the method getBoolean to get access to the above values (which are set by TreeTag). 
> This strategy only works with JSP. These properties cannot be set in Facelets. 
> A patch will follow shortly.
> Regards, 
> Nicolas

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (TOMAHAWK-47) Tree2 is not compatible with facelets

Posted by "sean schofield (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/TOMAHAWK-47?page=all ]

sean schofield updated TOMAHAWK-47:
-----------------------------------

        Status: Resolved  (was: Patch Available)
    Resolution: Fixed

I did not use the patch as provided but I did use it as a basis for the fix.  I did some basic testing and I was able to get things working in a simple facelet app.  Can someone else please verify that this is fixed?  Please report any issues here and we can reopen this bug.

> Tree2 is not compatible with facelets
> -------------------------------------
>
>          Key: TOMAHAWK-47
>          URL: http://issues.apache.org/jira/browse/TOMAHAWK-47
>      Project: MyFaces Tomahawk
>         Type: Bug

>   Components: Tree2
>     Versions: 1.1.1
>  Environment: Facelets 
>     Reporter: Nicolas Belisle
>     Assignee: sean schofield
>      Fix For: 1.1.3-SNAPSHOT
>  Attachments: tree2Patch.patch
>
> Hi, 
> The Tree2 component should provide getter and setter for the properties:
>  - showLines
>  - showNav
>  - clientSideToggle 
>  - showRootNode
>  - preserveToggle
> Instread, HtmlTreeRenderer is now using the method getBoolean to get access to the above values (which are set by TreeTag). 
> This strategy only works with JSP. These properties cannot be set in Facelets. 
> A patch will follow shortly.
> Regards, 
> Nicolas

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (TOMAHAWK-47) Tree2 is not compatible with facelets

Posted by "Mike Kienenberger (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-47?page=comments#action_12378497 ] 

Mike Kienenberger commented on TOMAHAWK-47:
-------------------------------------------

Sean,

My guess is that you've fixed the problem.

However, you haven't left any backward-compatibility with all of those facelets users who've been using tree2 up to this point by using the fully-qualified attribute name.

Have you considered temporarily having your getters also check for the fully-qualified name, and issuing a log warning?   At minimum, we at least need to throw an error if a FQN has been specified.

Something like:

    public boolean isShowNav()
    {
        if (_showNav != null) return _showNav.booleanValue();

        // TODO: temporarily support fully-qualified tree2 attribute names.
        ValueBinding vb = getValueBinding("org.apache.myfaces.tree2.SHOW_NAV");
        if (vb != null)
        {
            log.warning("org.apache.myfaces.tree2.SHOW_NAV" is deprecated.  Please use showNav instead.");
            Boolean v = vb != null ? (Boolean)vb.getValue(getFacesContext()) : null;
            return v == null ||  v.booleanValue();
        }

        ValueBinding vb = getValueBinding("showNav");
        Boolean v = vb != null ? (Boolean)vb.getValue(getFacesContext()) : null;
        return v == null ||  v.booleanValue();
    }



> Tree2 is not compatible with facelets
> -------------------------------------
>
>          Key: TOMAHAWK-47
>          URL: http://issues.apache.org/jira/browse/TOMAHAWK-47
>      Project: MyFaces Tomahawk
>         Type: Bug

>   Components: Tree2
>     Versions: 1.1.1
>  Environment: Facelets 
>     Reporter: Nicolas Belisle
>     Assignee: sean schofield
>      Fix For: 1.1.3-SNAPSHOT
>  Attachments: tree2Patch.patch
>
> Hi, 
> The Tree2 component should provide getter and setter for the properties:
>  - showLines
>  - showNav
>  - clientSideToggle 
>  - showRootNode
>  - preserveToggle
> Instread, HtmlTreeRenderer is now using the method getBoolean to get access to the above values (which are set by TreeTag). 
> This strategy only works with JSP. These properties cannot be set in Facelets. 
> A patch will follow shortly.
> Regards, 
> Nicolas

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (TOMAHAWK-47) Tree2 component does not provide getters/setters for some properties

Posted by "Mike Kienenberger (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/TOMAHAWK-47?page=all ]

Mike Kienenberger updated TOMAHAWK-47:
--------------------------------------


> Tree2 component does not provide getters/setters for some properties
> --------------------------------------------------------------------
>
>          Key: TOMAHAWK-47
>          URL: http://issues.apache.org/jira/browse/TOMAHAWK-47
>      Project: MyFaces Tomahawk
>         Type: Bug
>   Components: Tree2
>  Environment: Facelets 
>     Reporter: Nicolas Belisle
>  Attachments: tree2Patch.patch
>
> Hi, 
> The Tree2 component should provide getter and setter for the properties:
>  - showLines
>  - showNav
>  - clientSideToggle 
>  - showRootNode
>  - preserveToggle
> Instread, HtmlTreeRenderer is now using the method getBoolean to get access to the above values (which are set by TreeTag). 
> This strategy only works with JSP. These properties cannot be set in Facelets. 
> A patch will follow shortly.
> Regards, 
> Nicolas

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (TOMAHAWK-47) Tree2 component does not provide getters/setters for some properties

Posted by "Mike Kienenberger (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-47?page=comments#action_12370716 ] 

Mike Kienenberger commented on TOMAHAWK-47:
-------------------------------------------

Sean,  is the refactoring of tree2 finished so that we can fix this issue?


> Tree2 component does not provide getters/setters for some properties
> --------------------------------------------------------------------
>
>          Key: TOMAHAWK-47
>          URL: http://issues.apache.org/jira/browse/TOMAHAWK-47
>      Project: MyFaces Tomahawk
>         Type: Bug
>   Components: Tree2
>  Environment: Facelets 
>     Reporter: Nicolas Belisle
>  Attachments: tree2Patch.patch
>
> Hi, 
> The Tree2 component should provide getter and setter for the properties:
>  - showLines
>  - showNav
>  - clientSideToggle 
>  - showRootNode
>  - preserveToggle
> Instread, HtmlTreeRenderer is now using the method getBoolean to get access to the above values (which are set by TreeTag). 
> This strategy only works with JSP. These properties cannot be set in Facelets. 
> A patch will follow shortly.
> Regards, 
> Nicolas

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (MYFACES-1039) Tree2 component does not provide getters/setters for some properties

Posted by "Nicolas Belisle (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-1039?page=all ]

Nicolas Belisle updated MYFACES-1039:
-------------------------------------

    Attachment: tree2Patch.patch

Modifies: org.apache.myfaces.renderkit.JSFAttr, org.apache.myfaces.custom.tree2.HtmlTree & org.apache.myfaces.custom.tree2.HtmlTreeRenderer

> Tree2 component does not provide getters/setters for some properties
> --------------------------------------------------------------------
>
>          Key: MYFACES-1039
>          URL: http://issues.apache.org/jira/browse/MYFACES-1039
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: 1.1.1
>  Environment: Facelets 
>     Reporter: Nicolas Belisle
>  Attachments: tree2Patch.patch
>
> Hi, 
> The Tree2 component should provide getter and setter for the properties:
>  - showLines
>  - showNav
>  - clientSideToggle 
>  - showRootNode
>  - preserveToggle
> Instread, HtmlTreeRenderer is now using the method getBoolean to get access to the above values (which are set by TreeTag). 
> This strategy only works with JSP. These properties cannot be set in Facelets. 
> A patch will follow shortly.
> Regards, 
> Nicolas

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (TOMAHAWK-47) Tree2 component does not provide getters/setters for some properties

Posted by "sean schofield (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-47?page=comments#action_12377682 ] 

sean schofield commented on TOMAHAWK-47:
----------------------------------------

I will try to take a look at this.  If someone wants to rework the patch now that everything has been reorged in SVN that would speed things up.  Otherwise I will get to it when I can.

> Tree2 component does not provide getters/setters for some properties
> --------------------------------------------------------------------
>
>          Key: TOMAHAWK-47
>          URL: http://issues.apache.org/jira/browse/TOMAHAWK-47
>      Project: MyFaces Tomahawk
>         Type: Bug

>   Components: Tree2
>     Versions: 1.1.1
>  Environment: Facelets 
>     Reporter: Nicolas Belisle
>     Assignee: sean schofield
>      Fix For: 1.1.3-SNAPSHOT
>  Attachments: tree2Patch.patch
>
> Hi, 
> The Tree2 component should provide getter and setter for the properties:
>  - showLines
>  - showNav
>  - clientSideToggle 
>  - showRootNode
>  - preserveToggle
> Instread, HtmlTreeRenderer is now using the method getBoolean to get access to the above values (which are set by TreeTag). 
> This strategy only works with JSP. These properties cannot be set in Facelets. 
> A patch will follow shortly.
> Regards, 
> Nicolas

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (TOMAHAWK-47) Tree2 component does not provide getters/setters for some properties

Posted by "sean schofield (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-47?page=comments#action_12377934 ] 

sean schofield commented on TOMAHAWK-47:
----------------------------------------

The portion of the patch dealing with JSFAttr.java doesn't seem to be necessary.  Am I missing something there?  I'm new to facelets so I'm trying to work all of this out.  WIth everyone's help I can fix this in a few days.  The facelets requirements seem reasonable enough.

> Tree2 component does not provide getters/setters for some properties
> --------------------------------------------------------------------
>
>          Key: TOMAHAWK-47
>          URL: http://issues.apache.org/jira/browse/TOMAHAWK-47
>      Project: MyFaces Tomahawk
>         Type: Bug

>   Components: Tree2
>     Versions: 1.1.1
>  Environment: Facelets 
>     Reporter: Nicolas Belisle
>     Assignee: sean schofield
>      Fix For: 1.1.3-SNAPSHOT
>  Attachments: tree2Patch.patch
>
> Hi, 
> The Tree2 component should provide getter and setter for the properties:
>  - showLines
>  - showNav
>  - clientSideToggle 
>  - showRootNode
>  - preserveToggle
> Instread, HtmlTreeRenderer is now using the method getBoolean to get access to the above values (which are set by TreeTag). 
> This strategy only works with JSP. These properties cannot be set in Facelets. 
> A patch will follow shortly.
> Regards, 
> Nicolas

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira