Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-1781

Utilize @FacesComponent and @FacesRenderer annotations rather than declaring components in XML descriptors

    Description

    In an effort to minimize the amount of text in XML descriptors like faces-config.xml, it is necessary to utilize the @FacesComponent and @FacesRenderer annotations.

    Example of @FacesComponent:

    @FacesComponent(value="com.liferay.faces.alloy.component.AUIColumn")
    

    Example of @FacesRenderer:

    @FacesRenderer(
            componentFamily = "javax.faces.Panel", rendererType = "com.liferay.faces.alloy.renderkit.ColumnRenderer",
            renderKitId = "HTML_BASIC"
    )
    

    If these annotations are used, this corresponding code can be safely removed from faces-config.xml:

    <component>
    	<component-type>com.liferay.faces.alloy.AUIColumn</component-type>
    	<component-class>com.liferay.faces.alloy.component.AUIColumn</component-class>
    </component>
    
            ...
    
    <renderer>
            <component-family>javax.faces.Panel</component-family>
    	<renderer-type>com.liferay.faces.alloy.renderkit.ColumnRenderer</renderer-type>
    	<renderer-class>com.liferay.faces.alloy.renderkit.ColumnRenderer</renderer-class>
    </renderer>
    

      Attachments

        Activity

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Packages

              Version Package
              liferay-faces-2.1.6-ga7
              liferay-faces-2.2.6-ga7
              liferay-faces-3.0.6-legacy-ga7
              liferay-faces-3.0.6-ga7
              liferay-faces-3.1.6-ga7
              liferay-faces-3.2.6-ga7
              liferay-faces-4.2.6-ga7