Orbeon Forms
  • Getting started
  • Installation
    • Logging
    • Configuration banner
    • Docker
    • Azure
    • Tomcat
    • WildFly
    • WebSphere
    • WebLogic
    • GlassFish
    • Caches
    • Replication
    • Upgrading
  • Configuration
    • Properties
      • General
        • HTTP client
      • Form Runner
        • Detail page
          • Attachments
          • Email properties
          • PDF
          • Table of contents
        • Persistence
        • Summary page
      • Form Builder
      • XForms
    • Advanced
      • Workflows
      • Session management
      • State handling
      • Client-side error handling
      • Clustering and High Availability
      • Configuring a Form Runner eXist database
      • Creating a production WAR
      • Environments
      • JavaScript and CSS assets
      • Limiter filter
      • Run modes
      • Security
        • Content-Security-Policy header
      • SAP Hybris Module
      • XForms logging
    • Troubleshooting
      • Troubleshooting with the orbeon.log
      • Memory and threads
      • Relational database logging
      • Misc
  • Form Builder
    • Form settings
      • Time window
    • Form editor
      • Form area
      • Toolbox
      • Buttons bar
      • Control settings
      • Dependent fields and sections
      • Validation
      • Choices editor
      • Publishing
      • Cut, copy and paste
      • Section and grid settings
      • Section settings
      • Grid settings
      • Quick control search
      • Repeat settings
      • Repeated grids
      • Undo and redo
      • Keyboard shortcuts
    • Formulas
      • Examples of formulas
      • Formulas inspector
      • Formulas console
    • Summary page
    • Form localization
    • Advanced
      • Edit source
      • Services and actions
        • HTTP services
        • Database services
        • Simple Actions
        • Action Syntax
        • Action Syntax examples
        • Synchronizing repeated content
      • Testing a form in web mode
      • Testing PDF production
      • Testing offline functionality
      • Email Settings dialog
      • Field-level encryption
      • Messages
      • Section templates
      • Template syntax
      • XML Schemas support
      • Extensibility
        • Extension API
        • Integration
        • Toolbox component metadata
  • Form Runner
    • Overview
      • Terminology
    • Pages
      • Landing page
      • Published Forms page
      • Forms Admin page
      • Summary page
    • Components
      • Alert dialog
      • Attachment
      • Autocomplete
      • Captcha
      • Character counter
      • Checkbox input
      • Currency
      • Date
      • Dropdown date
      • Static and dynamic dropdown
      • Error summary
      • Grid
      • Handwritten signature
      • Hidden field
      • Image
      • Image annotation
      • Image attachment
      • International Securities Identification Number (ISIN)
      • Legal Entity Identifier (LEI)
      • Number
      • Open selection
      • Repeater
      • Formatted Text / Rich Text Editor
      • Section
      • Single-selection tree
      • Source code editor
      • Time
      • US Employer Identification Number (EIN)
      • US phone
      • US Social Security Number (SSN)
      • US state
      • Video
      • Video attachment
      • Wizard
      • XForms inspector
      • Yes/No answer
    • Features
      • Automatic calculations dependencies
      • Datasets
      • Excel and XML import
      • Excel and XML export
      • Summary page Excel Export
      • Form definitions and form data Zip Export
      • Purging historical data
      • Lease
      • Localization
      • Supported languages
      • Mobile support
      • Multitenancy
      • Form Runner navigation bar
      • PDF production
        • Automatic PDF
        • Automatic PDF header and footer configuration
        • PDF templates
      • Responsive design
      • Revision history
      • S3 storage
      • Simple data migration
      • TIFF production
      • Versioning
      • Wizard view
      • Workflow stage
    • Persistence
      • Using a relational database
      • Relational database schema
      • Purging old data using SQL
      • Auditing
      • Autosave
      • Database support
      • Flat view
    • Linking and embedding
      • Linking
      • Java Embedding API
      • JavaScript Embedding API
      • Liferay full portlet
      • Liferay proxy portlet
      • Securing Form Runner access
      • Form Runner offline embedding API
      • Angular component
      • React component
    • Access control and permissions
      • Users
      • Login & Logout
      • Deployed forms
      • Form fields
      • Editing forms
      • Owner and group member
      • Organizations
      • Scenarios
      • Token-based permissions
    • Styling
      • CSS
      • Grids CSS
      • Automatic PDF styling and CSS
    • APIs
      • Authentication of server-side service APIs
      • Persistence API
        • CRUD API
        • Search API
        • List form data attachments API
        • Form Metadata API
        • Lease API
        • Reindexing API
        • Caching
        • Versioning
        • Revision History API
        • Zip Export API
        • Custom persistence providers
      • Other APIs
        • Connection context API
        • Duplicate form data API
        • File scan API
        • Form Runner JavaScript API
        • Generate XML Schema API
        • PDF API
        • Publish form definition API
        • Run form in the background API
      • Data formats
        • Form data
        • Date and time
        • Form definition
    • Architecture and integration
      • Architecture
      • Access form data
      • Integration
    • Advanced
      • Buttons and processes
        • Simple process syntax
        • Core actions
        • Form Runner actions
          • Save action
          • Send action
          • Email action
        • XForms actions
        • Predefined buttons, processes and dialogs
        • Summary page buttons and processes
      • Custom dialogs/model logic
      • Services
      • Singleton form
      • Monitoring HTTP requests
  • XForms
    • Core
      • Attribute Value Templates (AVTs)
      • Binds
      • Validation
      • Variables
      • Keyboard focus
      • XForms JavaScript API
      • Error handling
        • Detailed behavior
      • Model-Bind variables
      • XForms 2.0 support
    • Events
      • Standard support
      • UI refresh events
      • Keyboard events
      • Extension events
      • Extension context information
      • Other event extensions
    • Actions
      • Repeat, insert and delete
      • Scripting actions
      • Extensions
    • Controls
      • Label, hint, help
      • Input
      • Output
      • Text area
      • Button
      • Upload
      • Dialog
    • Submission
      • Standard support
      • JSON support
      • Asynchronous submissions
      • Caching extension
      • Other submission extensions
    • XPath
      • Type annotations
      • Expression analysis
      • Tips
      • Compatibility
      • Standard functions
      • Maps and arrays Functions
      • Extension functions
        • Core functions
        • Utility functions
        • Model functions
        • Controls functions
        • XML functions
        • JSON functions
        • HTTP functions
        • Form Runner functions
        • Other functions
        • Deprecated functions
    • XBL components
      • FAQ
      • Guide
        • XBL Tutorial
        • Bindings
        • XForms models
        • Including content
        • Event handling
        • Conventions
        • Map XBL example
        • Learning from existing components
      • Advanced topics
        • XBL Modes
        • JavaScript companion classes
        • XBL library
        • Extensions
        • Attachment controls
    • XForms tutorial
      • Introduction
      • Installation
      • The Hello application
      • The Bookcast application
        • The basic app
        • Database access
        • Polishing the app
        • Adding a feed
    • Using XForms from Java apps
  • XML Platform
    • Page Flow Controller
      • Basics
      • XML submission
      • Navigating between pages
      • Paths and matchers
      • Other configuration elements
      • Typical combinations of page model and page view
      • Examples
      • Authorizing pages and services
    • Processors
      • URL generator
      • Request generator
      • PDF to image converter
    • Resources
      • Resource managers
      • Setting up an external resources directory
    • Other
      • Binary and text documents
  • FAQ
    • Licensing
    • PE and Dev Support
    • Form Builder and Form Runner
    • Resources and support
    • Other technical questions
  • Contributors
    • Automated tests
    • Building Orbeon Forms
    • Localizing Orbeon Forms
    • Validation functions
    • Contributor License Agreement
  • Release notes
    • Orbeon Forms 2022.1.9
    • Orbeon Forms 2024.1.1
    • Orbeon Forms 2023.1.7
    • Orbeon Forms 2024.1
    • Orbeon Forms 2023.1.6
    • Orbeon Forms 2023.1.5
    • Orbeon Forms 2021.1.11
    • Orbeon Forms 2022.1.8
    • Orbeon Forms 2023.1.4
    • Orbeon Forms 2023.1.3
    • Orbeon Forms 2023.1.2
    • Orbeon Forms 2022.1.7
    • Orbeon Forms 2023.1.1
    • Orbeon Forms 2023.1
    • Orbeon Forms 2022.1.6
    • Orbeon Forms 2021.1.10
    • Orbeon Forms 2022.1.5
    • Orbeon Forms 2021.1.9
    • Orbeon Forms 2022.1.4
    • Orbeon Forms 2022.1.3
    • Orbeon Forms 2021.1.8
    • Orbeon Forms 2022.1.2
    • Orbeon Forms 2022.1.1
    • Orbeon Forms 2022.1
    • Orbeon Forms 2021.1.7
    • Orbeon Forms 2021.1.6
    • Orbeon Forms 2021.1.5
    • Orbeon Forms 2021.1.4
    • Orbeon Forms 2021.1.3
    • Orbeon Forms 2021.1.2
    • Orbeon Forms 2021.1.1
    • Orbeon Forms 2021.1
    • Orbeon Forms 2020.1.6
    • Orbeon Forms 2019.2.4
    • Orbeon Forms 2019.1.2
    • Orbeon Forms 2018.2.5
    • Orbeon Forms 2018.1.4
    • Orbeon Forms 2020.1.5
    • Orbeon Forms 2020.1.4
    • Orbeon Forms 2020.1.3
    • Orbeon Forms 2020.1.2
    • Orbeon Forms 2019.2.3
    • Orbeon Forms 2020.1.1
    • Orbeon Forms 2020.1
    • Orbeon Forms 2019.2.2
    • Orbeon Forms 2019.2.1
    • Orbeon Forms 2019.1.1
    • Orbeon Forms 2019.2
    • Orbeon Forms 2019.1
    • Orbeon Forms 2018.2.4
  • Release history
  • Use cases
  • Product roadmap
  • Index of features
