How can I set and get a new session variable in xwiki. Something like:
context.getRequest().getHttpServletRequest().getSession().setAttribute("The_name",value);
context.getRequest().getHttpServletRequest().getSession().getAttribute("The_name");
Thanks for the help
--
View this message in context: http://n2.nabble.com/Session-Variables-tp674006p674006.html
Sent from the XWiki- Dev mailing list archive at Nabble.com.
Hi,
I've published in svn a tool based on velocidoc
(http://sourceforge.net/projects/velocidoc/) to allow to generate
javadoc style documentation for velocity macros.
You'll find links to it and an example of generating for the XWiki
Platform Web templates directory on the wiki:
http://dev.xwiki.org/xwiki/bin/view/Drafts/Documenting+XWiki+Velocity+Macros
From now on we should start documeting velocity macros with the
following syntax:
#**
* Description of the macro
* @param paramname desc
* @param paramname desc
* @author author
*#
A later improvement will allow parsing XWiki xml files and extract
documentation of the pages in the same format.
Ludovic
--
Ludovic Dubost
Blog: http://blog.ludovic.org/
XWiki: http://www.xwiki.com
Skype: ldubost GTalk: ldubost
Hi XWikiers,
I've recently worked on a refactoring of the page footer and I'd like
to get some feedback about it.
Features:
* New "information" section displaying parent, backlinks, included pages, etc
* New "history" section (as described in the original albatross spec)
* Tags edition with suggest (information)
* Lazy loading of sections via AJAX
* Url hash (#comments) taken into account, for example
autoload/scroll after having upladed an attachments.
* Unobstrusive JavaScript (links are working with JS turned off)
Since a demo is worth a thousand words, you can try it here :
http://jv.myxwiki.org/xwiki/bin/view/Main/
WDYT ?
Thanks,
JV.
Hello,
I have been working for some time compiling my own snapshot XWikiEnterprise
1.5 (I was following the trunk in fact) but I have stopped following the
trunk in order to test some things... Apparently now the version is 1.6...
Before looking directly in the code with my own eyes, I prefer asking a few
questions about all the new features (modular architecture, new rendering,
new macros etc...):
Are they integrated in the last available tags? (the modular architecture
has appeared long time ago but it's not the default archi yet)
Does it break any compatibility?
Do you still use the old implementations as the default one?
When do you intend to replace the old archi with the new one? Do you have an
idea of the roadmap for this? Is version 2.0 the version when the old
implementations will disappear?
I need to have such information in order to know if I go on upgrading using
the trunk because it brings some bug corrections without breaking any
existing things?
or do I use a tag version to have a stable and fixed platform?
I don't fear using new versions and examining bugs and even correcting them
as long as they don't destroy my database?
Best regards
Pascal
Hi Asiri,
I've worked a little on WebDAV interoperability and made quite some
progress.
We now have on Mac:
- WebDAV working for browsing and downloading files
- WebDAV working for drag and dropping files
- WebDAV working with vi in view, edit and save (it says on save that
the file was changed while editing although it's not true)
- WebDAV working with a patched version of OpenOffice (with a fix for
locking) or with official NeoOffice in view edit and save
- WebDAV working with TextEdit in view, edit but NOT save
Mac OSX generates phony attachments to store temporart files. TextEdit
fails because it tries to create a file then MOVE it (it might be
because of the same locking issue as OpenOffice).
And on Windows XP:
With Novell NetDrive (mapping webdav to a driver letter):
- WebDAV allowing browsing, dowloading , drag and dropping
- WebDAV working with notepad and OpenOffice in view, edit, save
With Microsoft Web Folders (2 versions on SP2 tested including the
latest patch from Microsoft, SP3 would need to be tested)
- WebDAV allowing browsing, dowloading , drag and dropping
- WebDAV allowing to double click or open from notepad or OpenOffice but
by copying to a temp read only file. You then can SAVE AS to the WebDAV
folder.
It might be possible that MS Office allows to handle this differently.
With Microsoft WebDAV redirector (same one available on Vista)
- Nothing works at all. I've tried almost all I could to try to use it
to map a network drive on the webdav folder.. The constraints are pretty
hard on the web dav server and even though I was not able to have it
fully working. I find it a dead end.
On Windows Vista:
- Nothing works at all
It seems possible to install a Web Folders package on Vista and have the
behavior of XP.
In any case, the Microsoft solution is sub-optimal on Windows. Novell
NetDrive (free download findable on the web) or WebDrive (it's
commercial counterpart) seem to be much more efficient.
Maybe MSOffice works correctly with WebFolders but this needs to be tested.
On Mac the behavior is pretty nice with the patched version of
OpenOffice (patch is published there:
http://tools.openoffice.org/issues/show_bug.cgi?id=81536 let's hope
they put it in the standard distrib).
Ludovic
--
Ludovic Dubost
Blog: http://blog.ludovic.org/
XWiki: http://www.xwiki.com
Skype: ldubost GTalk: ldubost
On 3 août 08, at 21:40, malaka ekanayake wrote:
> Hi all,
>
> For the moment I would leave out the user defined macros and
> concentrate on the error reporting and $xwiki API assistance.
>
> WDYT?
>
> As you have told, I started looking at the $xwiki API and the ways
> to provide the content assistance.
>
> * But then I realized that it would be better off to provide content
> assistance to xwiki and velocity. XWiki content assistance is
> already implemented, I basically modified that implementation to
> provide content assistance to Velociry directives and variables.
>
Ok.
> * Earlier when the partition type was default_content there were
> only xwiki syntax. But Now we can expect both xwiki and velocity
> syntax. Now I need a way to provide completion proposals depending
> on whether it is xwiki or velocity. Therefore I implemented a
> DefaultCompletionProcessor which basicall delegates the computing of
> proposals to the appropriate completionProcessor depending on xwki
> or velocity. I didn' changed the functionaty of the exsisting
> XwikiCompletionProcessor.
>
I was looking at the XWikiCompletionProcessor and it has indeed to be
refactored because I think it's a bit messy.
There are some idiosyncrasies, for example structural completion and
link completion are done in this processor registered for the default
content type, while there are already a lot of partition type to
assign processors to (I will ask to Venkatesh for that).
> * Providing content assistance for Velociry directives is completed.
> The list of defined velocity variables can be extracted from the
> velocity parser. I could complete processing of proposals for
> variables using hardcoded list of variables. This can be replaced
> once I integrate the Velocity parser.
>
Ok.
> * When implementing above feature, i had to refactor the way, the
> document is partitioned. This also resulted in some changes in
> syntax colouring.
>
That's fine.
> Herewith I have attached the patch files, because I can't commit the
> code to sandbox. I've sent a mail regariding this to the mailing
> list before.
>
I've see that you were able to commit. I will review the code asap and
I'll get you feedback (I am abroad and the internet connection is not
very good).
> Now I am forcusing on provinding content assistance to the $xwiki
> API and integration of velocity parser.
>
Ok. Great.
Cheers,
Fabio
Hi Devs
I want to make a graph with a given table, but i don`t want to see the
table in the xwiki page, so i`m trying to make the graph inside my function:
Map data = new HashMap();
data.put("x", "1");
data.put("y", "110");
ChartingPlugin chartplugin = new
ChartingPlugin("chartingplugin", ChartingPlugin.class.toString(), context);
chartplugin.init(context);
// ChartingPluginApi chart = new
ChartingPluginApi(chartplugin,context);
ChartParams chartParams = new ChartParams();
try {
chartParams = new ChartParams(data,
DefaultChartParams.getInstance(), true);
chartParams.addParam(new
MapChartParam("source=type:table", false));
chartParams.addParam(new
MapChartParam("type=pie", false));
// chartParams.set("SOURCE", "type:table");
// chartParams.set("TYPE", "pie");
chartParams.check();
} catch (ParamException e) {
}
* Chart chart = new ChartImpl(chartParams,null,null);
try {
chart = chartplugin.generateChart(chartParams,
context);
} catch (GenerateException ge) {
}*
String title = chartParams.getString(
ChartParams.TITLE_PREFIX+ChartParams.TITLE_SUFFIX);
Integer height = chartParams.getInteger(ChartParams.HEIGHT);
Integer width = chartParams.getInteger(ChartParams.WIDTH);
Map imageAttr =
chartParams.getMap(ChartParams.IMAGE_ATTRIBUTES);
Map linkAttr =
chartParams.getMap(ChartParams.LINK_ATTRIBUTES);
// output the image links
StringBuffer sbuffer = new StringBuffer();
sbuffer.append("<a href=\""+ chart.getPageURL() + "\" ");
if (title != null) {
sbuffer.append("title=\"" + title + "\"");
}
if (linkAttr != null) {
Iterator it = linkAttr.keySet().iterator();
while (it.hasNext()) {
String name = (String)it.next();
String value = (String)imageAttr.get(name);
sbuffer.append(name+"=\"" + value + "\" ");
}
}
sbuffer.append(">");
sbuffer.append("<img src=\"");
sbuffer.append(chart.getImageURL());
sbuffer.append("\" ");
if (title != null) {
sbuffer.append("alt=\""+ title + "\" ");
}
sbuffer.append("height=\"" + height + "\" ");
sbuffer.append("width=\"" + width + "\" ");
if (imageAttr != null) {
Iterator it = imageAttr.keySet().iterator();
while (it.hasNext()) {
String name = (String)it.next();
if (name != ChartParams.HEIGHT && name !=
ChartParams.WIDTH) {
String value = (String)imageAttr.get(name);
sbuffer.append(name + "=\"" + value + "\" ");
} else {
}
}
}
sbuffer.append("/>");
sbuffer.append("</a>");
return sbuffer.toString();
I get some problems in :
* Chart chart = new ChartImpl(chartParams,null,null);
try {
chart = chartplugin.generateChart(chartParams,
context);
} catch (GenerateException ge) {
}
*I think is some problem with the source,
Any ideas?
Thanks in advance :)
Hi all
I have a question when I insert a table each table recives an ID the can be
used to define wich table to use to creat a Chart.
My question is How can I obtain this id. for Example I want to do the
following
This is Table ID = ? (0)
{table}
A | B
1 | 2
{table}
This is Table ID = ? (1)
{table}
E | D
1 | 2
{table}
And if I delete table 0:
This is Table ID = ? (0)
{table}
E | D
1 | 2
{table}
Hope Someone can help me thanks.
--
View this message in context: http://n2.nabble.com/Tables-Id-tp668637p668637.html
Sent from the XWiki- Dev mailing list archive at Nabble.com.