Thursday 9 October 2008

JDev 11g: ADF Faces RC: new component af:noteWindow

I'm currently having a bit of fun hunting around the JDev 11g production release for features that weren't in the earlier TP releases. Today I stumbled across the af:noteWindow tag within ADF Faces RC.

The af:noteWindow tag displays a speech bubble popup similar to the tooltips on other components. The following screenshot shows the af:noteWindow displayed via a mouseOver af:showPopupBehavior tag:


The following code demonstrates how I achieved the above:

<af:panelGroupLayout layout="horizontal">
  Contact
  <af:spacer width="10" height="10"/>
  <af:outputText value="SAGE Computing Services">
    <af:showPopupBehavior
      popupId="sagePopup"
      triggerType="mouseOver"/>
  </af:outputText>
  <af:spacer width="10" height="10"/>
  for more information.
  </af:panelGroupLayout>
</af:panelGroupLayout>
<af:popup id="sagePopup">
  <af:noteWindow>
    <af:panelGroupLayout layout="vertical">
      <af:image source="/sageWeb2.0LogoSmall.gif"/>
      <af:group>Contact enquiries@sagecomputing.com.au.
      </af:group>
    </af:panelGroupLayout>
  </af:noteWindow>
</af:popup>


According to the documentation the af:noteWindow must be located as the direct child within a af:popup tag.

I guess the primary benefit of this component is to display help text inline within a page.

No comments: