[
http://issues.apache.org/jira/browse/MYFACES-760?page=comments#action_12357043
]
Mike Kienenberger commented on MYFACES-760:
-------------------------------------------
Andrew, if it's facelets-related, it's most likely that the Tree2 Tag file is
doing something other than just pass-through assignment of attribute values to
the component. If that's the case, you'll need to write a facelets TagHandler
which imitates the custom behavior of the Tree2 Tag file.
I've taken a look at org.apache.myfaces.custom.tree2.TreeTag, and it seems
mostly straight-forward. However, the attribute names specified on the tag are
getting converted to an unusual attribute name value on the component.
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";
It sure seems to me that it'd work a lot better if someone simply changed the
map attribute names so that they matched the attribute names on the tag. Then
non-JSP ViewHandlers should be able to automatically set the attributes without
the need for a custom TagHandler.
I think that's what's being said in this thread:
http://www.mail-archive.com/[email protected]/msg06830.html
However, if they aren't going to be changed, then you need to write a facelets
tag handler that translates from "showNav" to
"org.apache.myfaces.tree2.SHOW_NAV" using the component.getAttributes() method.
The facelets documentation shows an example of "renaming" an attribute at the
following URL.
https://facelets.dev.java.net/nonav/docs/dev/docbook.html#dev-meta-component
> Tree2 setLeaf(false) error
> --------------------------
>
> Key: MYFACES-760
> URL: http://issues.apache.org/jira/browse/MYFACES-760
> Project: MyFaces
> Type: Bug
> Components: Tomahawk
> Versions: 1.1.0
> Environment: Tested in JBoss 4.0.3 with Seam
> Reporter: Andrew Efremov
> Assignee: sean schofield
>
> when trying to add nodes to tree2
> TreeNodeBase tree = new TreeNodeBase("document", node.getName(),
> node.getId().toString(), false);
> result node have tree.isLeaf() == true;
> the same is when you trying explicitly set Leaf
> tree.setLeaf(false);
> result node have tree.isLeaf() == true;
--
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