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
  • xxf:get-portlet-mode()
  • xxf:get-remote-user()
  • xxf:get-request-attribute()
  • xxf:get-request-header()
  • xxf:get-request-method()
  • xxf:get-request-parameter()
  • xxf:get-request-context-path()
  • xxf:get-request-path()
  • xxf:get-session-attribute()
  • xxf:get-window-state()
  • xxf:is-user-in-role()
  • xxf:set-request-attribute()
  • xxf:set-session-attribute()
  • xxf:user-ancestor-organizations()
  • xxf:user-group()
  • xxf:user-organizations()
  • xxf:user-roles()
  • xxf:username()
  1. XForms
  2. XPath
  3. Extension functions

HTTP functions

xxf:get-portlet-mode()

[SINCE Orbeon Forms 4.2]

Return the portlet mode.

xxf:get-portlet-mode() as xs:string

If running within a portlet context, return the portlet mode (e.g. view, edit), otherwise return the empty sequence.

NOTE: This function only works with the full portlet. The proxy portlet is not supported.

xxf:get-remote-user()

xxf:get-remote-user() as xs:string?

Returns the username for the current user of the application, if known by the container, for instance because users log in with BASIC of FORM-based authentication.

xxf:get-request-attribute()

xxf:get-request-attribute(
    $name         as xs:string,
    $content-type as xs:string?
) as item()?

The xxf:get-request-attribute() function returns the value of the given request attribute. The attribute may have been previously placed in the request:

  • through Java code

  • or using xxf:set-request-attribute()

A value placed in the request will be available only for the duration of the request, which is the time for a form to load, or for an update to a form to be processed.

If present, the second parameter can specify the text/plain content type. In that case, if a String object is retrieved, it is returned as an xs:string instead of being parsed as XML, which is the default for a String value.

<!-- Get the "document" attribute and use it to replace instance "my-instance" -->
<xf:insert
  ref="instance('my-instance')"
  origin="xxf:get-request-attribute('document')"/>

xxf:get-request-header()

xxf:get-request-header(
    $header-name as xs:string
) as xs:string*

xxf:get-request-header(
    $header-name as xs:string,
    $encoding    as xs:string
) as xs:string*

The xxf:get-request-header() function returns the value(s) of the given request HTTP header.

  • $header-name

    • required header name

    • The case is ignored.

  • $encoding

    • [SINCE Orbeon Forms 2018.2]

    • optional encoding name

    • values

      • ISO-8859-1 (the default): each byte in the header value represents an ISO-8859-1 character

      • UTF-8: each byte in the header value represents a UTF-8 byte

    • NOTE: The only supported standard for header names is ISO-8859-1. But in practice, headers can be encoded with other character encodings. The callee must then know which character encoding is passed.

<!-- Remember the User-Agent header -->
<xf:setvalue
  ref="user-agent"
  value="xxf:get-request-header('User-Agent')"/>

This function can be used even after page initialization, and can be used everywhere other XPath functions are supported.

xxf:get-request-method()

[SINCE Orbeon Forms 4.2]

Return the current HTTP method.

xxf:get-request-method() as xs:string

Return the HTTP method of the current request, such as GET, POST, etc.

xxf:get-request-parameter()

xxf:get-request-parameter(
    $parameter-name as xs:string
) as xs:string*

The xxf:get-request-parameter() function returns the value(s) of the given request parameter.

<!-- Remember the "columns" parameter -->
<xf:setvalue
  ref="columns"
  value="xxf:get-request-parameter('columns')"/>

This function can be used even after page initialization, and can be used everywhere other XPath functions are supported.

NOTE: By default, most if not all servlet containers do not use the UTF-8 encoding but use ISO-8859-1 instead to decode_ URL parameters__. You can configure your servlet container to support UTF-8 instead. See the following resources:_

xxf:get-request-context-path()

[SINCE Orbeon Forms 2018.2.1]

xxf:get-request-context-path() as xs:string

The xxf:get-request-context-path() function returns the context path of the incoming HTTP request.

This function can be used even after page initialization, and can be used everywhere other XPath functions are supported.

xxf:get-request-path()

xxf:get-request-path() as xs:string

The xxf:get-request-path() function returns the path of the incoming HTTP request (without the Java servlet context if any).

<xf:setvalue
  ref="request-path"
  value="xxf:get-request-path()"/>

