redirect - Redirect

Redirects the opening of a page to another page depending on a set of rules.

Category

Extension Library

Syntax

<xe:redirect attributes>content</xe:redirect>
Table 1. Essential properties
Property Description
rules Specifies rules for opening the new page:
  • redirectPhoneRule (Redirect Phone Rule) redirects to another page when the browser is on a mobile device.
  • redirectTabletRule (Redirect Tablet Rule) redirects to another page when the browser is on a tablet device.
  • redirectHeaderRule (Redirect Header Rule) redirects to another page when a header matches a specified pattern.
  • redirectCustomRule (Redirect Custom Rule) redirects to another page when the redirect property evaluates to true.
Table 2. All properties
Category Properties
basics binding, id, loaded, rendered, rendererType, rules
styling disableTheme, style, styleClass, themeId

Examples

This example redirects the current page to mobile.xsp#document if the requesting device is a mobile phone or tablet.
<xe:redirect>
	<xe:this.rules>
		<xe:redirectPhoneRule
			url="mobile.xsp" urlHash="document" disableRequestParams="false">
		</xe:redirectPhoneRule>
		<xe:redirectTabletRule
			url="mobile.xsp" urlHash="document" disableRequestParams="false">
		</xe:redirectTabletRule>
	</xe:this.rules>
</xe:redirect>