[RomaFramework-dev] New table/tableedit style behaviour
Brought to you by:
lvca
|
From: Luca M. <mol...@gm...> - 2010-11-09 20:36:32
|
Hi all,
Table/tableedit style behaviour is now updated:
1) *table style* --> our RENDER_TABLE/RENDER_TABLEEDIT field -->
*style*attribute in @ViewField annotation goes in the
*class* attribute of *<table>* tag
2) *listable style* --> class contained in the table collection (our table
row) --> * style* attribute in @ViewClass annotation goes the in
*class*attribute of
* <tr>* tag
3) *listable.field style* --> field in listable class (our column \ table
cell) --> * style* attribute in @ViewField annotation goes the in
*class*attribute of
* <td>* tag
if there's no *style* attribute janiculum will use the old behaviour.
it works with runtime modification ( Roma.setField/ClassFeature() ) too.
Example:
@ViewField(render = ViewConstants.RENDER_TABLE, enabled =
AnnotationConstants.FALSE, label = "", style = "*resultsTable*")
protected List<ObjectiveAreaQuestionaireControlElement> results;
@ViewClass( style = "*resultsTableElement*")
class ObjectiveAreaQuestionaireControlElement{
@ViewField( style = "*resultsField1Column*")
String field1
@ViewField( style = "*resultsField2Column*")
String field2
}
that will render a table as:
<table class="*resultsTable*">
...
<tr class="*resultsTableElement*">
<td class="*resultsField1Column*">
</td>
<td class="*resultsField2Column*">
</td>
</tr>
...
</table>
now you have a full customizable table.
Hope you'll find this useful.
Bye
Luca Molino
|