1.0.1.1
Copyright © 2010-2011 portletfaces.org
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.
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:
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. |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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". |
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 |
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 |
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 |
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 |
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 |