The blog for hints & tips about Oracle Application Development Framework and Mobile Application Framework

  • ADFc
    December 23, 2010

How-to hide the close icon for task flows opened in dialogs

Frank Nimphius
Master Principal Product Manager

ADF bounded task flows can be opened in an external dialog
and return values to the calling application as documented in chapter 19 of Oracle Fusion Middleware Fusion Developer's
Guide for Oracle Application Development Framework11g


Setting the task flow call activity property Run as Dialog to true and the Display Type property
to inline-popup opens the bounded
task flow in an inline popup. To launch the dialog, a command item is used that
references the control flow case to the task flow call activity

<af:commandButton text="Lookup"

windowEmbedStyle="inlineDocument" useWindow="true"



By default, the dialog that contains the task flow has a
close icon defined that if pressed closes the dialog and returns to the calling
page. However, no event is sent to the calling page to handle the close case.

To avoid users closing the dialog without the calling
application to be notified in a return listener, the close icon shown in the
opened dialog can be hidden using ADF Faces skinning.

The following skin selector hides the close icon in the

display:none; }

To learn about skinning, see chapter 20 of Oracle Fusion
Middleware Web User Interface Developer's Guide for Oracle Application
Development Framework


However, the skin selector that is shown above hides the
close icon from all af:panelWindow
usages, which may not be intended. To only hide the close icon from dialogs
opened by a bounded task flow call activity, the ADF Faces component styleClass property can be used.

The af:panelWindow
component shown below has a "withCloseWindow" style class property
name defined. This name is referenced in the following skin selector, ensuring
that the close icon is displayed

display:block; }

In summary, to hide the close icon shown for bounded task
flows that are launched in inline popup dialogs, the default display behavior
of the close icon of the af:panelWindow
needs to be reversed. Instead to always display the close icon, the close icon
is always hidden, using the first skin selector. To show the disclosed icon in
other usages of the af:panelWindow
component, the component is flagged with a styleClass
property value as shown below

<af:popup id="p1">

  <af:panelWindow id="pw1"
contentWidth="300" contentHeight="300"



The "withCloseIcon" value is referenced in the second
skin definition

display:block; }

The complete entry of the skin CSS file looks as shown

af|panelWindow::close-icon-style{ display:none; }

af|panelWindow.withCloseIcon::close-icon-style{ display:block; }

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.