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

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:

http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/taskflows_dialogs.htm#BABBAFJB

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" id="cb6"
        windowEmbedStyle="inlineDocument" useWindow="true"
        windowHeight="300" windowWidth="300"
        action="lookup" partialSubmit="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 dialog

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

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

http://download.oracle.com/docs/cd/E15523_01/web.1111/b31973/af_skin.htm#BAJFEFCJ

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

af|panelWindow.withCloseIcon::close-icon-style{ 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"
                                styleClass="withCloseIcon"/>
</af:popup>

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

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

The complete entry of the skin CSS file looks as shown below:

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


Comments:

Post a Comment:
Comments are closed for this entry.
About

The Oracle JDeveloper forum ranks in the Top 5 of the most active forums on the Oracle Technology Network (OTN).



The OTN Harvest blog is a summary of selected topics posted on the OTN Oracle JDeveloper forum.



It is an effort to turn knowledge exchange into an interesting read for developers who enjoy little nuggets of wisdom





Frank Nimphius

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today