Thursday, October 25, 2012

How to pass parameters to Popup Window in ADF


Subject :  How to pass parameters to a popup window. For eg : Page fragment displays employee details in a <af:table> format , By selecting any employee name for a specific row we are launching a popup and we need to pass the selected row specific employee name to popup window

Solution



<af:column id="c2" headerText="EmpName">
// Set clientComponent vlaue = true, define clientAttribute and set emp Name value
  <af:outputText value="EmpName" id="ot1" clientComponent="true">
     <af:clientAttribute name="empName" value="#{row.lastName}"/>
// Show popup when mou mouse Hover
     <af:showPopupBehavior popupId="::p1" triggerType="mouseHover"  
                           align="endAfter" alignId="ot1"/>
  </af:outputText>
</af:column>




<af:popup id="p1" launcherVar="source" contentDelivery="lazyUncached" eventContext="launcher">
     <af:panelFormLayout id="pfl1">
<af:panelLabelAndMessage label="EmployeeName" id="plam1">
<af:outputText value="#{viewScope.ename}" id="ot5"/>
</af:panelLabelAndMessage>
</af:panelFormLayout>
<af:setPropertyListener from="#{source.attributes.empName}" 
                           to="#{viewScope.ename}" type="popupFetch"/>
</af:popup>


1 comment:

  1. Hi Ravi,

    Can u post your example project? I tried but it's not work

    ReplyDelete