Column

Document created by resplin Employee on Jun 6, 2015
Version 1Show Document
  • View in full screen mode

Obsolete Pages{{Obsolete}}

The official documentation is at: http://docs.alfresco.com



JSF Component
Back to Component Library


Column


General Description


The column component is a child of a data container component such as the RichList. It should always be contained within such a component. A column is simply a container for other components which are themselves bound to values from the current row supplied when the parent data container iterates over its content. The column has several well known facet components which can be used to specify child components used for specific purposes during the list rendering process:


  • header
The header facet supplies the component that will be displayed if the list renderer chooses to output a header section.

  • large-icon
This facet supplies the component that will be displayed if the list renderer chooses to output a large icon.

  • small-icon
This facet supplies the component that will be displayed if the list renderer chooses to output a small (generally 16x16 pixels) icon.

In addition to these specific facets, the column component should contain at least one other component to be repeatedly output during the iteration of the parent data list e.g. a simple text component bound to a bean field such as:

<h:outputText value='#{r.createdDate}'/>

Tag details


<string>'
  rendered='<boolean>'
  style='<string>'
  styleClass='<string>'
  width='<string>'
  primary='<boolean>'
  actions='<boolean>'
/>

Custom tag attributes


width - the HTML width attribute for the rendered column.

primary - set true to inform the list renderer of the primary column. The primary column is always shown at the start of the list structure even if other columns are hidden due to rendering options.

actions - set true to inform the list renderer of the actions column. The actions column is always shown at the end of the list structure even if other columns are hidden due to rendering options.


Example


The column can be quite complex:

  <a:column primary='true' width='200' styleClass='data-column'>
     <f:facet name='header'>
        <a:sortLink label='Name' value='name' mode='case-insensitive' styleClass='header'/>
     </f:facet>
     <f:facet name='large-icon'>
        <h:graphicImage tooltip='#{r.name}' url='/icons/folder_large.png' />
     </f:facet>
     <f:facet name='small-icon'>
        <a:actionLink value='#{r.name}' image='/icons/folder.gif'
                        actionListener='#{TestList.clickNameLink}' showLink='false'>
           <f:param name='name' value='#{r.name}' />
        </a:actionLink>
     </f:facet>
     <a:actionLink value='#{r.name}' actionListener='#{TestList.clickNameLink}'>
        <f:param name='name' value='#{r.name}' />
     </a:actionLink>
  </a:column>

Or much more simple:

  <a:column>
     <f:facet name='header'>
        <h:outputText value='#{msg.counter}'/>
     </f:facet>
     <h:outputText value='#{r.count}'/>
  </a:column>

Screenshots


See RichList#Screenshots screenshots.

Attachments

    Outcomes