Create ADF popup for value change event(For select one choice component).

Add popup and add dialog to inside of the popup,then select popup and add value for binding attribute in mine
#{pageFlowScope.popupBean.myPop}.
private RichPopup myPop = new RichPopup();
public void selectOneChoiceEvent(ValueChangeEvent valueChangeEvent) {
RichPopup.PopupHints ph = new RichPopup.PopupHints();
myPop.show(ph);
}
public void setMyPop(RichPopup myPop) {
this.myPop = myPop;
}
public RichPopup getMyPop() {
return myPop;
}

Oracle ADF - Add new custom attribute for view object using Expression

Oracle ADF Client-side Validators

Oracle ADF Association sample for Department and Employee

Monday, May 30, 2011

Oracle ADF - Popup behavior in clientside

In this example explain how to show details data by popup for a table.
(1)Say table has following column and add client attributes to set row data to add popup behavior
<af:column id="c2" headerText="TraineeId">

<af:outputText value="#{row.Traineeid}" id="ot17" clientComponent="true">
<af:clientAttribute name="batchId" value="#{row.Batchid}"/>
<af:clientAttribute name="distance" value="#{row.Distance}"/>
<af:clientAttribute name="name" value="#{row.Name}"/>
<af:clientAttribute name="traineeId" value="#{row.Traineeid}"/>

<af:showPopupBehavior popupId="::p1" triggerType="mouseHover"
align="endAfter" alignId="ot17"/>
</af:outputText>
</af:column>

(2)Create a popup as follows(Sample code stuff to show above client attributes's data)

<af:popup id="p1" launcherVar="source" contentDelivery="lazyUncached"
eventContext="launcher">

<af:noteWindow id="nw1">
<af:panelFormLayout id="pfl1">
<af:panelLabelAndMessage label="batchId" id="plam1">
<af:outputText value="#{viewScope.batchId}" id="ot5"/>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="distance" id="plam2">
<af:outputText value="#{viewScope.distance}"
id="outputText1"/>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="name" id="plam3">
<af:outputText value="#{viewScope.name}" id="outputText2"/>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="traineeId" id="plam4">
<af:outputText value="#{viewScope.traineeId}" id="outputText3"/>
</af:panelLabelAndMessage>
</af:panelFormLayout>
</af:noteWindow>

<af:setPropertyListener from="#{source.attributes.batchId}"
to="#{viewScope.batchId}" type="popupFetch"/>
<af:setPropertyListener from="#{source.attributes.distance}"
to="#{viewScope.distance}"
type="popupFetch"/>
<af:setPropertyListener from="#{source.attributes.name}"
to="#{viewScope.name}" type="popupFetch"/>
<af:setPropertyListener from="#{source.attributes.salary}"
to="#{viewScope.salary}" type="popupFetch"/>
<af:setPropertyListener from="#{source.attributes.traineeId}"
to="#{viewScope.traineeId}"
type="popupFetch"/>
</af:popup>

(3)You can see popup behavior as follows only using above code stuff samples.


2 comments:

  1. I cannot get this working. I implemented exact same code in 11.1.1.4 and It does not display any popup. Any pointers?

    ReplyDelete
  2. Hi.
    This example done same version.can you try changing trigger type mouseHover to mouseOver or any other type
    check
    >http://www.oracle.com/technetwork/developer-tools/adf/learnmore/35-passing-values-to-popup-169177.pdf

    ReplyDelete