Powered by GitBook
On this page
  • Availability
  • Supported Liferay versions
  • Deploying into Liferay
  • Configuration
  • Accessing Liferay users and roles
  • Performance tuning
  • Creating a new landing page for the portlet
  1. Form Runner
  2. Linking and embedding

Liferay full portlet

PreviousJavaScript Embedding APINextLiferay proxy portlet

Last updated 5 years ago

Please make sure to check the as well, as that is the recommended way to deploy Orbeon Forms into Liferay, and for a comparison of portlet deployments.

Availability

This is an Orbeon Forms PE feature.

The full portlet is no longer supported as of Orbeon Forms 2017.2 and newer. Instead, please see the .

Supported Liferay versions

See .

Deploying into Liferay

Configuration

The Orbeon Forms WAR can be directly deployed into the Liferay portal. By default, the Form Runner demo forms and XForms examples are immediately available within the portlet:

The following steps assume that:

  • Liferay is deployed on port 8080

  • the Orbeon Forms WAR is deployed under the name "orbeon" (which is the default if the WAR file is called orbeon.war)

Installation steps:

  1. Deploy orbeon.war: Start Liferay. When it is fully started move the orbeon.war into the Liferay deploy directory (e.g. ~/liferay/deploy). At this point, you should see message indicating that Orbeon is being deployed. Monitor the Liferay output as well as the logs/orbeon.log for possible errors.

  2. Enable dynamic resource reloading (optional): Remove the file webapps/orbeon/META-INF/context.xml and restart Liferay. For more information on what this does, see note 2 below.

  3. Configuration for Form Runner (optional): You can skip this step if you do not intend to use Form Runner or Form Builder in a portlet. Otherwise, create a file WEB-INF/resources/config/properties-local.xml which declares the following properties (and other properties you might want to override):

     <properties xmlns:xs="http://www.w3.org/2001/XMLSchema"
                 xmlns:oxf="http://www.orbeon.com/oxf/processors">
    
         <!-- Configure authentication properties through headers -->
         <property
             as="xs:string"
             name="oxf.fr.authentication.method"
             value="header"/>
    
         <!-- If you want the Liferay user email used for Form Runner authentication -->
         <property
             as="xs:string"
             name="oxf.fr.authentication.header.username"
             value="Orbeon-Liferay-User-Email"/>
    
         <!-- If you want Liferay roles used -->
         <property
             as="xs:string"
             name="oxf.fr.authentication.header.roles"
             value="Orbeon-Liferay-User-Roles"/>
    
     </properties>

    The host name (localhost), port (8080), and context path (orbeon) must be updated to match your local configuration.

  4. Add the Orbeon Forms portlet: Log into the portal, go to the Add menu and create a new page, for example Orbeon Page. Then go to the Applications tab and click or drag "Orbeon Forms Portlet" to the page. The Orbeon Forms home page will show.

