-
2. Re: tree+menuItem: Is this a bug or my bad?
ilya_shaikovsky Feb 10, 2009 6:03 AM (in response to shiningliao)not sure that understand the problem? could you describe pelase?
-
3. Re: tree+menuItem: Is this a bug or my bad?
shiningliao Feb 10, 2009 6:04 AM (in response to shiningliao)Sorry for the above hiccup. Trying to attach the screenshot but failed.
Anyway, the problem I found is menuItem can only attach to ONE type of treeNode. Use the example in the screenshot (click on it to see), I have Queue A and Queue B nodes, both are 'Queue' type of treeNode. menuItem only work on 'Queue B' not 'Queue A'.
A bit of experiment shows, menuItem only work on the last treeNode. It means the siutation is dynamic depends on how you expend the tree. However, it always work on the last node of the same treeNode.
Any one got similiar problem? I am not sure if this is a bug in the tree or my implementation problem. -
4. Re: tree+menuItem: Is this a bug or my bad?
ilya_shaikovsky Feb 10, 2009 6:07 AM (in response to shiningliao)seems side effect from
https://jira.jboss.org/jira/browse/RF-3532
thanks! I'll update the issue with your case. -
5. Re: tree+menuItem: Is this a bug or my bad?
shiningliao Feb 10, 2009 6:16 AM (in response to shiningliao)Here is the partial source code to explain the problem further...
<rich:tree nodeSelectListener="#{objectTree.processSelection}" var="item" ajaxSubmitSelection="true" switchType="server" id="theTree" ajaxKeys="#{null}" value="#{objectTree.rootNode}" nodeFace="#{item.type}"> <rich:treeNode type="product" iconLeaf="/images/products.png" icon="/images/products.png" id="product" onclick="focus_product();"> <rich:dndParam name="label" type="drag">#{item}</rich:dndParam> <h:outputText value="#{item.name}" /> </rich:treeNode> <rich:treeNode type="user" iconLeaf="/images/users.png" icon="/images/users.png" id="user" onclick="focus_user();"> <rich:dndParam name="label" type="drag">#{item}</rich:dndParam> <h:outputText value="#{item.name}" /> </rich:treeNode> <rich:treeNode type="branches" iconLeaf="/images/branches.png" icon="/images/branches.png" id="branches" onclick="hide_all();"> <rich:dndParam name="label" type="drag">#{item}</rich:dndParam> <h:outputText value="#{item.name}" /> </rich:treeNode> : :
So, as you can see, I have a tree with several different type of treeNode.
Any then, I have meniItem attch to each treeNode like this:<rich:contextMenu event="oncontextmenu" submitMode="ajax" attachTo="product"> <rich:menuItem value="New Product.." action="#{objectTree.addNewNode}"> </rich:menuItem> </rich:contextMenu> <rich:contextMenu event="oncontextmenu" submitMode="ajax" attachTo="user"> <rich:menuItem value="New User.." action="#{objectTree.addNewNode}"> </rich:menuItem> </rich:contextMenu> : :
I was hoping any treeNode in the tree will have a menuItem pop-up when I right-click on it. Unfortunately, it isn't. Only the last one displayed in the tree.... -
6. Re: tree+menuItem: Is this a bug or my bad?
shiningliao Feb 10, 2009 6:18 AM (in response to shiningliao)"ilya_shaikovsky" wrote:
seems side effect from
https://jira.jboss.org/jira/browse/RF-3532
thanks! I'll update the issue with your case.
Thank you as well. That's quick response.