My goal is that on a row being selected a popup is shown directly below the most recently selected row.
I have set up a table selectionListener and am able to have a popup show aligned to the table on selection. I have been unable to detect which row was selected because the selectionEvent source is the table. My thought was to try and map between the selected RowKey and selected row but I have not come up with a mapping.
Here is the relevant jspx:
<af:table var="row" rowBandingInterval="0" id="t1"
width="100%"
value="#{backingBeanScope.managedBean1.tableData}"
rowSelection="single"
displayRow="selected"
columnStretching="column:c1"
selectionListener="#{backingBeanScope.managedBean1.selectionListener}"
binding="#{backingBeanScope.managedBean1.myTable}">
<af:column sortable="false" headerText="col1" id="c1">
<af:outputText value="#{row}" id="ot2"/>
</af:column>
</af:table>
<af:popup id="p1" contentDelivery="immediate"
binding="#{backingBeanScope.managedBean1.myPopup}">
<af:panelGroupLayout id="pgl2">
<af:outputText value="outputText2" id="ot3"/>
</af:panelGroupLayout>
</af:popup>
Here is what I have for the selectionListener:
public void selectionListener(SelectionEvent selectionEvent) {
UIComponent source = (UIComponent) selectionEvent.getSource();
RichPopup.PopupHints ph = new RichPopup.PopupHints();
ph.add(RichPopup.PopupHints.HintTypes.HINT_ALIGN_ID, source);
ph.add(RichPopup.PopupHints.HintTypes.HINT_ALIGN, RichPopup.PopupHints.AlignTypes.ALIGN_START_BEFORE);
myPopup.show(ph);
}
I am using 11.1.1.5.0
Any insight is appreciated.