NOTE:

When Liferay deploys Orbeon Forms, it changes some of the descriptors and adds a META-INF/context.xml which is not present in the distribution of Orbeon Forms. This file contains:

<context antijarlocking="true" antiresourcelocking="true">

which causes Tomcat to, on startup, make a copy of the Orbeon web application into its temp directory and use that copy instead of the files under webapps/orbeon. That copy is removed when the server shuts down, and will be done again the next time the server is started. This makes starting Liferay slower, but more importantly this means that changes you make to files under webapps/orbeon after the server started will never be picked up. So any modification to the resources (WEB-INF/resources) of your application will require a restart of Liferay. This can be quite time consuming and annoying, hence our recommendation to remove the META-INF/context.xml generated by Liferay.

Accessing Liferay users and roles

Using the xxf:get-request-header() function

When running in Liferay, you can access some specific user and roles information from XForms.

Getting the current user's email:

xxf:get-request-header('orbeon-liferay-user-email')

Example:

'test@liferay.com'

Getting the current user's full name:

xxf:get-request-header('orbeon-liferay-user-full-name')

Example:

'Joe Bloggs'

Getting the current user's role names:

xxf:get-request-header('orbeon-liferay-user-roles')

This returns a sequence of strings, with one string per role.

Example:

('Administrator', 'Power user', 'User')

