Hi Guys
I updated my Maven Plugin that takes Code / Content of Pages and Objects and places it into the XML files which then can be packed up into a XAR.
The plugin uses the same File Name Pattern as the IntelliJ Plugin for the Content Files:
- Page: <Page Name>.<Extension>
- Object: <Page Name>.<Class Space>.<Class Name>.<Object Number>.<Property Name>.<Extension>
The Content Files can contain anything like Velocity, Groovy, JavaScript, CSS etc. There can be multiple Content Files per target XML file but the XML file must be present in the source directory. If there is not Content File the XML file will be written to the target file w/o transformation otherwise any Page Content or Object Property will be replaced with the content of the Content File. The XML files can be taken straight from an export or from the source application w/o any adjustments.
Let me know if that would be of some help for XWiki.
-Andy
My registration template provides the option of client side validation using the
LiveValidate library. In order to turn this functionality on by default we would
have to bundle the library with XWiki. The library is licensed under the MIT
license: http://livevalidation.com/license and weighs in at 12.5KB when minified.
I would like to add:
resources/js/yui/livevalidation/livevalidation_prototype.compressed.js
and a stylesheet which was posted to the incubator by Jerome Velociter
resources/js/yui/livevalidation/livevalidation_style.css
Caleb James DeLisle
I am adding a new captcha component, it uses jcaptcha-2.0-alpha1 and supports
image captchas and sound captchas (freetts jars must be added for sound captcha support)
There is a captcha plugin in xwiki-core which makes the core depend on jcaptcha-all-1.0-RC3.
jcaptcha-all-1.0-RC3 causes conflicts when getting classes from jcaptcha-2.0.
The plugin in querstion:
http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-core/src/main/…
Here's my +1 for removing it entirely, breaking backward compatibility, lightening xwiki-core,
and making the core no longer depend on jcaptcha.
You may review a patch for removing the plugin here:
http://jira.xwiki.org/jira/secure/attachment/16508/XWIKI-4779-removeJcaptch…
To provide velocity access to the captcha component for checking the results of the captcha,
I would like to add a VelocityContextInitializer which will add a binding called $captchaservice
which will provide 3 methods:
/**
* If this is false, the captcha system will still work.
* It is for velocity scripts to determine whether captchas are needed.
*
* @return Is the captcha service enabled in the configuration.
*/
boolean isEnabled()
/** @return a List of the names of all registered classes implementing {@link org.xwiki.captcha.CaptchaVerifier}. */
public List<String> listCaptchaNames()
/**
* Get a {@link org.xwiki.captcha.CaptchaVerifier} from the service.
*
* @param captchaName The name of the type of captcha, use {@link #listCaptchaNames()} for a list
* @return A captcha object which can be used to check a specific answer for a given challange
* @throws Exception If the named captcha doesn't exist.
*/
public CaptchaVerifier getCaptchaVerifier(String captchaName) throws Exception
I realize throwing an Exception to velocity always results in a stack trace but I see it as the lesser evil to
returning a non-functional CaptchaVerifier which always returns false. Also I see no use case where the name of
the captcha is not given in hardcoded velocity so this Exception is only for the velocity developers.
Here's my +1 for adding this as well.
Caleb James DeLisle
I just wanted to double check, I know Jerome is on vacation but I wanted to
see if anyone had a problem with me removing the reference to the old jcaptcha
plugin from workspaces xwiki.cfg.
It is used in RegistrationService but is turned off by default. I can get to
implementing the new captcha system there later.
For the moment does anyone have any problem with me removing the plugin line
from the configuration file?
Caleb
On Jan 23, 2010, at 7:27 PM, tmortagne (SVN) wrote:
> Author: tmortagne
> Date: 2010-01-23 19:27:50 +0100 (Sat, 23 Jan 2010)
> New Revision: 26317
>
> Modified:
> platform/core/trunk/xwiki-core/src/main/aspect/compatibility/com/xpn/xwiki/doc/XWikiDocumentCompatibilityAspect.aj
> platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
> Log:
> XWIKI-4784: Make xwiki-core works without aspectJ
[snip]
>
> - //ÊIf the parent is not set in the current document set the template parent as the parent.
> + //ï¿∏If the parent is not set in the current document set the template parent as the parent.
Problem here.
Thanks
-Vincent
> if (getParentReference() == null) {
> setParentReference(templatedoc.getParentReference());
> }
Hi! Can someone please help me? I'm looking for the package or part of the
XWiki code where I can apply the XWiki Syntax v2.0. I would like to format
the text that would appear on the screen and I can't seem to find the code
that does that. Please help.
example:
i'll get the contents of a page through getPage() and getContents() then in
another class, i'll enclosed the contents with the xwiki syntax for
highlighting the text then save it back so when a user views the page, he
will see the highlighted text.
Thank you in advance!
--
View this message in context: http://n2.nabble.com/text-formatting-tp4438830p4438830.html
Sent from the XWiki- Dev mailing list archive at Nabble.com.
I would like to make the new registration page an application because it will
make it much easier for the wiki administrator to add fields because the code
has to have the right to save information which is passed to it.
It is also very big, about 300 lines of code and 300 lines of configuration and
comments. Something this size doesn't seem suited for the templates directory.
Finally it is highly extendable. It contains a large configuration which defines
all of it's fields because it is meant to be edited and have more fields added.
I think placing it in the templates section would put it where wiki administrators
would not have such easy access to it.
Available here are the current velocity template and the (slightly older) syntax2.0
code snippet http://jira.xwiki.org/jira/browse/XWIKI-4778
Caleb
On Jan 22, 2010, at 7:08 PM, Jerome Velociter wrote:
> vmassol (SVN) wrote:
>> Author: vmassol
>> Date: 2010-01-22 18:49:40 +0100 (Fri, 22 Jan 2010)
>> New Revision: 26311
>>
>> Modified:
>> platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/plugin/packaging/Package.java
>> platform/core/trunk/xwiki-core/src/main/resources/ApplicationResources.properties
>> Log:
>> XWIKI-4774: Importer should add a version comment when saving documents when importing
>>
>> Modified: platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/plugin/packaging/Package.java
>> ===================================================================
>> --- platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/plugin/packaging/Package.java 2010-01-22 17:15:11 UTC (rev 26310)
>> +++ platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/plugin/packaging/Package.java 2010-01-22 17:49:40 UTC (rev 26311)
>> @@ -30,6 +30,7 @@
>> import java.io.OutputStream;
>> import java.io.StringWriter;
>> import java.util.ArrayList;
>> +import java.util.Arrays;
>> import java.util.Date;
>> import java.util.HashMap;
>> import java.util.List;
>> @@ -645,7 +646,8 @@
>> xa.getAttachment_content().setContentDirty(false);
>> }
>>
>> - context.getWiki().saveDocument(doc.getDoc(), context);
>> + String saveMessage = context.getMessageTool().get("core.importer.saveDocumentComment");
>> + context.getWiki().saveDocument(doc.getDoc(), saveMessage, context);
>> doc.getDoc().saveAllAttachments(false, true, context);
>> addToInstalled(doc.getFullName() + ":" + doc.getLanguage(), context);
>>
>>
>> Modified: platform/core/trunk/xwiki-core/src/main/resources/ApplicationResources.properties
>> ===================================================================
>> --- platform/core/trunk/xwiki-core/src/main/resources/ApplicationResources.properties 2010-01-22 17:15:11 UTC (rev 26310)
>> +++ platform/core/trunk/xwiki-core/src/main/resources/ApplicationResources.properties 2010-01-22 17:49:40 UTC (rev 26311)
>> @@ -510,6 +510,7 @@
>> core.importer.select=select
>> core.importer.selectAll=all
>> core.importer.selectNone=none
>> +core.importer.saveDocumentComment=Imported from XAR
>
> Maybe we could add package name & version, WDYT ?
I thought about it but for now I wanted to do the simplest thing that would work.
I'm ok to add package name + version.
Thanks
-Vincent
> Jerome.
>
>>
>> registerwelcome=Welcome to the registration form. This will allow you to edit pages, once the admin gives you appropriate rights
>> email=e-Mail address
>> @@ -669,7 +670,10 @@
>>
>> tempdirnotset=Temporary directory not set. Please follow the instructions on <a href="http://www.xwiki.org/xwiki/bin/view/FAQ/WhyAmIGettingANullPointerExceptionW…">xwiki.org</a> on how to fix this.
>>
>> -# comments for history
>> +# Comments for history
>> +# Note: These keys should be moved to their domains.
>> +# For example the comment messages for the XAR importer are in core.importer.* keys.
>> +# TODO: Do the same for the other keys
>> core.comment=Comment
>> core.comment.prompt=Enter a comment describing your changes
>> core.comment.addComment=Added comment
Hi devs,
I'd like to propose Ecaterina Valica as a committer on XE, skins and
applications.
Ecaterina has been doing a good job moving XWiki towards better and more
consistent UIs. I've been applying her patches for the last months, and
lately I believe that the quality is good, and they do not need major
changes anymore. This would really speed up resolving skin issues and
improvements.
Here's my +1.
Disclaimer: Ecaterina is working for XWiki SAS. For more details
on the XWiki project and XWiki SAS see
http://massol.myxwiki.org/xwiki/bin/view/Blog/XWikiSASAndOpenSource
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
On Thu, Jan 21, 2010 at 14:25, vmassol <platform-notifications(a)xwiki.org> wrote:
> Author: vmassol
> Date: 2010-01-21 14:25:39 +0100 (Thu, 21 Jan 2010)
> New Revision: 26278
>
> Modified:
> platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/objects/BaseElement.java
> Log:
> XWIKI-4753: Refactor old model to use the new Entity Reference classes
>
> * Removed warning since there are too many left and this causes functional test errors (false positives)
>
> Modified: platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/objects/BaseElement.java
> ===================================================================
> --- platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/objects/BaseElement.java 2010-01-21 11:10:10 UTC (rev 26277)
> +++ platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/objects/BaseElement.java 2010-01-21 13:25:39 UTC (rev 26278)
> @@ -127,11 +127,7 @@
> {
> // If the name is already set then reset it since we're now using a reference
> this.reference = reference;
> - if (this.name != null) {
> - LOG.warn("Element was stored as name [" + this.name + "]. Will now be stored as a reference ["
> - + reference + "]");
> - this.name = null;
> - }
> + this.name = null;
You could keep a debug log. Someone could enable debug log to track wrong uses.
> }
>
> /**
>
> _______________________________________________
> notifications mailing list
> notifications(a)xwiki.org
> http://lists.xwiki.org/mailman/listinfo/notifications
>
--
Thomas Mortagne
Hi devs,
Short story:
1/ add the CLASS, OBJECT, PROPERTY EntityTypes in the model
+1
2/ serialization for referencing a property of an object
a) wiki:Space.Page^className[objectNumber]#property
b) wiki:Space.Page^className#objectNumber$property
+0.75 for b)
Long story:
1/ I would need to extend the EntityReference to be able to target a
property in an object in a document.
For this, I will need to add
/**
* Represents a Class Entity
*/
CLASS,
/**
* Represents an Object Entity.
*/
OBJECT,
/**
* Represents a Property Entity
*/
PROPERTY,
in the EntityType. Although I would prefer an extensible framework that
would allow to extend the possible entity types without changing an enum
in the platform (for any API user to be able to define its own
references), I think this is fairly extensible (these are key concepts
in the xwiki model and I don't think they would be changed that soon,
and their interpretation is flexible, they could be combined with any
parent to generate either references to class definitions or instances).
here's my +1 for this.
2/ I would also need a 'standard' string serialization for these. Now,
there's also the option to do it in my own module (annotations) because
only I need it ftm, but I prefer to have a platform wide approach. Opinions?
There are 2 choices, with a potentially different combination of separators:
a/ wiki:Space.Page^className[objectNumber]#property
pros: it's a suggestive way to access objects by number ([] is the
standard syntax for array indexed access and the objects are accessed by
index), [] is supported by JCR so maybe we should support it too
cons: [] is somewhat inconsistent with all other separators which are
just one separator, to the left (right) of the entity, harder to
implement the [] separators on the current framework
b/ wiki:Space.Page^className#objectNumber$property
pros: inline with the separator usage we already have (and easier to
implement for this reason), could be easier refactored to contain an
object name instead of the number
cons: $ separator can collide with velocity syntax (can potentially
cause trouble when used in velocity -- an alternative could be the pipe
|), could be harder to drop the object number part of the reference to
refer a property in a class (if wanted, in the future)
I have no other argument between a) and b) but the implementation speed
one, so I'd go for a b)-like approach, in the spirit of the current
separators.
WDYT?
Thanks,
Anca
Hi guys,
I think we need a free form area in the user profile where the user can put whatever he wants and that would be displayed below the current grey box (containing personal info + contact + external links).
Users often want to add content to their home page. The About field isn't appropriate for this (it could be left as is though).
WDYT?
Thanks
-Vincent
Hi Everyone, Hi Marius,
"What version of XWiki Enterprise do you use? Looks like an URL is
badly parsed. There shouldn't be any "xwiki:resources.js" page.
There's no resources.js file for sure in the default distribution."
I am using xwiki-enterprise-web-2.1.1, I downloaded the war file,
xwiki-enterprise-web-2.1.1.war, from xwiki website.
"Two questions: (1) do you get the same velocity exception when
viewing the Panels.YourPanelName page? (2) When you get the velocity
exception, is your JavaScript file loaded properly? Check with firebug
in the header of the edited page for the associated script tag."
(1). Yes, I get exception when viewing the Panels. Here is visual:
http://picasaweb.google.com/lh/photo/0ZTNIoSvoAWZe9NveH_3SA?feat=directlink
(2). Here is the pic, I do not think they are loaded right.
http://picasaweb.google.com/lh/photo/U826Ehn6oVWcxiGoUZBsrA?feat=directlin
“An advice: don't leave useless empty lines in the panel content
because they generate paragraphs.” I took your advice, but it is
still not work.
Another example is Design Rationale Type Tree
(http://picasaweb.google.com/lh/photo/lS-61ZTSh2kbKpl3JiQqSQ?feat=directlink)
I can load it now. In the pass it will give me the same error above.
No matter under \xwiki-web or under \xwiki-web\wysiwyg, when I use mvn
install or mvn gwt:debug, it will report Unable to find resource
'velocity-tools:velocity-tools:pom:1.4'
http://picasaweb.google.com/lh/photo/QxRZUSeo1rdpV7UYC2sIqg?feat=directlink
Thank you everyone! Sincerely.
Leon
Leon Wang wrote:
> Hi Marius,
>
> I asked a question no one answer me. Could you please give me some idea?
Someone did answer, asking for more information
http://lists.xwiki.org/pipermail/devs/2010-January/016890.html
> When I use "mvn install" or "mvn gwt:debug" it will report could not
Use where? In which maven project/module?
> find velocity-tools:velocity-tools:pom:1.4 file:
> [INFO] Downloading:
> http://maven.xwiki.org/externals/velocity-tools/velocity-tools/1.4/velocity… [INFO]
> Unable to find resource 'velocity-tools:velocity-tools:pom:1.4' in
> repository xwiki-externals
> (http://maven.xwiki.org/externals) Downloading:
> http://maven.xwiki.org/releases/velocity-tools/velocity-tools/1.4/velocity-…
Does the build fail? There's nothing wrong with the report above.
>
> When I try to load my GWT application at the edit panel, and at the edit
> model firebug will give me velocity parsing error.What should I do? Here
> is the error:
Firebug reports client side exceptions (mainly JavaScript) while
velocity exceptions happen on the server side. I don't see the relation
between firebug and the velocity exception you pasted below.
> <a href="" onclick="document.getElementById('xwikierror1').style.display='block'; return false;">Error number 4001 in 4: Error while parsing velocity page xwiki:resources.js
As I said in the first reply, "xwiki:resources.js" is an odd name for a
page which makes me think that an URL is badly parsed somewhere. Again,
what version of XWiki Enterprise did you use?
> Wrapped Exception: Failed to evaluate content with id [xwiki:resources.js]</a><div id="xwikierror1" style="display: none;"><pre class="xwikierror">
> Error number 4001 in 4: Error while parsing velocity page xwiki:resources.js
> Wrapped Exception: Failed to evaluate content with id [xwiki:resources.js]
> com.xpn.xwiki.XWikiException: Error number 4001 in 4: Error while parsing velocity page xwiki:resources.js
> Wrapped Exception: Failed to evaluate content with id [xwiki:resources.js]
> at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:122)
> at com.xpn.xwiki.render.XWikiVelocityRenderer.render(XWikiVelocityRenderer.java:93)
> at com.xpn.xwiki.render.XWikiVelocityRenderer.interpret(XWikiVelocityRenderer.java:55)
> at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:269)
> at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.interpretText(DefaultXWikiRenderingEngine.java:175)
> at com.xpn.xwiki.XWiki.parseContent(XWiki.java:1610)
> at com.xpn.xwiki.web.SkinAction.renderFileFromFilesystem(SkinAction.java:239)
> at com.xpn.xwiki.web.SkinAction.render(SkinAction.java:133)
> at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:214)
> at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115)
> at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
> at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
> at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
> at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:117)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
> at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
> at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:574)
> at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527)
> at java.lang.Thread.run(Unknown Source)
>
>
> Wrapped Exception:
>
> org.apache.velocity.runtime.parser.TemplateParseException: Encountered "+ markerId + " at xwiki:resources.js[line 47, column 27]
> Was expecting one of:
> "," ...
> ")" ...
>
> at org.apache.velocity.runtime.parser.Parser.parse(Parser.java:119)
> at org.apache.velocity.runtime.RuntimeInstance.parse(RuntimeInstance.java:1131)
> at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:184)
> at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:156)
> at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:116)
> at com.xpn.xwiki.render.XWikiVelocityRenderer.render(XWikiVelocityRenderer.java:93)
> at com.xpn.xwiki.render.XWikiVelocityRenderer.interpret(XWikiVelocityRenderer.java:55)
> at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:269)
> at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.interpretText(DefaultXWikiRenderingEngine.java:175)
> at com.xpn.xwiki.XWiki.parseContent(XWiki.java:1610)
> at com.xpn.xwiki.web.SkinAction.renderFileFromFilesystem(SkinAction.java:239)
> at com.xpn.xwiki.web.SkinAction.render(SkinAction.java:133)
> at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:214)
> at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115)
> at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
> at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
> at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
> at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:117)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
> at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
> at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:574)
> at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527)
> at java.lang.Thread.run(Unknown Source)
>
> </pre></div>
>
> Here is what I did, I first created a edit panel:
>
>
> #panelheader('DesignRationaleTreeView')
>
> $xwiki.jsfx.use("js/xwiki/designrationaletreeview/designrationaletreeview.nocache.js", true)
>
> <div id="DR_TreeView"></div>
>
>
> #panelfooter()
An advice: don't leave useless empty lines in the panel content because
they generate paragraphs.
Two questions: (1) do you get the same velocity exception when viewing
the Panels.YourPanelName page? (2) When you get the velocity exception,
is your JavaScript file loaded properly? Check with firebug in the
header of the edited page for the associated script tag.
Hope this helps,
Marius
>
> In my GWT application I used to inject javascript
>
> String hookId = "DR_TreeView";
>
>
> RootPanel.get(hookId).add(outer);
>
>
>
>
> Thank you everyone, have a nice day!
>
> Leon
>
Hello,
I have made a complete analysis of and made extensive changes to the
XWiki grammar file to make the grammar strictly LL(1). Please have a
look here:
http://code.google.com/p/wikimodel/issues/detail?id=169
Below is a summary of things that I find surprising in the XWiki
grammar, and we should consider changing:
Unexpected: Parameters at the beginning of line terminates a block or a
paragraph, even if they are inline to the line.
Expected: Only empty lines or appropriate end-tokens may terminate a
block or a paragraph. Alternatively, the parameters may
terminate a block or paragraph if they are indeed block
parameters.
Unexpected: No empty lines event is generated if there are exactly two
new lines before something that is not a paragraph.
Expected: Empty lines event should always be generated on
sequences of two or more new lines characters.
Unexpected: Header tokens can be arbitrarily long sequences of equal
signs. If there are more than six, header level 6 is
chosen. The optional end token does not need to match
the start token.
Expected: Sequences of more than 6 equal signs should be special
characters. Mismatching end tokens should be special
characters.
Unexpected: If there are block parameters before an empty line, an
empty paragraph is generated and the parameters are
applied to these.
Expected: Block parameters should be applied to the following
header, table, paragraph etc.
Best regards,
Andreas Jonsson
Hello all,
I am working on refactoring the registration page. I have a mockup which uses the view
action so that the register action is not needed, I'm not sure if it makes more sense to
remain a template or be moved to an application, any thoughts on this?
There are a few apis which would make this job a lot easier and cleaner.
I would like to provide Velocity access to ConfigurationSource. There would be a
configuration parameter which a list of configuration parameters that Velocity
is allowed to read. I think it makes the most sense to add a VelocityContextInitializer
to the default Configuration implementation which injects a ConfigurationSource wrapper.
Perhaps name it $configurationsource
Currently (in my mockup) there is no way to tell the guest who is registering that their
chosen user name is taken or is invalid if the captcha is wrong, this is because the username
is checked by $xwiki.createUser after the captcha is verified. If we add the following two
apis then all of the checking can be done on the Velocity side.
$xwiki.isUsernameAvailable(String name)
This will check if the name is the name of the superuser then check if a document
exists by that name. Should I be using an EntityReference? I lean toward string because
that is what the user types in.
$util.compilePattern(String regex)
Returns a Pattern or null if regex is invalid because Perl5Util methods all throw
exceptions which Velocity can't catch.
I appreciate any thoughts/advice you have to offer.
Thanks,
Caleb
Dear XWiki Developers,
When I try to load my GWT application at the edit panel, and at the edit
model firebug will give me velocity parsing error. Here is the error:
<a href="" onclick="document.getElementById('xwikierror1').style.display='block';
return false;">Error number 4001 in 4: Error while parsing velocity
page xwiki:resources.js
Wrapped Exception: Failed to evaluate content with id
[xwiki:resources.js]</a><div id="xwikierror1" style="display:
none;"><pre class="xwikierror">
Error number 4001 in 4: Error while parsing velocity page xwiki:resources.js
Wrapped Exception: Failed to evaluate content with id [xwiki:resources.js]
com.xpn.xwiki.XWikiException: Error number 4001 in 4: Error while
parsing velocity page xwiki:resources.js
Wrapped Exception: Failed to evaluate content with id [xwiki:resources.js]
at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:122)
at com.xpn.xwiki.render.XWikiVelocityRenderer.render(XWikiVelocityRenderer.java:93)
at com.xpn.xwiki.render.XWikiVelocityRenderer.interpret(XWikiVelocityRenderer.java:55)
at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:269)
at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.interpretText(DefaultXWikiRenderingEngine.java:175)
at com.xpn.xwiki.XWiki.parseContent(XWiki.java:1610)
at com.xpn.xwiki.web.SkinAction.renderFileFromFilesystem(SkinAction.java:239)
at com.xpn.xwiki.web.SkinAction.render(SkinAction.java:133)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:214)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:574)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527)
at java.lang.Thread.run(Unknown Source)
Wrapped Exception:
org.apache.velocity.runtime.parser.TemplateParseException: Encountered
"+ markerId + " at xwiki:resources.js[line 47, column 27]
Was expecting one of:
"," ...
")" ...
at org.apache.velocity.runtime.parser.Parser.parse(Parser.java:119)
at org.apache.velocity.runtime.RuntimeInstance.parse(RuntimeInstance.java:1131)
at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:184)
at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:156)
at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:116)
at com.xpn.xwiki.render.XWikiVelocityRenderer.render(XWikiVelocityRenderer.java:93)
at com.xpn.xwiki.render.XWikiVelocityRenderer.interpret(XWikiVelocityRenderer.java:55)
at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:269)
at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.interpretText(DefaultXWikiRenderingEngine.java:175)
at com.xpn.xwiki.XWiki.parseContent(XWiki.java:1610)
at com.xpn.xwiki.web.SkinAction.renderFileFromFilesystem(SkinAction.java:239)
at com.xpn.xwiki.web.SkinAction.render(SkinAction.java:133)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:214)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:574)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527)
at java.lang.Thread.run(Unknown Source)
</pre></div>
Here is what I did, I first created a edit panel:
#panelheader('DesignRationaleTreeView')
$xwiki.jsfx.use("js/xwiki/designrationaletreeview/designrationaletreeview.nocache.js",
true)
<div id="DR_TreeView"></div>
#panelfooter()
In my GWT application I used to inject javascript
String hookId = "DR_TreeView";
RootPanel.get(hookId).add(outer);
Thank you everyone, have a nice day!
Leon
Hi,
I want to be able to have two instances of a class object display in a
single page. I imagine I have to make some changes to the classsheet to get
this to display? Can someone give me some pointers?
thanks
--
View this message in context: http://n2.nabble.com/Display-two-instances-of-class-object-in-a-single-page…
Sent from the XWiki- Dev mailing list archive at Nabble.com.
Hi Guys (and Fabio in particular),
I've struggled a bit to have a REST client written with Httpclient and
Jaxb. The micro sample on the wiki
(http://platform.xwiki.org/xwiki/bin/view/Features/XWikiRESTfulAPI) was
not correct (the parameter to JAXBContext.newInstance was wrong) and
there was no example for some other calls than GET a wiki page.
Finally when you write a sample using maven and jaxb you need the JAXB
model and this makes your maven dependency need the whole xwiki core as
you need xwiki-rest.
We should separate xwiki-rest-jaxb model in a separate JAR that does not
have other depencies than JAXB and provide a maven sample which is easy
to customize.
WDYT ?
Ludovic
--
Ludovic Dubost
Blog: http://blog.ludovic.org/
XWiki: http://www.xwiki.com
Skype: ldubost GTalk: ldubost
Hello folks,
I have a proposed method for migrating the captcha plugin to a component.
I have posted a patch here: http://jira.xwiki.org/jira/browse/XWIKI-4741
which contains the core modifications which I am proposing. Though I have
a patch, this is still in the design phase and I welcome anyone to suggest
changes.
ComponentRole: Captcha
/**
* Check if the solution to the captcha is correct.
*
* @param answer The provided solution.
* @return true if the solution is correct.
*/
boolean isAnswerCorrect(String answer);
Implementing components:
DefaultImageCaptchaAction
DefaultSoundCaptchaAction
The new DefaultImageCaptcha component can be used to solve captchas which
were downloaded through the old struts based jcaptcha plugin. Both components
also implement org.xwiki.action.Action and when execute() is called, they
send a captcha to the response.
The components depend on the request and response in the container being
servlet request/response because com.octo.captcha.module.web.image.ImageToJpegHelper
and com.octo.captcha.module.web.sound.SoundToWavHelper require HttpServletRequest and
HttpServletResponse. Also to get the ID of the session in a way that is compatible
with the old struts based method of getting captchas, an HttpServletRequest is needed.
I am not happy with this design as it demands the use of the if instanceof then cast
hack. I would like to hear any ideas about how to clean this up.
There is also a velocity initializer which provides a captcha service with:
/**
* Check if the solution to the captcha is correct.
*
* @param captchaName The name of the Captcha you are checking the answer against
* @param answer The provided solution
* @return true if the solution is correct
* @throws UnsupportedOperationException If there is no captcha by the name captchaName
*/
public boolean isAnswerCorrect(String captchaName, String answer) throws UnsupportedOperationException
and
/** @return a List of the names of all registered classes implementing {@link org.xwiki.captcha.Captcha}. */
public List<String> listCaptchaNames()
In my opinion the html should all be in the application side and the core code
should not even know it's URL. I am working on an application and would be
interested to hear what requirements you think it should meet.
Sorry for the long mail, I am anxious to hear your ideas about this.
Caleb James DeLisle