Alloy Showcase

alloy:body

Body is a UIOutput that renders a <body> element for webapps and a <div> for portlets.

Since it extends HtmlBody, it supports all the features of h:body. However, the main benefit of using alloy:body is that scripts specified by <alloy:outputScript target="body" /> as well as JavaScript closures rendered by Liferay Faces Alloy components are rendered as a single <script>...</script> just before the closing </body> tag.

General Usage

The usage of alloy:body in webapps is the same as with portlets. However, the surrounding tag in a webapp is <html> whereas the surrounding tag in a portlet is f:view.

Source Code

Liferay Faces Alloy 3.0.1 + Liferay Faces Bridge Implementation 4.1.0 + Showcase Common 3.0.1 + Liferay Faces Util 3.1.0 + Mojarra 2.2.14