Disclose panelBox with a double-click on the header

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>

        
    
Comments:

Post a Comment:
Comments are closed for this entry.
About

The Oracle JDeveloper forum ranks in the Top 5 of the most active forums on the Oracle Technology Network (OTN).



The OTN Harvest blog is a summary of selected topics posted on the OTN Oracle JDeveloper forum.



It is an effort to turn knowledge exchange into an interesting read for developers who enjoy little nuggets of wisdom





Frank Nimphius

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today