This plugin brings the power of Kanaputs language into JSPWiki.
Basically Kanaputs is a way to do java coding without compilation (it intensively uses java introspection).
http://www.kanaputs.fr
Kanaputs in sourceforge
You just need to add 'jspwiki.plugin.searchPath = kanaputs.jspwiki' in your jspwiki.properties and put Kanaputs.jar in attachment inside the lib directory of your wiki.
make a simple sum
java method invocation
use variable assignment and java method invocation
example of 'while' loop execution
example of Kanaputs reactivity feature
example of local shell invocation (on server side of course)
using wiki form inputs for a Kanaputs computation
Basically Kanaputs is a way to do java coding without compilation (it intensively uses java introspection).
http://www.kanaputs.fr

Kanaputs in sourceforge

You just need to add 'jspwiki.plugin.searchPath = kanaputs.jspwiki' in your jspwiki.properties and put Kanaputs.jar in attachment inside the lib directory of your wiki.
make a simple sum
[{ Kanaputs printInput='false'
1+2+4+7+14;
}]
28java method invocation
[{ Kanaputs printInput='false'
Math.PI
}]
3.141592653589793use variable assignment and java method invocation
[{ Kanaputs printInput='false'
a = 1+2+4+7+14;
b = Math.sqrt(a);
}]
5.291502622129181example of 'while' loop execution
[{ Kanaputs printInput='false'
v = Vector();
v.add("hello");
v.add(" ");
v.add("world");
out = "";
i = 0;
while(i < v.size()) {
out = out + v.elementAt(i);
i = i + 1;
}
out;
}]
hello worldexample of Kanaputs reactivity feature
[{ Kanaputs printInput='false'
a = "the length of this string is 31";
b = a.length();
b.reactive = true;
a = a - " is 31";
b;
}]
25example of local shell invocation (on server side of course)
[{ Kanaputs printInput='false'
#shell ipconfig
}]
Configuration IP de Windows Carte Ethernet Connexion au réseau local: Statut du média . . . . . . . . . : Média déconnecté Carte Ethernet Connexion réseau sans fil: Statut du média . . . . . . . . . : Média déconnectéusing wiki form inputs for a Kanaputs computation
[{ FormSet form='kanaputsTest1' printInput='false' extraParam='5' debug='false'
sum = param1 + param2 + param3 + param4 ;
"param1 = " + param1 + "\\" +
"param2 = " + param2 + "\\" +
"param3 = " + param3 + "\\" +
"param4 = " + param4 + "\\" +
"sum = __" + sum + "__, average = __" + (sum/4) + "__, extra param = " + extraParam ;
}]
[{ FormOpen form='kanaputsTest1' }]
parameter 1 [{ FormInput type='text' name='param1' value='1'}]\\
parameter 2 [{ FormInput type='text' name='param2' value='2'}]\\
parameter 3 [{ FormInput type='text' name='param3' value='3'}]\\
parameter 4 [{ FormInput type='text' name='param4' value='4'}]\\
[{ FormInput type='submit' name='submit' value='Submit'}]
\\
\\
[{ FormOutput form='kanaputsTest1' handler='Kanaputs' populate='handler'}]
[{ FormClose }]
Add new attachment
List of attachments
| Kind | Attachment Name | Size | Version | Date Modified | Author | Change note |
|---|---|---|---|---|---|---|
jar |
Kanaputs.jar | 255.2 kB | 2 | 28-Jan-2009 20:35 | DuvergerP |