I've managed to get the click event of the button working so far by following the documentation. What I'm struggling now with is to programmatically trigger the click event of ADF component.
The source code is as follows:
<af:showDetailItem id="pane1" text="Panel Label 1" disclosed="true">
<af:commandButton text="commandButton 1" id="cb1">
<af:clientListener method="showNext" type="action" />
</af:commandButton>
</af:showDetailItem>
<af:showDetailItem id="pane2" text="Panel Label 2">
<af:commandButton text="commandButton 2" id="cb2">
<af:clientListener method="showNext" type="action" />
</af:commandButton>
</af:showDetailItem>
<af:showDetailItem id="pane3" text="Panel Label 3">
<af:commandButton text="commandButton 3" id="cb3">
<af:clientListener method="showNext" type="action" />
</af:commandButton>
</af:showDetailItem>
Javascript
function showNext(evt){
var src = evt.getSource();
var showDetailItemNode = src.getParent(); // targets the showDetailItem tag
/* how do I trigger the click event of this node */
}
So basically what I'm trying to achieve is that when button #cb1 is clicked, I want to simulate the click event of showDetailItem #pane1 and so on...