X

The blog for hints & tips about Oracle Application Development Framework and Mobile Application Framework

Disclose panelBox with a double-click on the header

Frank Nimphius
Master Principal Product Manager

No long post today, just some sample code showing the bit of JavaScript you need to add to a panel box to toggle it open/close on a double click.

<f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<af:document title="PanelBoxTester.jsf" id="d1">
<af:resource type="javascript">
function togglePanelBox(mouseEvent){
var panelBox = mouseEvent.getSource();
panelBox.broadcast(new AdfDisclosureEvent(panelBox, !panelBox.getDisclosed()));
}
</af:resource>
<af:form id="f1">
<af:panelBox text="PanelBox1" id="pb1">
<f:facet name="toolbar"/>
<af:clientListener method="togglePanelBox" type="dblClick"/>
</af:panelBox>
</af:form>
</af:document>
</f:view>

                                         
    
                    
          
        
              
       

                                
                                                                

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.