AlloyFaces

Reference Documentation

1.0.1.1

Legal Notice

Copyright © 2010-2011 by portletfaces.org. This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute it subject to the terms and conditions of the Apache License, Version 2.0.


1. AlloyFaces
1.1. AlloyFaces Overview
1.2. AlloyFaces UIComponent Tags
1.2.1. The aui:button-row tag
1.2.2. The aui:column tag
1.2.3. The aui:field tag
1.2.4. The aui:fieldset tag
1.2.5. The aui:form tag
1.2.6. The aui:layout tag
1.2.7. The aui:list tag
1.2.8. The aui:list tag
1.2.9. The aui:text-box-list tag
1.2.10. The aui:text-box-list-item tag
1.3. AlloyFaces Composite Component Tags
1.3.1. The aui-cc:button tag
1.3.2. The aui-cc:input tag
1.3.3. The aui-cc:message tag
1.3.4. The aui-cc:messages tag
1.3.5. The aui-cc:select tag

Chapter 1. AlloyFaces

1.1. AlloyFaces Overview

AlloyFaces is an open source project that provides JSF 2.x UI components and Facelet composite components for use with Alloy UI, a project sponsored by Liferay. The components offered by AlloyFaces are JSF equivalents of the aui: JSP tag library provided by Liferay Portal. Since Alloy UI is not bound to portlets, AlloyFaces isn't either. But developers would typically use AlloyFaces in conjunction with other JSF component libraries like ICEfaces 2.0 and deploy within Liferay Portal via the PortletFaces Bridge. The project home page can be found at http://www.portletfaces.org/projects/alloyfaces. The following is a list of high level features:

1.2. AlloyFaces UIComponent Tags

AlloyFaces provides the following UIComponent tags as part of its component suite.

Table 1.1. UIComponent Tags

Tag Description
aui:button-row Renders a span element with CSS class name "aui-button-holder" that will be positioned by Alloy UI CSS.
aui:column Renders a div element with CSS class name "aui-column" that will be positioned by Alloy UI CSS.
aui:field Renders a span element with CSS class name "aui-field" that will be positioned by Alloy UI CSS.
aui:fieldset Renders a fieldset element with CSS class name "aui-fieldset" that will be positioned by Alloy UI CSS.
aui:form Renders a form element with CSS class name "aui-form" that will be positioned by Alloy UI CSS.
aui:layout Renders a div element with CSS class name "aui-layout" that will be positioned by Alloy UI CSS.
aui:list Renders a ul element with CSS class name "aui-list" that will be positioned by Alloy UI CSS.
aui:list-item Renders an li element with CSS class name "aui-listitem" that will be positioned by Alloy UI CSS.
aui:text-box-list Renders a div element with CSS class name "aui-textboxlist" that will be positioned by Alloy UI CSS.
aui:text-box-list-item Renders an li element with CSS class name "aui-textboxlistentry" that will be positioned by Alloy UI CSS.

1.2.1. The aui:button-row tag

The aui:button-row tag renders a span element with CSS class name "aui-button-holder" that will be positioned by Alloy UI CSS.

Table 1.2. Attributes

Attribute Type Description Required
id String The identifier of the component false
cssClass String The name of a CSS class that is to be rendered within the class attribute. false
rendered Boolean Boolean flag indicating whether or not this component is to be rendered during the RENDER_RESPONSE phase of the JSF lifecycle. The default value is “true”. false
styleClass String The name of a CSS class that is to be rendered within the class attribute. false

1.2.2. The aui:column tag

The aui:column tag renders a div element with CSS class name "aui-column" that will be positioned by Alloy UI CSS.

Table 1.3. Attributes

Attribute Type Description Required
id String The identifier of the component false
columnWidth String The width of the column. false
cssClass String The name of a CSS class that is to be rendered within the class attribute. false
first Boolean Boolean flag indicating whether or not this is the first column. The default value is “false”. false
last Boolean Boolean flag indicating whether or not this is the last column. The default value is “false”. false
rendered Boolean Boolean flag indicating whether or not this component is to be rendered during the RENDER_RESPONSE phase of the JSF lifecycle. The default value is “true”. false
styleClass String The name of a CSS class that is to be rendered within the class attribute. false

1.2.3. The aui:field tag

The aui:field tag renders a span element with CSS class name "aui-field" that will be positioned by Alloy UI CSS.

Table 1.4. Attributes

Attribute Type Description Required
id String The identifier of the component false
cssClass String The name of a CSS class that is to be rendered within the class attribute. false
inlineLabel String The position of the label. Valid values are: left, right. false
label String The text value for the rendered label. false
rendered Boolean Boolean flag indicating whether or not this component is to be rendered during the RENDER_RESPONSE phase of the JSF lifecycle. The default value is “true”. false
styleClass String The name of a CSS class that is to be rendered within the class attribute. false
type String The type of field. Valid values are: checkbox, boolean, menu, select. false