This function can be used even after page initialization, and can be used everywhere other XPath functions are supported.

xxf:get-session-attribute()

xxf:get-session-attribute(
    $name         as xs:string,
    $content-type as xs:string?
) as item()?

The xxf:get-session-attribute() function returns the value of the given session attribute. The attribute may have been previously placed in the request:

  • through Java code

  • or using xxf:set-session-attribute()

If present, the second parameter can specify the text/plain content type. In that case, if a String object is retrieved, it is returned as an xs:string instead of being parsed as XML, which is the default for a String value.

<!-- Get the "document" attribute and use it to replace instance "my-instance" -->
<xf:insert
  ref="instance('my-instance')"
  origin="xxf:get-session-attribute('document')"/>

xxf:get-window-state()

[SINCE Orbeon Forms 4.2]

Return the portlet window state.

xxf:get-window-state() as xs:string

If running within a portlet context, return the window state (e.g. normal, minimized, maximized), otherwise return the empty sequence.

NOTE: This function only works with the full portlet. The proxy portlet is not supported.

xxf:is-user-in-role()

xxf:is-user-in-role(
    $role as xs:string
) as xs:boolean

Returns true if and only if the container recognizes that the current user of the application has the specified role. Roles will be typically known by the container when users are logged in using either BASIC or FORM-based authentication.

xxf:set-request-attribute()

xxf:set-request-attribute(
    $name  as xs:string,
    $value as item()
)

The xxf:set-request-attribute() function stores the given value as a request attribute.

<!-- Set the "document" attribute into the request -->
<xf:insert
  context="."
  origin="xxf:set-request-attribute('document', instance('my-instance'))"/>

A value placed in the request will be available only for the duration of the request, which is the time for a form to load, or for an update to a form to be processed.

xxf:set-session-attribute()

xxf:set-session-attribute(
    $name  as xs:string,
    $value as item()
)

The xxf:set-session-attribute() function stores the given value as a session attribute.

<!-- Set the "document" attribute into the session -->
<xf:insert
  context="."
  origin="xxf:set-session-attribute('document', instance('my-instance'))"/>

xxf:user-ancestor-organizations()

[SINCE Orbeon Forms 2016.3]

xxf:user-ancestor-organizations(
    $leaf-org as xs:string
) as xs:string*

Return the current user's organizations which are the ancestors of the leaf organization passed if any, from leaf to root. The leaf organization itself is not returned.

Say you have:

Orbeon, Inc.
└── Orbeon California
    └── Orbeon San Mateo

Then:

xxf:user-ancestor-organizations('Orbeon San Mateo')

returns:

'Orbeon California', 'Orbeon, Inc.'

This:

for $org in 'Orbeon San Mateo'
    return ($org, xxf:user-ancestor-organizations($org))

returns:

'Orbeon San Mateo', Orbeon California', 'Orbeon, Inc.'

xxf:user-group()

[SINCE Orbeon Forms 4.9]

xxf:user-group() as xs:string?

xxf:user-organizations()

[SINCE Orbeon Forms 2016.3]

xxf:user-organizations() as xs:string*

Return the current user's leaf organizations if any.

Say you have these organizations:

Orbeon, Inc.
└── Orbeon California
    └── Orbeon San Mateo

California Department of Education
└── Local School District

xxf:user-organizations() returns:

'Orbeon San Mateo', 'Local School District'

xxf:user-roles()

[SINCE Orbeon Forms 4.9]

xxf:user-roles() as xs:string*

xxf:username()

[SINCE Orbeon Forms 4.9]

xxf:username() as xs:string?
PreviousJSON functionsNextForm Runner functions

Last updated 7 months ago

This function only works with the header-driven method. See .

Return the current user's group if available. This function works with container- and header-driven methods. See .

This function only works with the header-driven method. See .

Return the current user's roles if available. This function works with container- and header-driven methods. See .

Return the current user's username if available. This function works with container- and header-driven methods. See .

http://stackoverflow.com/questions/138948/how-to-get-utf-8-working-in-java-webapps
http://www.mail-archive.com/users@tomcat.apache.org/msg48593.html
http://tomcat.apache.org/tomcat-6.0-doc/config/http.html
Form Runner Access Control Setup
Form Runner Access Control Setup
Form Runner Access Control Setup
Form Runner Access Control Setup
Form Runner Access Control Setup