KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > web > ui > common > renderer > data > IRichListRenderer


1 /*
2  * Copyright (C) 2005 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.web.ui.common.renderer.data;
18
19 import java.io.IOException JavaDoc;
20
21 import javax.faces.context.FacesContext;
22
23 import org.alfresco.web.ui.common.component.data.UIColumn;
24 import org.alfresco.web.ui.common.component.data.UIRichList;
25
26 /**
27  * Contract for implementations capable of rendering the columns for a Rich List
28  * component.
29  *
30  * @author kevinr
31  */

32 public interface IRichListRenderer
33 {
34    /**
35     * Callback executed by the RichList component to render any adornments before
36     * the main list rows are rendered. This is generally used to output header items.
37     *
38     * @param context FacesContext
39     * @param richList The parent RichList component
40     * @param columns Array of columns to be shown
41     *
42     * @throws IOException
43     */

44    public void renderListBefore(FacesContext context, UIRichList richList, UIColumn[] columns)
45       throws IOException JavaDoc;
46    
47    /**
48     * Callback executed by the RichList component once per row of data to be rendered.
49     * The bean used as the current row data is provided, but generally rendering of the
50     * column data will be performed by recursively encoding Column child components.
51     *
52     * @param context FacesContext
53     * @param richList The parent RichList component
54     * @param columns Array of columns to be shown
55     * @param row The data bean for the current row
56     *
57     * @throws IOException
58     */

59    public void renderListRow(FacesContext context, UIRichList richList, UIColumn[] columns, Object JavaDoc row)
60       throws IOException JavaDoc;
61    
62    /**
63     * Callback executed by the RichList component to render any adornments after
64     * the main list rows are rendered. This is generally used to output footer items.
65     *
66     * @param context FacesContext
67     * @param richList The parent RichList component
68     * @param columns Array of columns to be shown
69     *
70     * @throws IOException
71     */

72    public void renderListAfter(FacesContext context, UIRichList richList, UIColumn[] columns)
73       throws IOException JavaDoc;
74    
75    /**
76     * Return the unique view mode identifier that this renderer is responsible for.
77     *
78     * @return Unique view mode identifier for this renderer e.g. "icons" or "details"
79     */

80    public String JavaDoc getViewModeID();
81 }
82
Popular Tags