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 4.1.1 + Liferay Faces Bridge Implementation 5.0.0 + Showcase Common 4.0.0 + Liferay Faces Util 3.4.1 + Mojarra 2.2.20