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
||Col ||Col2 ||< ||C ||<
|Nr |A |< |C |<
At line 12 added 2 lines
The usage description is also available in German, see [TablePlugin Benutzung].\\
Eine deutsche Benutzungsbeschreibung siehe auf [TablePlugin Benutzung].
At line 15 added one line
At line 127 changed one line
* v0.3 : removed escape parameter: JSPWiki (v2.4.x) now supports nested plugin calls / jun 06
* v0.3 : removed escape parameter: JSPWiki (v2.4.x) now supports nested plugin calls / jun 06
%%strike
* v0.4 : streamlined logic for cell/row processing in order to better support multi-line cells. --[JM|mailto:jmckinney63@gmail.com]
/%
At line 129 removed one line
At line 267 added 92 lines
!Example 4: table with multi-line editing (New Version/Test table)
{{{
[{Table oddRowStyle='background:#f0f0f0;' rowNumber='1'
|| a || d || c || d
|#|
%%tip-MoreInfo
Here is some more info about tomatoes
[{Image src='tomato.jpg' width='154' align='center' }]
/%
|<|
%%tip-MoreInfo
Here is some more info about tomatoes
[{Image src='tomato.jpg' width='154' align='center' }]
/%
|# | b | [This is a test|test] | d
|#|
*This is long text
** With a list of things
** to do
| e | [{LocalLink display='Test Header'}]
|#|
*This is another long text
** With another list of things
** to do
| e | f
|Code|
~{~{~{
*This is another long text
** With another list of things
** to do
~}~}~}
| e | f
}]
!!Test Header
Some text under the header
}}}
[{Table oddRowStyle='background:#f0f0f0;' rowNumber='1'
|| a || d || c || d
|#|
%%tip-MoreInfo
Here is some more info about tomatoes
[{Image src='tomato.jpg' width='154' align='center' }]
/%
|<|
%%tip-MoreInfo
Here is some more info about tomatoes
[{Image src='tomato.jpg' width='154' align='center' }]
/%
|# | b | [This is a test|test] | d
|#|
*This is long text
** With a list of things
** to do
| e | [{LocalLink display='Test Header'}]
|#|
*This is another long text
** With another list of things
** to do
| e | f
|Code|
{{{
*This is another long text
** With another list of things
** to do
}}}
| e | f
}]
!!Test Header
Some text under the header
At line 364 added 9 lines
%%information
Please use this tab for any discussion, reporting of bugs (if possible with suggested fixes), new ideas, contributions etc.
Your contributions are very much appreciated. I will continue to update this plugin, and possibly incorporate your suggestions.
However, please do NOT update the plugin yourself. Cause that way reported bugs will be harder to fix.
-[DF|DirkFrederickx]
/%
At line 503 changed one line
*The TablePlugin stil works on v2.4.x. However, in case you have nested plugin calls in your table, you need to escape some chars. Because of the different behaviour of JSPWIki (it actually now supports nested plugins ! ) you need a bit to anticipate its behaviour. You need to escape BOTH the starting [[{ as well as the closing }] plugin brackets. (in the past, it was sufficient to escape the closing brackets only) --[DF|DirkFrederickx]
*The TablePlugin still works on v2.4.x. However, in case you have nested plugin calls in your table, you need to escape some chars. Because of the different behaviour of JSPWIki (it actually now supports nested plugins ! ) you need a bit to anticipate its behaviour. You need to escape BOTH the starting [[{ as well as the closing }] plugin brackets. (in the past, it was sufficient to escape the closing brackets only) --[DF|DirkFrederickx]
At line 614 added 3 lines
----
Hi,
How can I write a pipe character in a cell without making it mark a new cell or writing a # without getting the line number? For example a cell with the content (user|session). As I understand from the change log there was a escape feature that has been removed. Is there a new way to escape characters?
At line 618 added 96 lines
/P
;: Use the tilde to escape the pipe or #. The tilde ~ is the general escape char in JSPWiki. --[DF|DirkFrederickx]
I can get it to work. I tried the ~# out side the table plugin and that worked, but inside the table the tilde is ignored as escape char. See my code below. Any ideas?
{{{
[{Table
| tilde with hash | ~# |
| tilde with pipe | ~| |
}]
}}}
/P
-- This is a bug. Please test latest JAR. --[DF|DirkFrederickx] 14 May 2007
----
----
__Nested tables giving Problems__ - [GregP]
__This works:__
{{{
[{Table style='border:3px solid #cccccc;'
|| a || b || c
| Time: [{CurrentTimePlugin format='hh:mm:ss'}]
| [{Table
| Nested table | Nested table
| Nested table | Nested table
}]
| Date: [{CurrentTimePlugin format='dd:MMM:yyyy'}]
| Time: [{CurrentTimePlugin format='hh:mm:ss'}]
| [{Table
| Nested table | Nested table
| Nested table | Nested table
}]
| Date: [{CurrentTimePlugin format='dd:MMM:yyyy'}]
}]
}}}
__This Doesn't (With a link in a column)__
{{{
[{Table style='border:3px solid #cccccc;'
|| a || b || c
| Time: [{CurrentTimePlugin format='hh:mm:ss'}]
| [{Table
| Nested table | Nested table
| Nested table | Nested table
}]
| Date: [{CurrentTimePlugin format='dd:MMM:yyyy'}]
| Time: [{CurrentTimePlugin format='hh:mm:ss'}]
| [{Table
| [Nested table|CamelCase] | Nested table
| Nested table | Nested table
}]
| Date: [{CurrentTimePlugin format='dd:MMM:yyyy'}]
}]
}}}
__But is work with a nested zebra table?? - Strange__
{{{
[{Table style='border:3px solid #cccccc;'
|| a || b || c
| Time: [{CurrentTimePlugin format='hh:mm:ss'}]
| [{Table
| Nested table | Nested table
| Nested table | Nested table
}]
| Date: [{CurrentTimePlugin format='dd:MMM:yyyy'}]
| Time: [{CurrentTimePlugin format='hh:mm:ss'}]
| %%zebra-table
| [Nested table|CamelCase] | Nested table
| Nested table | Nested table
At line 508 changed one line
%%
| Date: [{CurrentTimePlugin format='dd:MMM:yyyy'}]
At line 717 added 2 lines
}]
}}}
At line 720 added 6 lines
Any ideas. Thanks for a great plugin - GP 07/06/30
;: Argggh - you found a new bug in a stable plugin ;-) This error occurs when you combine a nested plugin with a wiki-link in its body. It would also occur with a tripple nesting for instance.
Actually, the closing ] is mistakenly seen as the closing }]. Therefore, a part of the body of the nested plugin is just parsed as normal table plugin body, which screws up the rest o the processing. Bugfix upcoming - when time permits. Great catch!--[DF|DirkFrederickx]
;: Fixed in latest version (v8) of the plugin, dd 6 July 07, --[DF|DirkFrederickx]
At line 727 added one line
----
At line 729 added 47 lines
__Mutli-Line, Single-line mixing problematic__
Hi, why wont the following work?
{{{
[{Table
|| a || d || c || d || long text || e || f || long text2 || g
| a | b | c | d
| This is long text\\
* With a list of things
** to do
| e | f
| This is some more long text\\
* With a list of things
** to do
| g
| a | b | c | d
| This is long text\\
Some more long text\\
Yet more\\
| e | f
| This is long text\\
Some more long text\\
Yet more\\
| g
}]
}}}
There seems to be an either or scenario here?
I would expect it to iterate over the pipes until it find a blank line and each pipe is equal to a column?
I need this to de-clutter my tables
Please help!!! I love this plugin but this and the previous issues are holding me back
Thanks GregP
;: GregP, when starting a new row, you should either choose for the single line syntax (standard wiki) or multi-line syntax (table plugin). You can't mix up both syntaxes on a single row. --[DF|DirkFrederickx]
----
At line 828 added 2 lines
At line 839 added 275 lines
;:Works like a CHAMP! Gotta love the open-source community!
----
I use InsertAttachment to add a table to one of my wiki pages. The attachment is just a text file with the regular "|" table syntax and it works fine.
I tried to "nest" the call to the InsertAttachment plugin inside a call TablePlugin the result is empty. Is the support for nested plugins only on the cell level or should it also work for the entired table?
Thanks,\\
-- [NascifAbousalhNeto] 26-Jun-2006
----
Is there a place where older versions (e.g., version 002) are kept? I'm using
JSPWiki 2.2.33 and need to use the Image plugin inside the Table plugin.
Thanks,\\
[BillCutshall] 18-July-2006
Oops, answered my own question. They're archived on the wiki. Click on the "paper clip"!
----
I am wanting to place an image inside a table cell, however, this is resulting in a grey line along the
left side of the image. Also, this is forcing the table row to be taller than I would like it to be. Has anyone else
had this happen and found a way to resolve it? I would guess it has something to do with the fact that imageplugin is
creating a table within a table....but the border is set to '0' so I don't see why there would be the line on the left.
Thanks,\\BuildMonkey August 2, 2006
----
Hi there,
if I understood it right, the following three syntaxes should produce the same result:
{{{
[{Table
|#
|bla
|#
|bla
}]
}}}
{{{
[{Table
|#|bla
|#|bla
}]
}}}
{{{
[{Table
|#
|bla
|#|bla
}]
}}}
But, in example 1 and 3, you can see that the {{#}} isn&rsquo;t interpreted correctly when using the &ldquo;one line per column&rdquo; syntax. The number just won&rsquo;t show up. But nevertheless, the number is increased, as you can see in the third example. Is this a bug?
--[Candid Dauth], 14-Aug-2006
;:I cant reproduce your problem. In my wiki, the 3 cases render exactly the same, with numbering correctly inserted. --[DF|DirkFrederickx]
;:Dirk, I can confirm the findings of Candid Dauth. It seems the plugin needs an extra character on all but the last lines that define a row (using multiple line editing) - adding a blank solves the problem... I noticed the problem while editing a simple table with headers like AA, BB, CC and seeing just single characters A and B displayed! Could it be a CR/LF problem? -- [Wouter]
----
Hi there,
How can I specify that a column is only 200px or 20% (as an example) wide? Or even set the table width to be something fixed? My problem is that a cell that contains a string that is long, it stretches the column clear across the page.
Thoughts?
Matt
;:Currently, the plugin has no support for Column styles. The only way to do this is to add a style to each of the cells in that particular column. --[DF|DirkFrederickx] For example:
{{{
| a |(width:200px;) b
| C |(width:200px;) D
}}}
Thanks for this plugin. it works fine when I created table from the wiki editor. But my use case is that I will generate the wiki text from the shell script as page.txt. I copy this file in to wiki data dir, while trying to access from wiki, it fails to display with following exception in the wiki log
{{{
Plugin failed while executing:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:886)
at java.lang.StringBuffer.substring(StringBuffer.java:417)
at brushed.jspwiki.tableplugin.Table$TableCell.registerEnd(Table.java:500)
at brushed.jspwiki.tableplugin.Table.processTable(Table.java:220)
at brushed.jspwiki.tableplugin.Table.execute(Table.java:94)
at com.ecyrd.jspwiki.plugin.PluginManager.execute(PluginManager.java:380)
at com.ecyrd.jspwiki.parser.PluginContent.getText(PluginContent.java:88)
at org.jdom.output.XMLOutputter.printTextRange(XMLOutputter.java:1054)
at org.jdom.output.XMLOutputter.printContentRange(XMLOutputter.java:989)
at org.jdom.output.XMLOutputter.outputElementContent(XMLOutputter.java:445)
at com.ecyrd.jspwiki.render.XHTMLRenderer.getString(XHTMLRenderer.java:61)
at com.ecyrd.jspwiki.render.RenderingManager.getHTML(RenderingManager.java:254)
at com.ecyrd.jspwiki.render.RenderingManager.getHTML(RenderingManager.java:295)
at com.ecyrd.jspwiki.WikiEngine.textToHTML(WikiEngine.java:1373)
at com.ecyrd.jspwiki.WikiEngine.getHTML(WikiEngine.java:1319)
at com.ecyrd.jspwiki.tags.InsertPageTag.doWikiStartTag(InsertPageTag.java:117)
at com.ecyrd.jspwiki.tags.WikiTagBase.doStartTag(WikiTagBase.java:85)
at org.apache.jsp.templates.sunweb.PageContent_jsp._jspx_meth_wiki_InsertPage_0(
PageContent_jsp.java:1080)
at org.apache.jsp.templates.sunweb.PageContent_jsp._jspService(PageContent_jsp.j
ava:255)
}}}
I am using 2.4.87, if I edit this page in the wiki and save it, then it works fine
any idea, what is missing?
TIA
;:An approach that works for me (although a little more complicated) is to have your script use the web interface. Instead of pushing the file to the data repository, attach it to a page in the wiki and then use te InsertAttachment plugin in your target page. I use the Ruby Mechanize library to automate the iteration with the wiki. -- NascifAbousalhNeto, 2-Feb-2007
----
!Problems with Link References inside Table Plugin Tables
Table Plugin with JSPWiki 2.2.33
I started using the Table Plugin and noticed that links to wiki inside these tables pages do not know their referring pages (ie referenced by became nobody). Having a look at the source, it looks like a weakness in the plugin framework in that plugins are asked to generate HTML and can't provide other info (such as link references). Am I missing something?
I did find a workaround which required changes to the plugin Table.java:
{{{
m_result.append( m_engine.textToHTML( m_context,
aBody.substring( cell.start,
cell.end ) ) );
}}}
becomes
{{{
m_result.append( m_engine.textToHTML( m_context,
aBody.substring( cell.start,
cell.end ),
(StringTransmutator)m_context.getVariable("translator.localLinkHook"),
(StringTransmutator)m_context.getVariable("translator.localLinkHook")));
}}}
and to WikiEngine.java (3 lines added):
{{{
private String textToHTML( WikiContext context,
String pagedata,
StringTransmutator localLinkHook,
StringTransmutator extLinkHook,
StringTransmutator attLinkHook,
boolean parseAccessRules )
{
context.setVariable("translator.localLinkHook", localLinkHook);
context.setVariable("translator.extLinkHook", extLinkHook);
context.setVariable("translator.attLinkHook", attLinkHook);
...
}}}
- Paulj 14/Sept/2007
;: The jspwiki plugin framework has currently no api to declare internal plugin text as ordinary parse-able wiki markup. So this shortcoming applies to all jspwiki plugins. Plse log your suggestion as improvement request on jspwiki bugzilla, cause IMHO this is really a useful feature. --[DF|DirkFrederickx]
----
I'm having issues with the Table plugin on JSPWiki version 2.6.3. I made sure my plugin.searchPath looks like:
jspwiki.plugin.searchPath = brushed.jspwiki.tableplugin within the jspwiki.properties file. It's unable to find the plugin when referenced. What could be the issue? Am I missing something?
-Rick Mattier [2008-07-09]
;: Make sure you have no hidden blanks on that line. --[DF|DirkFrederickx]
----
I'm having the same issues described for the 2.6.3 version in the JSPWiki v2.6.4... and as I can see in this wiki (which is JSPWiki v2.8.0-beta-7) it doesn't work either (as you can see in the ''Examples tab'') :(
-Raúl Herranz (25 - sept - 2008)
%%quote
It is normal that this plugin doesn't work on jspwiki.org cause it is not part of the standard jspwiki installation. Please check out whether the plugin is properly installed: copy the jar into the /lib directory, adjust the plugin-path in the properties file. --[DF|DirkFrederickx], 28 Sep 08
/%
----
The attachment Table.jar doesn't contain any class files.
--
Carl Hagenmaier
--AnonymousCoward, 02-Oct-2008 22:33
----
I dropped the latest Table.java into my JSPWiki 2.6.4 installation and had some issues with CSS formatting in tables. After digging through the source I tracked down the culprit.
It looks like the {{registerStart()}} method sets {{cssBracket}} equal to 1 when the opening brace is detected. It does this by checking the NEXT character in the buffer. When the next character is processed (which is the opening brace for the css markup), {{cssBracket}} is then incremented again to a value of 2. Because of this, the rest of the markup for that table row is considered css markup and is simply displayed on the screen. If you remove/comment the line (listed below), the css markup works as expected and the table is rendered properly.
{{{
if (aCursor + 1 < sb.length())
{
char c = sb.charAt(aCursor + 1);
if (c == '<') {
colspan = true;
aCursor++;
}
else if (c == '^') {
rowspan = true;
aCursor++;
}
else if (c == '(') {
cssStyle = true;
cssBracket = 1; // this statement needs to be removed
aCursor++;
}
}
}}}
-- [Joseph Hobbs|jhobbs] November 4th, 2008
;:The cssBracket variable counts the number of open (brackets) to find the end of the css definition. So putting it at 1 in this part of the code is ok. At least, this is working properly at my installation. Could you please share the markup which is given you an error. --[DF|DirkFrederickx]
In this case, I pulled the markup directly off the examples tab of this Wiki page. Example 1 is the first place I noticed the issue. After tossing in some debug statements I came across the scenario. This is what I see
*The plugin detects a pipe and fires registerStart.
*Register start checks current position + 1 and detects open parenthesis and sets cssBracket to 1
*when next character is processed, it's the opening parenthesis registerStart just looked at, but fires handleCss anyways.
*handleCss increments cssBracket by 1, setting it to 2.
*eventually the closing parenthesis is detected, but the sum of decrements gets cssBracket down to 1 only. Therefore the rest of the content is identified as css and not table markup.
I do see where the code increments aCursor. If this increment would apply to the original position variable (i) then the code would work fine because the parenthesis would not be processed causing the increment. But since it's being passed by value, the increment doesn't change the original integer. It looks like the new integer is being returned to the calling method as well, but it's not being assigned to i. Maybe this was the original intention?
Not sure if the J2EE container has any influence here... I'm running in WebSphere Application Server 6.1.0.15 at the moment.
-- [Joseph Hobbs|jhobbs] 11/5/2008
;:Can you please test with v8 of the TablePlugin.jar. I noticed that the latest version of this plugin has been changed; the original version seems not to have this bug. --[DF|DirkFrederickx]
I took a look at v8 of Table.java and it looks like it's setting the counter {{i}} to the returned cursor value, which would avoid the issue of processing the open parenthesis twice. You can see this on lines 141, 234, and 245 of the source. With v9 of Table.java, it looks like the {{i =}} have been removed (lines 218 and 250). Due to this, the master counter {{i}} doesn't know it has been incremented.
-- [Joseph Hobbs|jhobbs] 11/6/2008
I reviewed the differences between Dirk's v8 and John's v9 in more detail. It looks like v9 was completely refactored (code style and all) which makes it extremely difficult to determine exactly what funtional changes were made. When modifying someone elses code, please practice a little code etiquette. Don't refactor someones code because it doesn't match your style. Work within the confines of their style and make only necessary changes. If code does need to be refactored, don't add functionality at the same time!
v9 has also introduced at least one bug regarding css handling where the updated counter isn't being assigned back to {{i}}. I don't think v9 is ready for prime-time yet. I recommend v9 be removed from the site and revert back to v8 as the latest. The posted Table.java plugin should be a proven copy that has been fully tested.
With that said, I think the functional changes in v9 are valuable and should be revisited in a more controlled edit.
-- [Joseph Hobbs|jhobbs] 11/6/2008
I've found the problem with %~%table-filter combined with TablePlugin. May be the problem is in %~%table-filter style, I'm not sure. Please, look to the sample below:
{{{
%%table-filter
[{Table
||A ||B ||C
|group1 |name1 |v1
|^ |name2 |v2
|group2 |name3 |v3
}]
}}}
If you look to the result you will see that filter for the first column contains values ''group1'', ''group2'', and ''name2'' which is not correct. So merged cells seems to be incorrectly interpreted by %~%table-filter.
-- Matvey Kazakov, 2009-02-20
;: This is correct. The table-filter assumes all rows of the table have the same number of cells. --[DF|DirkFrederickx]
Anyone know which JSPWIKI versions work with latest version of TablePlugin (v0.3)?
-- Bruce Rosenquist, 2009-06-24
;:The plugin is compatible with v2.4.xx, v2.6.xx and v2.8.xx. --[DF|DirkFrederickx]
-- Neil, 11 Jun 2012
Does this work? I can't get it working on my JSPWiki and there doesn't seem to be a "how to install" section... Thanks
%%
%%
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