KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > tapestry > contrib > table > components > FormTable


1 // Copyright 2004, 2005 The Apache Software Foundation
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14

15 package org.apache.tapestry.contrib.table.components;
16
17 import org.apache.tapestry.contrib.table.model.ITableModelSource;
18
19 /**
20  * A modified version of the facade component in the Table family.
21  * FormTable allows you to present a sortable and pagable table
22  * within a form by using only this one component.
23  *
24  * [<a HREF="../../../../../../../ComponentReference/contrib.FormTable.html">Component Reference</a>]
25  *
26  * @author mindbridge
27  *
28  */

29 public abstract class FormTable extends Table implements ITableModelSource
30 {
31     // parameters
32
public abstract Object JavaDoc getColumns();
33
34     /**
35      * If the columns are defined via a String, make sure they use
36      * the form-specific column headers.
37      */

38     public Object JavaDoc getFormColumns()
39     {
40         Object JavaDoc objColumns = getColumns();
41         if (objColumns instanceof String JavaDoc)
42             objColumns = "*" + objColumns;
43         return objColumns;
44     }
45
46 }
47
Popular Tags