1.2.4. The aui:fieldset tag

The aui:fieldset tag renders a fieldset element with CSS class name "aui-fieldset" that will be positioned by Alloy UI CSS.

Table 1.5. Attributes

Attribute Type Description Required
id String The identifier of the component false
column Boolean Boolean flag indicating whether or not this is a column. The default value is “false”. false
cssClass String The name of a CSS class that is to be rendered within the class attribute. false
label String The text value for the rendered label. false
rendered Boolean Boolean flag indicating whether or not this component is to be rendered during the RENDER_RESPONSE phase of the JSF lifecycle. The default value is “true”. false
styleClass String The name of a CSS class that is to be rendered within the class attribute. false

1.2.5. The aui:form tag

The aui:form tag renders a form element with CSS class name "aui-form" that will be positioned by Alloy UI CSS.

Table 1.6. Attributes

Attribute Type Description Required
id String The identifier of the component false
rendered Boolean Boolean flag indicating whether or not this component is to be rendered during the RENDER_RESPONSE phase of the JSF lifecycle. The default value is “true”. false
styleClass String The name of a CSS class that is to be rendered within the class attribute. false

1.2.6. The aui:layout tag

The aui:layout tag renders a div element with CSS class name "aui-layout" that will be positioned by Alloy UI CSS.

Table 1.7. Attributes

Attribute Type Description Required
id String The identifier of the component false
cssClass String The name of a CSS class that is to be rendered within the class attribute. false
rendered Boolean Boolean flag indicating whether or not this component is to be rendered during the RENDER_RESPONSE phase of the JSF lifecycle. The default value is “true”. false
styleClass String The name of a CSS class that is to be rendered within the class attribute. false

1.2.7. The aui:list tag

The aui:list tag renders a ul element with CSS class name "aui-list" that will be positioned by Alloy UI CSS.

Table 1.8. Attributes

Attribute Type Description Required
id String The identifier of the component false
cssClass String The name of a CSS class that is to be rendered within the class attribute. false
rendered Boolean Boolean flag indicating whether or not this component is to be rendered during the RENDER_RESPONSE phase of the JSF lifecycle. The default value is “true”. false
styleClass String The name of a CSS class that is to be rendered within the class attribute. false

1.2.8. The aui:list tag

The aui:list tag renders an li element with CSS class name "aui-listitem" that will be positioned by Alloy UI CSS.

Table 1.9. Attributes

Attribute Type Description Required
id String The identifier of the component false
cssClass String The name of a CSS class that is to be rendered within the class attribute. false
rendered Boolean Boolean flag indicating whether or not this component is to be rendered during the RENDER_RESPONSE phase of the JSF lifecycle. The default value is “true”. false
styleClass String The name of a CSS class that is to be rendered within the class attribute. false

1.2.9. The aui:text-box-list tag

The aui:text-box-list tag renders a div element with CSS class name "aui-textboxlist" that will be positioned by Alloy UI CSS.

Table 1.10. Attributes

Attribute Type Description Required
id String The identifier of the component false
cssClass String The name of a CSS class that is to be rendered within the class attribute. false
rendered Boolean Boolean flag indicating whether or not this component is to be rendered during the RENDER_RESPONSE phase of the JSF lifecycle. The default value is “true”. false
styleClass String The name of a CSS class that is to be rendered within the class attribute. false

1.2.10. The aui:text-box-list-item tag

The aui:text-box-list-item tag renders an li element with CSS class name "aui-textboxlistentry" that will be positioned by Alloy UI CSS.

Table 1.11. Attributes

Attribute Type Description Required
id String The identifier of the component false
cssClass String The name of a CSS class that is to be rendered within the class attribute. false
rendered Boolean Boolean flag indicating whether or not this component is to be rendered during the RENDER_RESPONSE phase of the JSF lifecycle. The default value is “true”. false
styleClass String The name of a CSS class that is to be rendered within the class attribute. false

1.3. AlloyFaces Composite Component Tags

AlloyFaces provides the following Facelet Composite Component tags as part of its component suite.

Table 1.12. Facelet Composite Component Tags

Tag Description
aui-cc:button Renders a div with CSS class name "aui-button" and a child input element with CSS class name "aui-button-input".
aui-cc:input Renders either an input (type=text), textarea, input (type="secret"), input (type="checkbox"), or input (type="radio") with appropriate Alloy UI CSS class names, according to the value of the type attribute.
aui-cc:message Encapsulates a standard JSF h:message tag with JSR 286 (Portlet 2.0) CSS class names.
aui-cc:messages Encapsulates a standard JSF h:messages tag with JSR 286 (Portlet 2.0) CSS class names.
aui-cc:select Encapsulates a standard JSF h:selectOneMenu tag with CSS class name "aui-field-input aui-field-input-select aui-field-input-menu".

