Property Extension User-Defined Enums

9 Customizing User Flow 9-1 9 Customizing User Flow OAAM supports the customization of user flow. The StrutsTiles framework is used by OAAM to create a common look and feel for an application.

9.1 OAAM StrutsTiles Framework

OAAM uses the Struts framework to define the user interface flow. The Struts configuration file WEB-INFstruts-config.xml defines all the navigation rules in the form of Struts action definitions. Action definitions typically contain path, type, and parameter attributes. Many definitions also contain one or more forward elements that indicate which page should be displayed next. Refer to Section 9.6, Struts Configuration File for an example of the struts-config.xml file. Interface pages are constructed using the Tiles component of the Struts Framework. The layout file WEB-INFtiles-def.xml contains definitions for the various pages. Refer to Section 9.5, Interface Page Configuration File for an example of the tiles.def.xml file. In order to deploy Java Server Pages JSP files, you must add them to the OAAM shared library. See Chapter 7, Customizing Oracle Adaptive Access Manager for more information about the Oracle Adaptive Access Manager Extensions Shared Library.

9.2 Customizing the OAAM Interface Flow and JSP Layout

To customize the OAAM user interface flow and the layout of the Java Server Pages JSPs, you must override the OAAM Server JSP and struts action targets using the OAAM Extensions Shared library. The Extensions Shared Library contains the following two files to be used for the customizations: ■ WEB-INFstruts-config-extension.xml ■ WEB-INFtiles-def-extension.xml

9.3 Customizing Java Server Pages JSPs

To customize the look and feel presented in the graphical user interface GUI, add the custom JSP files to the OAAM Extensions shared library and then add the definitions to the tiles-def-extension.xml file. Note: Customizations should only be done in the OAAM Extensions Shared Library. Do not modify the struts-config.xml and tiles-def.xml files. 9-2 Oracle Fusion Middleware Developers Guide for Oracle Adaptive Access Manager The following example shows the definition for the password page, as defined in tiles-defs.xml: definition name=password extends=bharosa.uio.baseLayout put name=body value=password.jsp definition At run time the password page dynamically displays all necessary GUI elements for the user to enter the required credential. The following example shows the definition of a custom password page that can be added to tiles-def-extension.xml: definition name=password extends=bharosa.uio.baseLayout put name=body value=customPassword.jsp definition If the definition is added to the tiles-def-extension file, the new customPassword.jsp is used when the OAAM Server attempts to display the password page.

9.4 Overriding Struts Definitions

Similar to overriding JSP content files, the struts action classes and their mappings could be overridden. The following example shows the definition for the login action, as defined in struts-config.xml: action path=login type=com.bharosa.uio.actions.LoginAction forward name=success path=updateLoginStatus.do redirect=true forward name=loginJump path=loginJumpPage.jsp redirect=true forward name=password path=password forward name=challenge path=challengeUser.do redirect=true action The following example shows the possible values you could override for the login action by using struts-config.xml: action path=login type=com.bharosa.uio.actions.CustomLoginAction forward name=success path=updateLoginStatus.do redirect=true forward name=loginJump path=customLoginJumpPage.jsp redirect=true forward name=password path=password forward name=challenge path=customChallengeUser.do redirect=true action

9.5 Interface Page Configuration File

The user interface pages are constructed using the Tiles component of the Struts Framework.

9.5.1 Rendering the Page

The following example extends the baseLayout definition and uses a JSP named registerQuestionsHTML.jsp to render the content tile. It renders content appropriate for the JSP named registerQuestionsHTML.jsp: