Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
jar
Table.jar 6.6 kB 10 06-Nov-2008 22:40 Dirk Frederickx Reset to v0.3
java
Table.java 15.6 kB 11 06-Nov-2008 22:41 Dirk Frederickx Reset to v0.3
gif
anchorLightBG.gif 0.1 kB 1 21-Feb-2006 17:59 206.17.172.5

This page (revision-121) was last changed on 11-Jun-2012 12:01 by 194.168.223.147  

This page was created on 15-Feb-2005 21:09 by DirkFrederickx

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Difference between version and

At line 1 added 2 lines
[{TableOfContents }]
At line 3 changed 6 lines
This Table plugin implements additional table support for JSPWiki pages.
* Multi-line table editing to ease the entry of more complex tables.
* Additional syntax to merge cells horizontally and/or vertically.
(aka colspan and rowspan)
* The auto-numbering feature to automatically insert the row-number
* CSS style formatting for odd/even rows, headers, etc.
This plugin implements additional table formatting for JSPWiki :
* extra syntax to merge cells horizontally and/or vertically (aka colspan and rowspan)
* multi-line table editing to ease the entry of complex table data, such as nested tables
* additional formatting for odd/even rows, headers, etc.
* auto-numbering of rows
* client-side sorting of tables
At line 11 changed 6 lines
!Support for the standard JSPWiki table syntax.
* A new line of text starting with a pipe sign ('|') indicates the start of a new table row.
* Each line corresponds with a horizontal row in a table having one or more table cells.
** A single pipe signs ('|') starts a new table cell.
** A double pipe signs ('||') starts a heading table cell with different formatting.
* End the table with a line which does not start with a pipe sign.
! Usage:
{{{
[{Table <table-parameters>
At line 18 changed 5 lines
!Additional table syntax
* Use '|<' or '||<' to collapse a cell with the previous cell so it spans multiple columns.
* Use '|^' or '||^' to collapse a cell with the cell above so that it spans multiple rows.
* The '#' sign inside a table cell translates to the current row number.\\
You can escape the '#' character with a tilde, like this: ''~#''.
... body with table definition ...
}]
}}}
or use the full syntax when your searchPath was not modified
(see [How to install|9])
{{{
[{brushed.jspwiki.tableplugin.Table <table-parameters>
At line 25 added 45 lines
... body with table definition ...
}]
}}}
! Table Plugin parameters :
* __escape : <string>__ , escape special characters which normally are interpreted
as table syntax.
The first character after the 'escape string' will be passed unprocessed to the output.
This also allows you to call other plugins inside table cells. (see example [3])
\\The default 'escape' string is '~'.
* __rowNumber : <integer>__ , row number starts counting at this value, default = 0
(used in conjunction with '#' syntax)
* __style : <css-style>__ , add formatting to the table
e.g. {{style:'border=2px solid black;'}}
* __dataStyle : <css-style>__ , format all data cells
(prefixed by single pipe signs '|')
* __headerStyle : <css-style>__ , format all header cells
(prefixed by double pipe signs '||')
* __evenRowStyle : <css-style>__ , format the even rows,
e.g. {{evenRowStyle='background: #ffff00;'}}
* __oddRowStyle : <css-style>__ . format the odd rows,
e.g. {{oddRowStyle='color: red;'}}
!Table syntax
The table plugin supports the standard JSPWiki table syntax :
* a new line of text starting with a pipe sign '|' indicates the start of
a new table row.
* every line corresponds with a horizontal row of the table, containing one
or more table cells.
** a single pipe signs ('|') starts a new data cell.
** a double pipe signs ('||') starts a header cell with different formatting.
* end the table with a line which does not start with a pipe sign.
Following syntax is also supported:
* use '|<' or '||<' to collapse a cell with the previous cell so
it __spans multiple columns__.
* use '|^' or '||^' to collapse a cell with the cell above so that
it __spans multiple rows__.
* use '|( <css-style> ) ' to add specific __formatting__ to a cell.
* use '#' inside a table cell to display the current row number.
(__auto row numbering__)
At line 26 changed 3 lines
|Nr |A |< |C |<
|# |a |b |c |d
|# |^ |b |^ |d
|Nr |A |< |C |<
|# |a |b |c |d
|# |^ |b |^ |d
At line 76 added 10 lines
becomes
{{{
+----+-------+-------+
| Nr | A | C |
+----+---+---+---+---+
| 1 | a | b | c | d |
+----+ +---+ +---+
| 2 | | b | | d |
+----+---+---+---+---+
}}}
At line 31 changed one line
!Multi-line table editing
! Multi-line table editing
At line 34 removed 9 lines
* When a line starts with '|' or '||', multi-line table editing is assumed.
** As soon as a new table cell is encountered on the same line, single-line editing is taken,
switching back to the standard wiki syntax.
** However, if the line contains only one cell, it is assumed that the table cell is continued
on the next line.
*** When the next line starts with '|' or '||', a new cell on the same row is started.\\
Otherwise the line is added to the previous table cell
*** All subsequent lines starting with '| or '||' are merged into the same table row.
*** An empty line ends the table row.
At line 92 added 12 lines
* When the line contains only one cell, it is assumed that
the table cell is continued on the next line.
(this is multi-line table editing)
** When the next line starts with '|' or '||', a new cell
on the same row is started.\\
Otherwise the line is added to the previous table cell
** All subsequent lines starting with '| or '||' are merged
into the same table row.
** An empty line ends the table row.
* When more than one table cell is encountered on the same line,
single-line editing is assumed, using the standard wiki syntax.
At line 51 changed one line
Example
Example:
At line 53 changed 2 lines
|| Heading 1
|| Heading 2
|| Heading 1
|| Heading 2
At line 56 changed 3 lines
| ''Gobble'' starts a new row!
* and some more text with wiki markup, all in the same table cell
| Bar
| ''Gobble'' starts a new row!
* and some more text with wiki markup, all in the same table cell
* and the name of this page [{$pagename}~]
| Bar
At line 60 changed 2 lines
| [Main]
| [SandBox]
| [Main]
| [SandBox]
At line 125 added one line
! Table sorting
At line 65 changed one line
!Additional table formatting can be turned on via plugin parameters:
Tables can become sortable, when following conditions apply:
* all cells on the first row should be header cells (double pipe {{||}})
* the other rows should only contain data cells (single pipe {{|}} )
* none of the cells may use colspan or rowspan
* all table rows should count the same amount of cells or columns
At line 67 changed 6 lines
* __style__ : adds table level css-style, e.g. {{style:'border=2px solid black;'}}
* __autonum__ : on|off
* __dataStyle__ : adds css-style to all table data cells (prefixed by single pipe signs '|')
* __headerStyle__ : adds css-style to all table header cells (prefixed by double pipe signs '||')
* __styleEvenRows__ : adds css-style to the even rows, e.g. {{styleEvenRows='background: #ffff00;'}}
* __styleOddRows__ : add css-style to the odd rows, e.g. {{styleOddRows='color: red;'}}
Sort the table by clicing the header cell of a column;
Click again to toggle the sort direction of the column.
At line 74 changed one line
! Usage
You will need to install the excellent
[tablesort.js|http://webfx.eae.net/dhtml/tablesort/tablesort.js] from Erik Arvidsson.
More info and a demo is available on [http://webfx.eae.net/dhtml/tablesort/demo.html].
At line 76 changed 11 lines
{{{
[{Table
...
}]
}}}
or
{{{
[{brushed.jspwiki.tableplugin.Table autonum='off' dataStyle='color:blue;'
...
}]
}}}
----
At line 88 changed one line
!More ideas
!!Installation Instructions [how to install|#9]
At line 90 changed 3 lines
* __sort__ : tbd, make table sortable through some clientside javascript
* __nested tables__ : support for nested tables, i.e. table definitions inside a table cell
* filter style of table plugin, delimitted by 4 pipes
* Copy {{Table.jar}} to the folder {{/WEB-INF/lib/}}
* Modify the plugin searchPath in your {{WEB-INF/jspwiki.properties}} and make
sure there are no spaces between the different entries. Example:
{{{
jspwiki.plugin.searchPath = brushed.jspwiki.tableplugin
}}}
* Restart JSPWiki
Additional stuff when you want to use the table sort functionality
* Copy [tablesort.js|http://webfx.eae.net/dhtml/tablesort/tablesort.js]
to your template directory (e.g. {{templates/default/tablesort.js}} )
* Add following css to the {{jspwiki.css}} located in that same template directory.
\\Note: when sort is on, the header cells located on the first row, are
encapsulated inside a THEAD element. The arrow class is used to display an up or
down arrow indicating the sort direction of the column which was clicked.
At line 94 changed 6 lines
|||| styleEvenRows='color:red;'
| a |b
| c |d
||||
}}}
* ...
.arrow { font-family: webdings;
font-weight: normal; // be careful, dont remove
color: black;
overflow: hidden;
}
.wikitable thead td,
.wikitable th { /*give same formatting to header cells */ }
.sortable thead { cursor:pointer; }
}}}
At line 102 removed one line
At line 172 added 2 lines
!Discussion
At line 191 added 2 lines
----
New version of Table plugin loaded, dd. 29 mar 2005 -- [DF|DirkFrederickx]
Version Date Modified Size Author Changes ... Change note
121 11-Jun-2012 12:01 41.001 kB 194.168.223.147 to previous
« This page (revision-121) was last changed on 11-Jun-2012 12:01 by 194.168.223.147