1.3.1. The aui-cc:button tag

The aui-cc:button renders a div with CSS class name "aui-button" and a child input element with CSS class name "aui-button-input".

Table 1.13. Attributes

Attribute Type Description Required
id String The identifier of the component false
cssClass String The name of a CSS class that is to be rendered within the class attribute. false
immediate Boolean Boolean flag indicating whether or not actions and action listeners are to be executed during the APPLY_REQUEST_VALUES phase of the JSF lifecycle. The default value is “false”. false
label String The text value for the rendered label of the button. false
rendered Boolean Boolean flag indicating whether or not this component is to be rendered during the RENDER_RESPONSE phase of the JSF lifecycle. The default value is “true”. false
styleClass String The name of a CSS class that is to be rendered within the class attribute. false

1.3.2. The aui-cc:input tag

The aui-cc:input renders either an input (type=text), textarea, input (type="secret"), input (type="checkbox"), or input (type="radio") with appropriate Alloy UI CSS class names, according to the value of the type attribute.

Table 1.14. Attributes

Attribute Type Description Required
id String The identifier of the component false
cssClass String The name of a CSS class that is to be rendered within the class attribute. false
cols String The number of columns for the rendered textarea. false
disabled Boolean This is an HTML pass-thru type of attribute. The default value is “false”. false
inlineLabel String The position of the label. Valid values are: left, right. false
inlineMessage String Boolean flag indicating whether or not there should be an inline h:message tag included. The default value is “false”. false
label String The text value for the rendered label of the button. false
onblur String This is an HTML pass-thru type of attribute. false
onchange String This is an HTML pass-thru type of attribute. false
readonly Boolean This is an HTML pass-thru type of attribute. The default value is “false”. false
required Boolean Boolean flag indicating whether or not it is required for the user to supply a value for this component. The default value is “false”. false
rendered Boolean Boolean flag indicating whether or not this component is to be rendered during the RENDER_RESPONSE phase of the JSF lifecycle. The default value is “true”. false
rows String The number of rows for the rendered textarea. false
size String The size/width of the rendered input text box. false
style String This is an HTML pass-thru type of attribute. false
styleClass String The name of a CSS class that is to be rendered within the class attribute. false
type String The type of input field. Valid values are: text, textarea, password, checkbox, boolean. false

1.3.3. The aui-cc:message tag

The aui-cc:message encapsulates a standard JSF h:message tag with JSR 286 (Portlet 2.0) CSS class names.

Table 1.15. Attributes

Attribute Type Description Required
id String The identifier of the component false
for String The id of the component for which this message is associated. false
rendered Boolean Boolean flag indicating whether or not this component is to be rendered during the RENDER_RESPONSE phase of the JSF lifecycle. The default value is “true”. false
styleClass String The name of a CSS class that is to be rendered within the class attribute. false
style String This is an HTML pass-thru type of attribute. false

1.3.4. The aui-cc:messages tag

The aui-cc:messages encapsulates a standard JSF h:messages tag with JSR 286 (Portlet 2.0) CSS class names.

Table 1.16. Attributes

Attribute Type Description Required
id String The identifier of the component false
globalOnly Boolean Boolean flag indicating whether or not this component is to render only the global messages, meaning, messages that are not associated with an individual component. The default value is “false”. false
layout String The layout of the list of messages. Valid values are: list, table. false
rendered Boolean Boolean flag indicating whether or not this component is to be rendered during the RENDER_RESPONSE phase of the JSF lifecycle. The default value is “true”. false
styleClass String The name of a CSS class that is to be rendered within the class attribute. false
style String This is an HTML pass-thru type of attribute. false

1.3.5. The aui-cc:select tag

The aui-cc:select encapsulates a standard JSF h:selectOneMenu tag with CSS class name "aui-field-input aui-field-input-select aui-field-input-menu". NOTE that sometimes the JSF implementation performs more reliably if a simple h:selectOneMenu is used instead of this tag.

Table 1.17. Attributes

Attribute Type Description Required
id String The identifier of the component false
inlineMessage String Boolean flag indicating whether or not there should be an inline h:message tag included. The default value is “false”. false
label String The text value for the rendered label. false
rendered Boolean Boolean flag indicating whether or not this component is to be rendered during the RENDER_RESPONSE phase of the JSF lifecycle. The default value is “true”. false
value java.util.List The list of items that are to appear in the drop down list. false