Portlet filters

[SINCE Orbeon Forms 4.10]

The portlet is configured to use two portlet filters in portlet.xml.

The first filter, AddLiferayUserHeadersFilter, extracts Liferay user information and sets it as headers ("properties" in portlet API parlance). This sets the following properties/headers:

  • Orbeon-Liferay-User-Id

  • Orbeon-Liferay-User-Screen-Name

  • Orbeon-Liferay-User-Full-Name

  • Orbeon-Liferay-User-First-Name [SINCE Orbeon Forms 2018.1]

  • Orbeon-Liferay-User-Middle-Name [SINCE Orbeon Forms 2018.1]

  • Orbeon-Liferay-User-Last-Name [SINCE Orbeon Forms 2018.1]

  • Orbeon-Liferay-User-Email

  • Orbeon-Liferay-User-Group-Id

  • Orbeon-Liferay-User-Group-Name

  • Orbeon-Liferay-User-Roles

The second filter, AddOrbeonAuthHeadersFilter, handles either container or header-based auth, and then sets the following headers/properties:

  • Orbeon-Username

  • Orbeon-Group

  • Orbeon-Roles

These in turn are used internally by Orbeon to handle other aspects of authentication/authorization.

Performance tuning

For large pages, we have found that the Liferay strip filter can take an extremely long time to process a response. You can disable that filter in your portal-ext.properties with:

com.liferay.portal.servlet.filters.strip.StripFilter=false

Creating a new landing page for the portlet

By default, the portlet shows a list of Orbeon Forms sample forms and apps.

To change this, you need to:

  1. Modify WEB-INF/resources/page-flow-portlet.xml.

  2. Create a new landing page in XHTML format.

  3. Change the default Orbeon theme so that no custom Orbeon CSS is added.

A simple way do implement this is as follows:

First, replace this line in page-flow-portlet.xml:

<page path="/" model="apps/home/page-flow.xml"/>

with:

<page path="/" view="home.xhtml"/>

Second, create a new file, WEB-INF/resources/home.xhtml, with content such as:

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Form Runner Home</title>
    </head>
    <body>
        <a href="/fr/">Link to the Form Runner home page</a>
        <a href="/fr/acme/form1/summary">Link to summary page of form acme/form1</a>
        <a href="/fr/acme/form2/new">Link to new page of form acme/form2</a>
    </body>
</html>

This is the landing page itself, and it can contain any XHTML you like. Typically would include links to specific Form Runner paths as shown in the example above.

Finally, to change the Orbeon portlet theme to the plain theme, set this property:

<property
  as="xs:anyURI"
  name="oxf.epilogue.theme.embeddable"
  value="oxf:/config/theme-embeddable.xsl"/>

Alternatively, you can use the standard Orbeon-Username and Orbeon-Roles headers. See also .

NOTE: portal-ext.properties is a standard Liferay configuration file you place under the .

Access Control
Liferay Home directory
https://github.com/orbeon/orbeon-forms/blob/master/src/main/resources/config/properties-form-runner.xml
https://github.com/orbeon/orbeon-forms/blob/master/src/main/resources/config/properties-form-runner.xml
Form Runner Liferay Proxy Portlet Guide
Form Runner Embedding
Liferay proxy portlet
Supported Liferay versions
Orbeon Forms welcome page in Liferay