[richfaces-issues] [JBoss JIRA] (RF-11747) RF 4.1 onbeforetoggle issue

Lukáš Fryč (Commented) (JIRA) jira-events at lists.jboss.org
Wed Nov 30 12:22:41 EST 2011


    [ https://issues.jboss.org/browse/RF-11747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646780#comment-12646780 ] 

Lukáš Fryč commented on RF-11747:
---------------------------------

Hey Ibrahim,

I have tried on the modified Showcase sample:

{code:xml|title=treeModelRecursiveAdaptor-sample.xhtml (modified 1)}
<rich:tree toggleType="ajax" var="item">
    <rich:treeModelRecursiveAdaptor roots="#{fileSystemBean.sourceRoots}" nodes="#{item.directories}">
        <rich:treeNode onbeforetoggle="alert('#{item.shortPath}')">
            #{item.shortPath}
        </rich:treeNode>
        <rich:treeModelAdaptor nodes="#{item.files}">
            <rich:treeNode>#{item}</rich:treeNode>
        </rich:treeModelAdaptor>
    </rich:treeModelRecursiveAdaptor>
</rich:tree>
{code}

{code:xml|title=treeModelRecursiveAdaptor-sample.xhtml (modified 2)}
<a4j:commandButton>
    <rich:componentControl event="click" target="popup" operation="show" />
</a4j:commandButton>

<rich:popupPanel id="popup">
    <rich:tree toggleType="ajax" var="item">
        <rich:treeModelRecursiveAdaptor roots="#{fileSystemBean.sourceRoots}" nodes="#{item.directories}">
            <rich:treeNode onbeforetoggle="alert('#{item.shortPath}')">
                #{item.shortPath}
            </rich:treeNode>
            <rich:treeModelAdaptor nodes="#{item.files}">
                <rich:treeNode>#{item}</rich:treeNode>
            </rich:treeModelAdaptor>
        </rich:treeModelRecursiveAdaptor>
    </rich:tree>
</rich:popupPanel>
{code}

That's quite close to your sample and works fine.

It would be great if you could minimize your sample to the simplest one which is not working and post us that sample. 
                
> RF 4.1 onbeforetoggle issue
> ---------------------------
>
>                 Key: RF-11747
>                 URL: https://issues.jboss.org/browse/RF-11747
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-menu, regression
>    Affects Versions: 4.1.0.Milestone3, 4.1.0.Milestone4, 4.1.0.CR1
>         Environment: JDK 6, JSF 2, JBoss 6 Final
>            Reporter: Ibrahim Abu Ghosh
>            Assignee: Lukáš Fryč
>              Labels: richfaces
>
> Dears,
> i'am using rich:tree in two places, one in the main panel of my template, and the other one is in a popup, i'am using the onbeforetoggle event, it was running successfully since 4.0 to 4.1 M2, after M2 it is not functioning right, here is my tests :
> 1- RF 4-M3, onbeforetoggle not firing in the main template & in the popup.
> 2- RF 4-M4, main template is firing the event, popup is not firing.
> 3- RF 4-CR1, same as M3.
>  
> here is my .xhtml code :
> {code}
> <rich:tree id="myTree"
>                var="node"
>                nodeType="#{node.type}"
>                toggleType="ajax"
>                selectionType="ajax">
>        <rich:treeModelRecursiveAdaptor roots="#{bean.roots}"
>                                                         nodes="#{node.folders}">
>                <rich:treeNode title="#{node.path}"
>                                      type="folder"                                                                                                                
>                                      onbeforetoggle="getSelectedPath('#{node.path}')"
>                                      ondblclick="chooseFolder('#{node.ecmId}', '#{node.path}')"
>                                      toggleListener="#{bean.treeToggleListener}">
>  
>                               <h:outputText value="#{node.label}" />
>                       </rich:treeNode>
>                 </rich:treeModelRecursiveAdaptor>
>             </rich:tree>
> {code} 
> where getSelectedPath is a a4j:jsFunction.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the richfaces-issues mailing list