|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.click.control.Column org.apache.click.extras.control.FieldColumn
public class FieldColumn
Provides a FieldColumn for rendering table data cells.
Field
instance.
If the FieldColumn is contained in a standard Table it will render the all
the table column data cells using its single field instance.
If the FieldColumn is contained in a FormTable it will both render the column
data cells and process any posted column data values using the field instance.
Changes to the tables data objects will be available in the Table rowList
property.
Please see the FormTable
Javadoc for usage examples.
Column
,
FormTable
,
Serialized FormField Summary | |
---|---|
protected Field |
field
The columns field to process and render. |
Fields inherited from class org.apache.click.control.Column |
---|
attributes, autolink, dataClass, dataStyles, decorator, escapeHtml, format, headerClass, headerStyles, headerTitle, maxLength, messageFormat, methodCache, name, renderId, sortable, table, titleProperty, width |
Constructor Summary | |
---|---|
FieldColumn()
Create a FieldColumn with no name or field defined. |
|
FieldColumn(String name)
Create a table field column with the given property name. |
|
FieldColumn(String name,
Field field)
Create a table field column with the given property name and field. |
|
FieldColumn(String name,
String title)
Create a table field column with the given property name and header title. |
|
FieldColumn(String name,
String title,
Field field)
Create a table field column with the given property name, header title and field. |
Method Summary | |
---|---|
Field |
getField()
Return the column editor field. |
protected void |
renderTableDataContent(Object row,
HtmlStringBuffer buffer,
Context context,
int rowIndex)
Render the content within the column table data <td> element. |
void |
setField(Field field)
Set the column editor field. |
void |
setProperty(Object row,
String propertyName,
Object value)
Set a row value based on the given property name and value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Field field
Constructor Detail |
---|
public FieldColumn(String name)
name
- the name of the property to renderpublic FieldColumn(String name, Field field)
name
- the name of the property to renderfield
- the field to process and renderpublic FieldColumn(String name, String title)
name
- the name of the property to rendertitle
- the column header title to renderpublic FieldColumn(String name, String title, Field field)
name
- the name of the property to rendertitle
- the column header title to renderfield
- the field to process and renderpublic FieldColumn()
Method Detail |
---|
public Field getField()
public void setField(Field field)
field
- the column editor fieldpublic void setProperty(Object row, String propertyName, Object value)
getField()
.
row
- the row object to obtain the property frompropertyName
- the name of the propertyvalue
- the row object property value
RuntimeException
- if an error occurred obtaining the propertyprotected void renderTableDataContent(Object row, HtmlStringBuffer buffer, Context context, int rowIndex)
renderTableDataContent
in class Column
row
- the row object to renderbuffer
- the string buffer to render tocontext
- the request contextrowIndex
- the index of the current row within the parent table
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |