Re: [xwiki-users] Vote for XWiki at the Enterprise 2.0 Conference Launchpad !!

2009-10-12 Thread Jean Couteau
Jeremie BOUSQUET wrote:
 done ! ;)
 ___
   
done too !

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Setting an object date property from a String.

2009-09-21 Thread Jean Couteau
Ok,

I ended up successfully setting my date parameter from a string 
combining velocity and groovy. Here is what I've done :

Created a Groovy class on a page named Project.DateParser :

/* Groovy Class : Date parser#* */

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

class DateParser {

  Date parse(toParse) {
def formatter = new SimpleDateFormat(dd/MM/);
return formatter.parse(toParse);
   
  }
}

/* *# */


Then I called it from my velocity script :

##Create an instance of my parser
#set($dateParser = $xwiki.parseGroovyFromPage(Project.DateParser))
##Set the value from this parser calling its parse method
$releaseObj.set(startDate,$dateParser.parse($date))
##Save the doc
$releaseDoc.save()
##Write the saved property
${releaseObj.startDate}

Now it works really fine. I can edit my date parameters with Ajax and 
that's pretty cool stuff.

Jean

Jean Couteau a écrit :
 Hi xwiki users,

 I have a problem setting an object date property from a String.

 The code I am doing is :

 ($startDate is a string I got from the request)

 #if($context.getUser()!=XWiki.XWikiGuest)
   #set($releaseDoc=$xwiki.getDocument(Project.${releaseid}))
   #set($releaseObj=$releaseDoc.getObject(XWiki.ReleaseClass))
   $releaseObj.set(startDate,$datetool.toDate($startDate))
   $releaseDoc.save()
   ${releaseObj.startDate}
 #else
   NoRight
 #end

 This piece of code is placed on the Skin Object and I call it using Ajax 
 (I use an InPlaceEditor from scriptaculous)

 What I got in result from this is NoRight if I am not connected but a 
 wiki page with this template does not exist if i am logged in. I don't 
 understand what is missing.

 I tried using Groovy, but I got the Groovy code in response, it was not 
 executed.

 If someone can point out my error, I am all heard.

 Thanks in advance

 Jean
   


-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Setting an object date property from a String.

2009-09-18 Thread Jean Couteau
Hi xwiki users,

I have a problem setting an object date property from a String.

The code I am doing is :

($startDate is a string I got from the request)

#if($context.getUser()!=XWiki.XWikiGuest)
  #set($releaseDoc=$xwiki.getDocument(Project.${releaseid}))
  #set($releaseObj=$releaseDoc.getObject(XWiki.ReleaseClass))
  $releaseObj.set(startDate,$datetool.toDate($startDate))
  $releaseDoc.save()
  ${releaseObj.startDate}
#else
  NoRight
#end

This piece of code is placed on the Skin Object and I call it using Ajax 
(I use an InPlaceEditor from scriptaculous)

What I got in result from this is NoRight if I am not connected but a 
wiki page with this template does not exist if i am logged in. I don't 
understand what is missing.

I tried using Groovy, but I got the Groovy code in response, it was not 
executed.

If someone can point out my error, I am all heard.

Thanks in advance

Jean

-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Find Currently Logged In Users

2009-09-10 Thread Jean Couteau
Dilipkumar Jadhav a écrit :
 Hello guys,
 Is there a way to find all the currently logged in users?
 For load testing purposes, it would be nice to know if we could get a head
 count of all those who are logged in.
 Thank you.
   
Hi,

I do not have a clue on how to do it, but I would be interested by the 
answer. That's a quite nice feature...

-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] [Vote] Default Color Theme

2009-09-01 Thread Jean Couteau
+1 (2)
+1 (C)

Ecaterina Valica a écrit :
 +1 (4)
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/user
-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] [Proposal] XWiki 2.0 Skin Name

2009-08-20 Thread Jean Couteau
Oana Tabaranu a écrit :
 Ecaterina Valica wrote:
   
 Vote:
 [ colibri ] +1 Caty, +1 Guillaume, +1 Raluca, +1 Vincent G, +1 Thibaut
 [ heron ] +1 Marta

   
 
 +1 colibri
   
+1 colibri that's a nice name

-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Introducing the equation rendering component and the equation macro

2009-08-10 Thread Jean Couteau
Hello Sergiu

 I have committed today the first implementation of a new XWiki feature: 
 rendering mathematical equations into images. It is available as a 
 standalone component, and as a syntax 2.0 macro.
   
Nice job, I did not try it as I have no concrete use now, but anyway, 
that's a really nice feature as equations are always hard to write for 
nice display.
 About the functionality.

 Equations are written in the TeX/LaTeX syntax, which is pretty simple, 
 and seems to be the syntax of choice for mathematical equations in other 
 wikis, too. The macro can distinguish between inline and block equations 
 and render them accordingly. The output can be either PNG (the default 
 one), GIF or JPEG. While PNG is definitely the best, I kept the other 
 two in case somebody really wants to use ancient browsers that only 
 understand GIF.

 Q: Should I leave just PNG as the output format?
   
I think, at least png and jpg should be kept. Png as default, and jpg as 
optional (there are still a lot of jpg fans  i guess), for the GIF 
format, i don't think it is necessary.
 Another feature is that the font size can be specified, in order to 
 render larger or smaller equations. All the font size commands from 
 LaTeX (from \tiny to \Huge) have an equivalent. I renamed them to a more 
 easy to understand name (also because the configuration is case 
 insensitive, so there's no difference between large and LARGE).

 By default images are generated so that the font looks relatively OK 
   



 This new cache might increase the memory 
 requirements, but fortunately it is easy to configure.

 The rendering macro is located in 
 platform/core/xwiki-rendering/xwiki-renderig-macros/xwiki-rendering-macro-equation,
  
 and the macro can be used with

 {{equation}}\sum_{i=0}^{\infty}{{/equation}}.

 Q: Is the macro name appropriate? Do you know of a better one?
   
I don't think you can find a better one...


 Future work:
 - make sure that there are no security issues with the Native backend
 - add support for MathML display for the clients that understand it
 - improve the alignment of images (especially for the Native backend), 
 as right now they are a bit raised above the text baseline


 Many thanks to Guillaume Legris who provided the starting point for this 
 component.
   

Keep up the good work...

And thanks for this nice feature.

Jean

-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Velocity code in XWiki Enterprise 1.9.1.21780

2009-07-22 Thread Jean Couteau
Marc Lijour a écrit :
 On Wednesday 22 July 2009 02:26:48 Sergiu Dumitriu wrote:
   
 Marc Lijour wrote:
 
 I did not find how to submit this fully as a comment to
 http://platform.xwiki.org/xwiki/bin/view/DevGuide/FAQTutorial
   
 What do you mean by that? Logged in users can post comments, and I see
 that you do have a user account on xwiki.org.
 

 I did not find how to escape the code (which contains things as 
 {{velocity}}). 
 The parser can not bite it. I only submitted a portion of the comment.
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

   
If you put it between the {pre} and {/pre} tags it does not escape ?

-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] FAQTutorial broken in 1.9 and 2.0M1

2009-06-25 Thread Jean Couteau
Aaron Digulla a écrit :
 Aaron Digulla schrieb:

   
 Okay, I got past the creation of the class but now it fails in Create
 Document Sheet with:

 content: No renderer found for target syntax [XWiki 1.0]
 

 Same happens with XWiki 2.0M1. Seriously, is there a version of XWiki
 where this works?

 Regards,

   
Yes, older versions,

in fact there was a change of syntax between versions 1.8 and 1.9 
(Vincent, correct me if I am wrong).

I use that on xwiki 1.5 everyday.

I did not try the last versions yet, but i reckon that if you change 
your config to xwiki 1.0 for default syntax like Vincent told you, it 
should work on 1.9 or 2.0

Best regards,
Jean.

-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] FAQTutorial broken in 1.9

2009-06-24 Thread Jean Couteau
Did you try this in xwiki 2.0 syntax ? If yes, try switching to xwiki 
1.0 syntax.

Hope this helps

Jean.

Aaron Digulla a écrit :
 Hi,

 After Vincent made my mouth water today at the Jazoon, I wanted to try
 XWiki but I could get the FAQTutorial to work with the 1.9 release
 (xwiki-enterprise-installer-generic-1.9-standard.jar). Specifically:

 After I enter the two strings FAQs and FAQ in the text fields, I get
 this text in the editor:

 ## replace Main with the Space where you want your documents to be created
 ## replace the default parent with the one of your choice
 ## Save this template using the 'Save' button
 #set( $class = $doc.name.substring(0,$doc.name.indexOf(Class)))
 #set($defaultparent = XWiki.${class}Class)
 #set($defaultweb = Main)
 #includeForm(XWiki.ClassSheet)



 This looks good. After saveview, I see this:



  replace Main with the Space where you want your documents to be created
 replace the default parent with the one of your choice
  Save this template using the 'Save' button
 #set( $class = $doc.name.substring(0,$doc.name.indexOf(Class

 #set($defaultparent = XWiki.${class}Class)
 #set($defaultweb = Main)
 #includeForm(XWiki.ClassSheet)



 Note how the formatting is completely broken and that some ) are
 missing. When I open the page for editing, I see this:


 ## replace Main with the Space where you want your documents to be created
 ## replace the default parent with the one of your choice
 ## Save this template using the 'Save' button
 #set( $class = $doc.name.substring(0,$doc.name.indexOf(Class##

 #set($defaultparent = XWiki.${class}Class)
 #set($defaultweb = Main)
 #includeForm(XWiki.ClassSheet)



 As you can see, there is suddenly an empty line, the ))) have been
 replaced with ## and the whole thing doesn't work. When I get rid of
 the Comments near the start and just leave this code:


 #set( $class = $doc.name.substring(0,$doc.name.indexOf(Class)))
 #set($defaultparent = XWiki.${class}Class)
 #set($defaultweb = Main)
 #includeForm(XWiki.ClassSheet)


 that gets mangles as well:



 #set( $class = $doc.name.substring(0,$doc.name.indexOf(Class

 #set($defaultparent = XWiki.${class}Class)
 #set($defaultweb = Main)
 #includeForm(XWiki.ClassSheet)



 Any ideas what could be wrong?


 Oh, and when starting XWiki for the first time, I get this exception:


 2009-06-24 20:58:26,853 [http://localhost:8080/xwiki/bin/view/Main/]
 [481877...@qtp0-7] ERROR lucene.LucenePlugin - cannot open
 index /home/digulla/XWiki
 Enterprise/jetty/work/Jetty_0_0_0_0_8080_xwiki__xwiki__5alevh/lucene
 org.apache.lucene.index.CorruptIndexException: failed to locate current
 segments_N file

 at
 org.apache.lucene.index.IndexFileDeleter.init(IndexFileDeleter.java:207)

 at
 org.apache.lucene.index.IndexWriter.init(IndexWriter.java:722)
 at
 org.apache.lucene.index.IndexWriter.init(IndexWriter.java:673)
 at
 org.apache.lucene.index.IndexWriter.init(IndexWriter.java:523)
 at
 com.xpn.xwiki.plugin.lucene.LucenePlugin.createSearchers(LucenePlugin.java:560)

 at
 com.xpn.xwiki.plugin.lucene.LucenePlugin.openSearchers(LucenePlugin.java:579)

 at
 com.xpn.xwiki.plugin.lucene.LucenePlugin.init(LucenePlugin.java:508)
 at
 com.xpn.xwiki.plugin.XWikiPluginManager.initPlugin(XWikiPluginManager.java:155)

 at
 com.xpn.xwiki.plugin.XWikiPluginManager.addPlugin(XWikiPluginManager.java:92)

 at
 com.xpn.xwiki.plugin.XWikiPluginManager.addPlugins(XWikiPluginManager.java:120)

 at com.xpn.xwiki.XWiki.preparePlugins(XWiki.java:1022)

 at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:742)

 at com.xpn.xwiki.XWiki.init(XWiki.java:670)





 which is probably safe to ignore but maybe you can rid of it nonetheless :)

 Best regards,

   


-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] How to display in inline mode, only an specific field from a class

2009-06-05 Thread Jean Couteau
Heitor Mayer a écrit :
 First of all, thank you for your answer.
 I tried to change the type of Editor to WUSIWYG, but even after the change, 
 the field appears like this one :
  
 (∗) TXProblema: 
  

 I have been using public java.lang.String display(java.lang.String fieldname,
 java.lang.String mode) with mode = edit in 
 order to display the field
  
 I already tried mode = inline, but nothing happens
  
 My problem is just that I need the embedded html editor. 
 When I call the page in inline mode, it shows every field in inline mode 
 along with many different buttons, what I do not want, because I want to have 
 only one button(my own button) to save the page content, so this is the 
 reason I want only one field(of the type Text Area) in inline mode.
  
 Thank you in advance.
   
Hi Heitor

Here is a piece of code that might help you : it is an extract from one 
of my class sheets, where I customized the inline edit :

#if($context.action==inline)
  #set($class = $doc.getObject(XWiki.USClass).xWikiClass)
  #set($hasProps = false)
  #foreach($prop in $class.properties)
#if($velocityCount == 1)
  #set($hasProps = true)
  dl
#end
##Here, I choose not to display some of the fields.
#if 
((${prop.prettyName}!=id)(${prop.prettyName}!=name)(${prop.prettyName}!=actor))
  dt ${prop.prettyName} /dt
  dd$doc.display($prop.getName())/dd
#end
#if (${prop.prettyName}==id)
  ##dt ${prop.prettyName} (DO NOT MODIFY)/dt
  ##dd$doc.display($prop.getName())/dd
#end
  #end
  #if($hasProps)
/dl
  #end
##From here, I display some external fields in view mode (not for edition)
  $context.setDisplayMode(view)
  table
  trthRelease/ththSprint/th/tr
  tr
 
td#set($allReleaseLinks=$xwiki.getDocument(Project.ReleaseLinks).getObjects(XWiki.ReleaseUSLinkClass))
  #foreach($link in $allReleaseLinks)
#if($link.get(usId)==${doc.display(id)})
  #set($url=Project.+$link.get(releaseId))
  #set($releasedoc=$xwiki.getDocument($url))
  #set($release=$releasedoc.getObject(ReleaseClass))
  [$release.get(name)$url]a 
href=../../view/Project/planner?backlog=${doc.display(id).substring(0,1)}usId=${doc.display(id)}releaseId=${link.releaseId}X/a
 
\\
#end
  #end
  a 
href=../../view/Project/ReleaseLinks?backlog=${doc.display(id).substring(0,1)}usId=${doc.display(id)}Add/a/td



td#set($allSprintLinks=$xwiki.getDocument(Project.SprintLinks).getObjects(XWiki.SprintUSLinkClass))
  #foreach($link in $allSprintLinks)
#if($link.get(usId)==${doc.display(id)})
  #set($url=Project.+$link.get(sprintId))
  #set($sprintdoc=$xwiki.getDocument($url))
  #set($sprint=$sprintdoc.getObject(SprintClass))
  [$sprint.get(name)$url]   a 
href=../../view/Project/planner?backlog=${doc.display(id).substring(0,1)}usId=${doc.display(id)}sprintId=${link.sprintId}X/a\\
#end
  #end
  a 
href=../../view/Project/SprintLinks?backlog=${doc.display(id).substring(0,1)}usId=${doc.display(id)}Add/a/td
  /tr
  /table
#end


Note that you might need to put a $context.setDisplayMode(inline) at 
the end (it's the end of my page so I did not put it)

Like that you can use the XWiki buttons to save the changes (it's inline 
mode after all).

I think that if you want to do that in another page, you might want to 
switch between inline mode and view mode using the 
$context.setDisplayMode() to display your field.

I hope that might help you.

Best regards

Jean

-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Character escaping for javascript

2009-06-05 Thread Jean Couteau
Hi list,

I am trying to insert some ajax on my wiki, but i am facing an issue 
with character escaping :

I'm trying to have this :

tdp id=1,0,0,0,3status Todo /pscript type=text/javascript 
new 
Ajax.InPlaceCollectionEditor('1,0,0,0,3status','/xwiki2/bin/edit/Project/plannerv2?xpage=assignStatusid=1,0,0,0,3',{
 
collection:['Todo','In progress','Dev done','Done'], ajaxOptions: 
{method: 'post'} });/script/td

What I can get is either replacing the [ character with its html code 
(using the escaping character) or having xwiki rendering a link.

No success having what i wanted.

I am using xwiki version 1.5 (so syntax 1.0)

So my question is : is there a way to escape a character without getting 
its html code ?

Thanks in advance

Jean

-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Invalid URL after a $xwiki.getURL() + deconnection

2009-04-17 Thread Jean Couteau
I finally found what was the problem...

Ludovic, after seeing you at Solutions Linux, I had a look with firebug...

In fact, i was not disconnected, it was just that the invalid url page 
is displayed as if I was logged out (not any trace of delete cookie as 
you thought).

Regarding the invalid url, it came from the select named topic, renaming 
it blabla, everything works fine.

Maybe XWiki uses topic string for another matter, I don't know but 
anyway, it works fine now.

Jean Couteau a écrit :
 Sergiu Dumitriu a écrit :
   
 Jean Couteau wrote:
   
 
 Hi list,

 I have a really weird bug which is quite annoying and I don't find any 
 solution to it :

 I want to edit a page in inline mode. I have a form to select the page 
 to edit with a button. I use the $xwiki.getURL() method to get the right 
 URL. When i select my page and click on the edit button, I have an 
 invalid URL error and i am deconnected. What is weird is that if I 
 reconnect and actualize the page I can access it. The second weird thing 
 is that I use exactly the same method to edit other pages form other 
 forms in the same first page and I do not have the problem. I am quite 
 lost with this issue. I tried to recreate the URL as a string but I have 
 the same problem.

 I am thinking maybe this is a known bug in xwiki. If not maybe i am 
 missing something somewhere. Please open my eyes on the obvious i am 
 missing in my code :

 FORM method=POST action=
 input type=hidden name=backlog value=${backlogId} /
 input type=hidden name=webname value=Project /
 input type=hidden name=name value=backlog /
 input type=hidden name=domain value=${domainId} /
 input type=hidden name=cut value=${cut} /
 Select topic : SELECT name=topic
   #foreach ($item in $topiclist)
 #set 
 ($topic=$xwiki.getDocument(${item}).getObject(XWiki.TopicClass))
 OPTION VALUE=${topic.id}$topic.get(name)/OPTION
   #end
 /SELECT
 input type=button value=Select 
 onclick='{this.form.action=../../view/ + this.form.webname.value + / 
 + this.form.name.value + ?backlog= + this.form.backlog.value + 
 domain= + this.form.domain.value + topic= + 
 this.form.topic.value.substring(this.form.topic.value.lastIndexOf(${separator})+1)
  
 + cut= + this.form.cut.value; this.form.submit(); }'/
 input type=button value=Edit 
 onclick='{url=Project.+this.form.topic.value; 
 this.form.action=${xwiki.getURL(url, inline)}; this.form.submit(); }' /
 
   
 Classic mix between serverside and clientside scripting.
   
 
 That was the obvious ;)
   
 ${xwiki.getURL...} is executed on the server, before the page is
 displayed in the browser. url is a javascript variable, created long
 after the velocity engine tried to generate the URL. I'm surprised you
 didn't get a stack trace instead of the panel.

 Still, this doesn't explain why you get disconnected, this should not
 happen.
   
 
 A lot of strange things are happening with this issue. I used this 
 method because the previous one was not working.
   
 Try this:

  input type=button value=Edit
  onclick='this.form.action=${xwiki.getURL(Project.__topic__,
 inline)}.replace(__topic__, this.form.topic.value);
 this.form.submit();' /
   
 
 This does not work, nothing happens, I stay on the same page and i am 
 still connected. Strange.

 I tried also with :

 input type=button value=Edit 
 onclick='{this.form.action=../../inline/ + this.form.webname.value + 
 / + this.form.topic.value; this.form.submit(); }' /

 and

 input type=button value=Edit 
 onclick='{this.form.action=../../inline/Project/ + 
 this.form.topic.value; this.form.submit(); }' /

 I am then disconnected and still have my invalid url (Strange though 
 because this method gave me a good url in almost the same form on the 
 same page (instead of topic, it is domain ;)). (Note that if i validate 
 the invalid url (that is in my browser address bar), i go to the page i 
 wanted to reach and i am connected, refreshing does not work).
   
 This uses $xwiki.getURL to obtain a valid URL template, which uses a
 placeholder (__topic__) instead of the real topic name, which in the
 generated HTML appears as a string like
 /xwiki/bin/inline/Project/__topic__, and javascript replaces this
 placeholder with the real value taken from the form
 
 Thanks for this explanation, clearer for me now ;).

 Thanks for your time.
 Jean
   
-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Changing edit menu

2009-03-02 Thread Jean Couteau
Hi guys,

I want to put my edit menu on the left side instead of the right side 
(the menu is also on the left in view mode and i would like to have a 
consistent look and feel). I searched on the list archives but I did not 
find anything.

So is there an easy way to put the edit menu on the left side of the 
page or I will have to do it with the css ?

Best regards

Jean

-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Invalid URL after a $xwiki.getURL() + deconnection

2009-02-25 Thread Jean Couteau
Sergiu Dumitriu a écrit :
 Jean Couteau wrote:
   
 Hi list,

 I have a really weird bug which is quite annoying and I don't find any 
 solution to it :

 I want to edit a page in inline mode. I have a form to select the page 
 to edit with a button. I use the $xwiki.getURL() method to get the right 
 URL. When i select my page and click on the edit button, I have an 
 invalid URL error and i am deconnected. What is weird is that if I 
 reconnect and actualize the page I can access it. The second weird thing 
 is that I use exactly the same method to edit other pages form other 
 forms in the same first page and I do not have the problem. I am quite 
 lost with this issue. I tried to recreate the URL as a string but I have 
 the same problem.

 I am thinking maybe this is a known bug in xwiki. If not maybe i am 
 missing something somewhere. Please open my eyes on the obvious i am 
 missing in my code :

 FORM method=POST action=
 input type=hidden name=backlog value=${backlogId} /
 input type=hidden name=webname value=Project /
 input type=hidden name=name value=backlog /
 input type=hidden name=domain value=${domainId} /
 input type=hidden name=cut value=${cut} /
 Select topic : SELECT name=topic
   #foreach ($item in $topiclist)
 #set 
 ($topic=$xwiki.getDocument(${item}).getObject(XWiki.TopicClass))
 OPTION VALUE=${topic.id}$topic.get(name)/OPTION
   #end
 /SELECT
 input type=button value=Select 
 onclick='{this.form.action=../../view/ + this.form.webname.value + / 
 + this.form.name.value + ?backlog= + this.form.backlog.value + 
 domain= + this.form.domain.value + topic= + 
 this.form.topic.value.substring(this.form.topic.value.lastIndexOf(${separator})+1)
  
 + cut= + this.form.cut.value; this.form.submit(); }'/
 input type=button value=Edit 
 onclick='{url=Project.+this.form.topic.value; 
 this.form.action=${xwiki.getURL(url, inline)}; this.form.submit(); }' /
 

 Classic mix between serverside and clientside scripting.
   
That was the obvious ;)
 ${xwiki.getURL...} is executed on the server, before the page is
 displayed in the browser. url is a javascript variable, created long
 after the velocity engine tried to generate the URL. I'm surprised you
 didn't get a stack trace instead of the panel.

 Still, this doesn't explain why you get disconnected, this should not
 happen.
   
A lot of strange things are happening with this issue. I used this 
method because the previous one was not working.
 Try this:

  input type=button value=Edit
  onclick='this.form.action=${xwiki.getURL(Project.__topic__,
 inline)}.replace(__topic__, this.form.topic.value);
 this.form.submit();' /
   
This does not work, nothing happens, I stay on the same page and i am 
still connected. Strange.

I tried also with :

input type=button value=Edit 
onclick='{this.form.action=../../inline/ + this.form.webname.value + 
/ + this.form.topic.value; this.form.submit(); }' /

and

input type=button value=Edit 
onclick='{this.form.action=../../inline/Project/ + 
this.form.topic.value; this.form.submit(); }' /

I am then disconnected and still have my invalid url (Strange though 
because this method gave me a good url in almost the same form on the 
same page (instead of topic, it is domain ;)). (Note that if i validate 
the invalid url (that is in my browser address bar), i go to the page i 
wanted to reach and i am connected, refreshing does not work).
 This uses $xwiki.getURL to obtain a valid URL template, which uses a
 placeholder (__topic__) instead of the real topic name, which in the
 generated HTML appears as a string like
 /xwiki/bin/inline/Project/__topic__, and javascript replaces this
 placeholder with the real value taken from the form
Thanks for this explanation, clearer for me now ;).

Thanks for your time.
Jean

-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Invalid URL after a $xwiki.getURL() + deconnection

2009-02-24 Thread Jean Couteau
Hi list,

I have a really weird bug which is quite annoying and I don't find any 
solution to it :

I want to edit a page in inline mode. I have a form to select the page 
to edit with a button. I use the $xwiki.getURL() method to get the right 
URL. When i select my page and click on the edit button, I have an 
invalid URL error and i am deconnected. What is weird is that if I 
reconnect and actualize the page I can access it. The second weird thing 
is that I use exactly the same method to edit other pages form other 
forms in the same first page and I do not have the problem. I am quite 
lost with this issue. I tried to recreate the URL as a string but I have 
the same problem.

I am thinking maybe this is a known bug in xwiki. If not maybe i am 
missing something somewhere. Please open my eyes on the obvious i am 
missing in my code :

FORM method=POST action=
input type=hidden name=backlog value=${backlogId} /
input type=hidden name=webname value=Project /
input type=hidden name=name value=backlog /
input type=hidden name=domain value=${domainId} /
input type=hidden name=cut value=${cut} /
Select topic : SELECT name=topic
  #foreach ($item in $topiclist)
#set 
($topic=$xwiki.getDocument(${item}).getObject(XWiki.TopicClass))
OPTION VALUE=${topic.id}$topic.get(name)/OPTION
  #end
/SELECT
input type=button value=Select 
onclick='{this.form.action=../../view/ + this.form.webname.value + / 
+ this.form.name.value + ?backlog= + this.form.backlog.value + 
domain= + this.form.domain.value + topic= + 
this.form.topic.value.substring(this.form.topic.value.lastIndexOf(${separator})+1)
 
+ cut= + this.form.cut.value; this.form.submit(); }'/
input type=button value=Edit 
onclick='{url=Project.+this.form.topic.value; 
this.form.action=${xwiki.getURL(url, inline)}; this.form.submit(); }' /
  /FORM

Note that the problem is only with the Edit button, the other is working 
fine.

Thanks in advance for your help.

Jean.

-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Invalid URL after a $xwiki.getURL() + deconnection

2009-02-24 Thread Jean Couteau
Vincent Massol a écrit :
 Hi Jean,

 I don't have the answer to your question but seen the questions you've  
 been asking I can deduce that you're doing some advanced usage of  
 XWiki :)
   
 That's great. I'm curious to know what you're using it for.
   
I don't know if advanced is the word, but indeed I use if for an 
application aimed to manage backlog for a scrum team.
It is used for two weeks now (in a  not complete and bugged version), 
and when I will have removed the annoying bugs, I think I will make it 
available on xwiki.org.

For now, it features backlog creation (with arborescence on the user 
stories), backlog planning, effort vote (for poker planning) and 
sprint/release assignment.

I plan to make it manage the dashboard, the task assignations, an 
automatic velocity and burndown chart calculation, an automatic roadmap 
building, and maybe other ideas that will come with the time ;).

Anyway this bug is the last that makes the application unstable. After 
solving it, I think I'll be able to make the application available for 
other users.
 Thanks
 -Vincent

 On Feb 24, 2009, at 10:48 AM, Jean Couteau wrote:

   
 Hi list,

 I have a really weird bug which is quite annoying and I don't find any
 solution to it :

 I want to edit a page in inline mode. I have a form to select the page
 to edit with a button. I use the $xwiki.getURL() method to get the  
 right
 URL. When i select my page and click on the edit button, I have an
 invalid URL error and i am deconnected. What is weird is that if I
 reconnect and actualize the page I can access it. The second weird  
 thing
 is that I use exactly the same method to edit other pages form other
 forms in the same first page and I do not have the problem. I am quite
 lost with this issue. I tried to recreate the URL as a string but I  
 have
 the same problem.

 I am thinking maybe this is a known bug in xwiki. If not maybe i am
 missing something somewhere. Please open my eyes on the obvious i am
 missing in my code :

 FORM method=POST action=
input type=hidden name=backlog value=${backlogId} /
input type=hidden name=webname value=Project /
input type=hidden name=name value=backlog /
input type=hidden name=domain value=${domainId} /
input type=hidden name=cut value=${cut} /
Select topic : SELECT name=topic
  #foreach ($item in $topiclist)
#set
 ($topic=$xwiki.getDocument(${item}).getObject(XWiki.TopicClass))
OPTION VALUE=${topic.id}$topic.get(name)/OPTION
  #end
/SELECT
input type=button value=Select
 onclick='{this.form.action=../../view/ + this.form.webname.value +  
 /
 + this.form.name.value + ?backlog= + this.form.backlog.value +
 domain= + this.form.domain.value + topic= +
 this.form.topic.value.substring(this.form.topic.value.lastIndexOf($ 
 {separator})+1)
 + cut= + this.form.cut.value; this.form.submit(); }'/
input type=button value=Edit
 onclick='{url=Project.+this.form.topic.value;
 this.form.action=${xwiki.getURL(url, inline)};  
 this.form.submit(); }' /
  /FORM

 Note that the problem is only with the Edit button, the other is  
 working
 fine.

 Thanks in advance for your help.

 Jean.
 
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

   


-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Rendering strings in inline mode

2009-02-23 Thread Jean Couteau
Dear all,

I am trying to render strings using velocity while i am in inline mode, 
but every time, i got an input form with my value inside.

How can i get my variable well displayed ?

Here is my piece of code (with different tries):

$context.setDisplayMode(view)

#set($a=${backlogId},${domainId},${topicId},${epicId},${temp})

$doc.display($a)

$a

a href =/xwiki2/bin/view/Project/addActor?usId=${a}Add an actor/a


(Note, a is not rendered when using $doc.display($a) and is always 
replaced by :

input size='30' id='XWiki.USClass_0_id' value='1,0,0,1,2' 
name='XWiki.USClass_0_id' type='text'/ instead of '1,0,0,1,2' )

Thanks in advance for your help

Jean

-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Rendering strings in inline mode

2009-02-23 Thread Jean Couteau
Guillaume Lerouge a écrit :
 Hi,

 On Mon, Feb 23, 2009 at 2:51 PM, Jean Couteau cout...@codelutin.com wrote:

   
 Dear all,

 I am trying to render strings using velocity while i am in inline mode,
 but every time, i got an input form with my value inside.

 How can i get my variable well displayed ?

 Here is my piece of code (with different tries):

 $context.setDisplayMode(view)

 #set($a=${backlogId},${domainId},${topicId},${epicId},${temp})

 $doc.display($a)

 $a

 a href =/xwiki2/bin/view/Project/addActor?usId=${a}Add an actor/a


 (Note, a is not rendered when using $doc.display($a) and is always
 replaced by :

 input size='30' id='XWiki.USClass_0_id' value='1,0,0,1,2'
 name='XWiki.USClass_0_id' type='text'/ instead of '1,0,0,1,2' )

 Thanks in advance for your help
 

 If I remember well you can get around this by using $property.getValue()
 instead of $doc.display since in inline mode $doc.display is turned into an
 input field by default.
   
I tried to get around this using the $context.setDisplayMode(view) 
(that should put my rendering in view mode when using $doc.display 
(according to the javadoc), but it displays nothing (quite weird though)

I have to use $property.getValue() ? but my variable is not a property 
or how can I transform it into a property ?

 I remember doing this in the bulletin board application a while ago, I'd
 need to check its code to find the exact API call to use.
   
I'll have a look into it.

Thanks for your help.


-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Rendering strings in inline mode

2009-02-23 Thread Jean Couteau
Guillaume Lerouge a écrit :
 On Mon, Feb 23, 2009 at 3:13 PM, Jean Couteau cout...@codelutin.com wrote:

   
 Guillaume Lerouge a écrit :
 
 Hi,

 On Mon, Feb 23, 2009 at 2:51 PM, Jean Couteau cout...@codelutin.com
   
 wrote:
 
   
 Dear all,

 I am trying to render strings using velocity while i am in inline mode,
 but every time, i got an input form with my value inside.

 How can i get my variable well displayed ?

 Here is my piece of code (with different tries):

 $context.setDisplayMode(view)

 #set($a=${backlogId},${domainId},${topicId},${epicId},${temp})

 $doc.display($a)

 $a

 a href =/xwiki2/bin/view/Project/addActor?usId=${a}Add an actor/a


 (Note, a is not rendered when using $doc.display($a) and is always
 replaced by :

 input size='30' id='XWiki.USClass_0_id' value='1,0,0,1,2'
 name='XWiki.USClass_0_id' type='text'/ instead of '1,0,0,1,2' )

 Thanks in advance for your help

 
 If I remember well you can get around this by using $property.getValue()
 instead of $doc.display since in inline mode $doc.display is turned into
   
 an
 
 input field by default.

   
 I tried to get around this using the $context.setDisplayMode(view)
 (that should put my rendering in view mode when using $doc.display
 (according to the javadoc), but it displays nothing (quite weird though)

 I have to use $property.getValue() ? but my variable is not a property
 or how can I transform it into a property ?
 


 Isn't XWiki.USClass_0_id a field in a XWiki object? If it is, then it's a
 property :-)
   
Indeed, the thing is that i tried to recreate the property using all 
those different id as i did not succeed in displaying it. The thing that 
is weird is that there was no link between $a and the property (they 
just had the same value) and xwiki made a link between them.
 I think you need to do something like:
 #set($a=${backlogId.getValue()},${domainId.getValue()},${topicId.getValue()},${epicId.getValue()},${temp.getValue()})
   
That did not work, but I get to make it work using that :

#set($a=$doc.getObject(XWiki.USClass).get(id))

  a href =/xwiki2/bin/view/Project/addActor?usId=${a}Add an actor/a

The thing that is strange is that I had a variable that was set with the 
value of id in my page (before inline displaying) and i was not able to 
display it after the inline displaying.

Anyway, it works now.

Thanks very much for your help.

Jean

-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Problem with setting space rights from Velocity

2009-02-17 Thread Jean Couteau
Hi,
 #foreach($newuser in $projectuserlist)
 #set ($myspace = $xwiki.getDocument(${projectname}.WebPreferences))
 #set ($rightsObject = $myspace.newObject(XWiki.XWikiGlobalRights))
   
I would use

#set ($rightsObject = $myspace.createNewObject(XWiki.XWikiGlobalRights))

 #set ($result = $rightsObject.set(levels, view,edit))
 #set ($result = $rightsObject.set(users, $newuser))
 ##set ($result = $rightsObject.set(allow, 1))
 $mydoc.save()
 #end
   

Hope this helps

Jean


-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Hibernate bug while trying to save modifications

2009-02-17 Thread Jean Couteau
Dear all,

I found a way around this problem.

I created a class with the same fields and a groovy script that takes 
all the objects of the previous class to save them into objects from the 
second class. Replace all the references to the first class by reference 
to the second class.

I was a little worried because I had hundreds of objects, but everything 
went  fine.

Hope this can help if somebody have the same problem.

Jean Couteau a écrit :
 Hi all,

 I found a really annoying bug today, and I am really lost solving it :

 I have created an application based on xwiki, i tried it on 3 different 
 test servers, using the export import between each server. My 
 application generate a lot of pages/objects. When I use the 
 export/import between the servers, I import only the application, not 
 the data. Everything worked fine, but I imported the application on the 
 prod server friday. Since then, I can create an object. When i try 
 modify it, I have the following error and stack trace :

 A problem occured while trying to service your request. Please contact 
 the support if this happens again.

 Detailed information:

 Error number 3201 in 3: Exception while saving document 
 Project.0,0,0,3,0
 Wrapped Exception: Row was updated or deleted by another transaction (or 
 unsaved-value mapping was incorrect): [com.xpn.xwiki.objects.LongProperty#


 ]
 com.xpn.xwiki.XWikiException: Error number 3201 in 3: Exception while saving 
 document Project.0,0,0,3,0
 Wrapped Exception: Row was updated or deleted by another transaction (or 
 unsaved-value mapping was incorrect): [com.xpn.xwiki.objects.LongProperty#


 ]
   at 
 com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:570)
   at 
 com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:131)
   at 
 com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:124)
   at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1268)
   at com.xpn.xwiki.web.SaveAction.save(SaveAction.java:173)
   at com.xpn.xwiki.web.SaveAction.action(SaveAction.java:190)
   at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:215)
   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.doPost(ActionServlet.java:432)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
   at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at 
 com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:287)
   at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
   at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at 
 com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
   at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
   at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
   at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
   at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
   at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
   at 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
   at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
   at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
   at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
   at 
 org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
   at 
 org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
   at 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
   at java.lang.Thread.run(Thread.java:619)


 Wrapped Exception:

 org.hibernate.StaleObjectStateException: Row was updated or deleted by 
 another transaction (or unsaved-value mapping was incorrect): 
 [com.xpn.xwiki.objects.LongProperty#


 ]
   at 
 org.hibernate.persister.entity.AbstractEntityPersister.check

[xwiki-users] Hibernate bug while trying to save modifications

2009-02-16 Thread Jean Couteau
)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:234)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:142)
at 
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at 
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
at 
org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
at 
com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:816)
at 
com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:787)
at 
com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:560)
at 
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:131)
at 
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:124)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1268)
at com.xpn.xwiki.web.SaveAction.save(SaveAction.java:173)
at com.xpn.xwiki.web.SaveAction.action(SaveAction.java:190)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:215)
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.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at 
com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:287)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at 
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
at 
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
at 
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)



I can create and modify other kind of objects generated by this application 
without any problem.

In the history of the page/object, I have a version 1.1 created by me before 
the import on the wiki (the objects have been created today, the import was 
friday).

I am not admin on the server, but the last test was on another instance of 
xwiki on the same server and the configs are the same.

Did somebody already have this problem ? How can I solve that ?

Thanks in advance.

Jean



-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Changing properties on a class

2009-02-13 Thread Jean Couteau
Hi all,

I have a class with a property which is a long and i want to change it 
to float or double, but I got a 'A problem occured while trying to 
service your request. Please contact the support if this happens again. 
' error when i try to save the change

I think that maybe that comes from the fact that I have some entities of 
this class in the database. Is this a bug ? If I remove all the entities 
of this class, will I be able to make the change ?

Hope somebody can help.

Best regards,
Jean

-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Changing properties on a class

2009-02-13 Thread Jean Couteau
Thanks a lot,

I was hoping for a different answer, but if it's the way it is

I will have to create a new property then...

hel-o a écrit :
 Hi,

 you cant change the property type and you cant delete properties

 http://n2.nabble.com/Deleting-Class-properties-tc508025.html#none

 I also had a similar problem:

 http://n2.nabble.com/Convert-XE-to-XEM-tc2169510.html#a2200013

 Changing it back didnt work i finaly changed it in the database.

 So if you want to change a property type you have to create a new property
 with that type and start using that instead of the old. The old property
 beomes obsolet (but you cannot delete it).

 So planning what property types to use is very importent if you create
 classes.-)

 hel. 
   


 Jean Couteau wrote:
   
 Hi all,

 I have a class with a property which is a long and i want to change it 
 to float or double, but I got a 'A problem occured while trying to 
 service your request. Please contact the support if this happens again. 
 ' error when i try to save the change

 I think that maybe that comes from the fact that I have some entities of 
 this class in the database. Is this a bug ? If I remove all the entities 
 of this class, will I be able to make the change ?

 Hope somebody can help.

 Best regards,
 Jean

 -- 
 
 Jean Couteau
 Code Lutin - http://www.codelutin.com
 44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
 Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users


 


 -
 Helmut Lehner
 h...@hel.at

   


-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Bug on the sortable filterable table javascript.

2009-02-09 Thread Jean Couteau
Dear all,

I found a bug on the sortable filterable table : i have different 
options (PO done and done) in a table cell. When using the filterable 
option,  the done option do not appear in the selection.

I went searching in the tablefilterNsort.js file, and it seems it comes 
from the PopulateOptions method, and more particularly from the search 
method in the celldata check : 
if(OptArray.toString().toUpperCase().search(cell_data.toUpperCase()) == -1)
// checks if celldata is already in array

The method search returns the number of occurence of the searched 
parameter, in my case, it returns 1 for done, but i would like -1 (my 
option is different). I tried changing the test (if its different to -1, 
addind a test on the length), but did not found an answer.

I think this is a quite serious matter, as this problem may be found 
quite often. Somebody had the same problem ? Somebody is a master of 
javascript (i am not unfortunately) and might help on this ?

Best regards

Jean.

-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Bug on the sortable filterable table javascript.

2009-02-09 Thread Jean Couteau
Ok,

i found a solution, it is ugly, and i hope it does not add problems 
elsewhere, but at least it works for me. Here it is (only the 
PopulateOptions method) :

function PopulateOptions(id,cellIndex,ncells)
/*
- populates select
- adds only 1 occurence of a value
=*/
{
var t = document.getElementById(id);
var start_row = getStartRow(id);
var row = t.getElementsByTagName(tr);
var OptArray = new Array();
var optIndex = 0; // option index
 
for(var k=start_row; krow.length; k++)
{
var cell = getChildElms(row[k]).childNodes;
var nchilds = cell.length;
 
if(nchilds == ncells){// checks if row has exact cell #
 
for(var j=0; jnchilds; j++)// this loop retrieves cell data
{
if(cellIndex==j)
{
var cell_data = getCellText(cell[j]);
var added = 0;
if(OptArray.length==0)
{
added = 1;
}
else
{
added = 1;   
for(var 
i=0;iOptArray.length;i++)//run through the option array
{
if(OptArray[i].toUpperCase() == 
cell_data.toUpperCase())// checks if celldata is already in array 
{
added = 0;
}
}//for i
}//else
if(cell_data==)
{
added=0;
}
if(added==1) // if celldata is not 
already in array
{
optIndex++;
OptArray.push(cell_data);
var currOpt = new 
Option(cell_data,cell_data,false,false);

document.getElementById(flt+cellIndex+_+id).options[optIndex] = 
currOpt;
}
}//if cellIndex==j
}//for j
 
}//if
 
}//for k
}

With that, no problem if one option is a substring of an other one.

Hope this helps other people too.

Jean Couteau a écrit :
 Dear all,

 I found a bug on the sortable filterable table : i have different 
 options (PO done and done) in a table cell. When using the filterable 
 option,  the done option do not appear in the selection.

 I went searching in the tablefilterNsort.js file, and it seems it comes 
 from the PopulateOptions method, and more particularly from the search 
 method in the celldata check : 
 if(OptArray.toString().toUpperCase().search(cell_data.toUpperCase()) == -1)
 // checks if celldata is already in array

 The method search returns the number of occurence of the searched 
 parameter, in my case, it returns 1 for done, but i would like -1 (my 
 option is different). I tried changing the test (if its different to -1, 
 addind a test on the length), but did not found an answer.

 I think this is a quite serious matter, as this problem may be found 
 quite often. Somebody had the same problem ? Somebody is a master of 
 javascript (i am not unfortunately) and might help on this ?

 Best regards

 Jean.

   


-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Add a user on a User List property

2009-02-05 Thread Jean Couteau
Any clue on this issue ?

Jean Couteau a écrit :
 Dear all,

 I have a class with a UserList attribute. I am trying to add users to 
 this list from an other page with no success. I try using the following 
 code :

 #if($joinTask!=)
   #set($taskDoc = $xwiki.getDocument(Project.${joinTask}))
   #set($taskObj = $taskDoc.getObject(XWiki.TaskClass))
   #set($list = $taskObj.get(assignedPeople))
   $list.add($xwiki.getUser())
   $taskObj.set(assignedPeople, ${list})
   $taskDoc.save()
 #end

 but $list.add does not exist so I tried differently :

 #if($joinTask!=)
   #set($taskDoc = $xwiki.getDocument(Project.${joinTask}))
   #set($taskObj = $taskDoc.getObject(XWiki.TaskClass))
   #set($list = $util.getArrayList())
   $list.add($xwiki.getUser())
   $taskObj.set(assignedPeople, ${list})
   $taskDoc.save()
 #end

 but I have a casting exception.

 I had a look on the velocity website, on this list archives,... with no 
 success

 My question is : Can I add users like that or the only way is through 
 the edit panel and if yes, what is my mistake ?

 Best regards,

 Jean

   


-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Filtering/sorting tables on toucan skin.

2009-02-04 Thread Jean Couteau
Hi list,

I tried adding filtering/sorting to tables on the toucan skin. I see 
that the feature is now present only on albatross skin. Is there an easy 
way to add it to the toucan skin ?

Best regards
Jean

-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Filtering/sorting tables on toucan skin.

2009-02-04 Thread Jean Couteau
Vincent Massol a écrit :
 Hi Jean,

 On Feb 4, 2009, at 11:55 AM, Jean Couteau wrote:

   
 Hi list,

 I tried adding filtering/sorting to tables on the toucan skin. I see
 that the feature is now present only on albatross skin. Is there an  
 easy
 way to add it to the toucan skin ?
 

 Toucan skin extends the Albatross skin so you also have it in Toucan.

 What's not working?
   
I just found my mistake, the thing is I adapted the todo application 
tutorial on the server side to my application, and did not put an id to 
my table, so there was no sorting and filtering on it, by putting an id 
on my table, everything went back to do what it should do I really did 
not think that it could come from there

Sorry to have bothered you and thanks for  you quick response.


-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Problem with table macro

2009-02-02 Thread Jean Couteau
Dear list,

I have a problem with tables : i have a foreach method to create a table 
for each instance. There is an other foreach to create the content 
inside the table. The first table is well rendered, but after, i have 
the following :

table: TableMacro: missing table content
ID | Task | Description | Nb hours | Edit 2,0,8,0,3,0 | testing | | |
table: TableMacro: missing table content

My code is :

#foreach ($link in $allsprintLinks)

  some code

  {table}
ID | Task | Description | Nb hours | Edit
#foreach ($item in $tasks)
  #set($task=$xwiki.getDocument($item).getObject(TaskClass))
  $task.id | $task.get(name) | $task.description | $task.nbHourInit |
#end
  {table}
#end


Any clue on what could be wrong ?

-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] insertText() or setDefaultTemplate() ? and how ?

2009-01-27 Thread Jean Couteau

 All the available methods are described (well, at least listed) in our 
 javadoc.
 http://platform.xwiki.org/xwiki/bin/download/DevGuide/API/xwiki-core-1.7.1-javadoc.zip/index.html
 - Document  void setContent(java.lang.String content)Jean-Vincent Drean a 
 écrit :
   
I ran throught the javadoc and thought of insertText but not setContent, 
that is why I was a bit lost.

 #if($createDomain!=)
  #set($newDoc=$xwiki.createDocument())
  #set($newName=Project.+$newDomainId)
 

 You can't manipulate strings like this with velocity, see bellow.
   
Why ? It works quite well like that.

 You don't have to create then rename a document, see bellow.
   
In the javadoc, the createDocument method does not have any parameter, 
and without parameter, it is the Main.WebHome page that is affected, 
that is why I renamed the page after the creation.
 Anyway what you should do here is creating a page with the default
 content and object (and call it a template) and copy it in your
 script.

 #if($createDomain!=)
   $xwiki.copyDocument(Project.ProjectTemplate, Project.${newDomainId})
   #set($domainDoc = $xwiki.Project.${newDomainId})
   #set($domainObj = $newDoc.getObject(XWiki.DomainClass))
   $domainObj.set(id, $newDomainId)
   $domainObj.set(name,$createDomain)
   $domainDoc.save()
 #end

   
I tried putting my template in my page using setDefaultTemplate() but 
with no success, I did not thought of the copy method. Thanks for the 
hint. Anyway, here is the code I put (everything works fine):

#if($createDomain!=)
  $xwiki.copyDocument(XWiki.DomainClassTemplate, Project.${newDomainId})
  #set($domainDoc = $xwiki.getDocument(Project.${newDomainId}))
  #set($domainObj = $domainDoc.newObject(XWiki.DomainClass))
  $domainObj.set(id, $newDomainId)
  $domainObj.set(name,$createDomain)
  $domainDoc.save()
#end

By not putting the object in the template, I can choose not to have one 
on the page (we never know) and the code is the same size.

Anyway, I ran through the javadoc, but what you said is true, the method 
are only listed (and maybe not all the methods), so I had to guess on 
the aim of methods and the goal of the parameters, with only their 
names, that is a bit long and not intuitive, a small effort on the 
javadoc can help a lot ;). I will try help on this if I have time once I 
finish my project.
 JV.
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

   


-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] insertText() or setDefaultTemplate() ? and how ?

2009-01-26 Thread Jean Couteau
Dear all,

I am trying to create a document from a page, with a template and an 
object attached, but without having to quit the said page.

I generate fine the new document and the object with the values i want 
for the properties, but i did not succeed in putting text in the 
document, i tried using $newDoc.setDefaultTemplate and 
$newDoc.insertText but no success at all.

I post here my piece of code, any hint will be appreciated (after a few 
hours on this, i am a bit lost):

#if($createDomain!=)
  #set($newDoc=$xwiki.createDocument())
  #set($newName=Project.+$newDomainId)
  $newDoc.rename($newName)
  $newDoc.insertText(#includeForm(\XWiki.DomainClassSheet\),)
  #set($newDoc=$xwiki.getDocument($newName))
  #set($newObject=$newDoc.newObject(XWiki.DomainClass))
  $newObject.set(id,$newDomainId)
  $newObject.set(name,$createDomain)
  $newDoc.save()
#end

Jean

-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Find all objects of a class (more than one object on a page)

2009-01-16 Thread Jean Couteau
Thanks for the hint, I did not try the getObjects method but getObject. 
Problem solved.

Marius Dumitru Florea a écrit :
 Hi,

 See the javadoc for Document here http://tinyurl.com/9hxpot . Pay 
 attention especially to getObject* methods. For each document retrieved 
 with your HQL query you can call getObjects(Space.MyClass).

 Hope this helps,
 Marius

 Jean Couteau wrote:
   
 Dear all,

 I am a bit lost with hql requests.

 What I would like to do is find all the objects of Space.MyClass (even 
 if there are more than one object on a page).

 I tried to play with

 #set ($sql = , BaseObject as obj where obj.name=doc.fullName and 
 obj.className='Space.MyClass')

 and then

 #foreach ($item in $xwiki.searchDocuments($sql))

 to display the results.

 But the only thing i can get is the documents.

 Is there a searchObjects method or something like that ?

 Any hint or solution ?

 Jean

 
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

   


-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Tags

2009-01-16 Thread Jean Couteau
Hi Ajdin,

as stated before, I had the same problem on my xwiki (1.7.0). I Don't 
know why but know I can display all the tags (I even use the tag cloud 
piece of code I found on xwiki.org).

How many pages have you tagged ? If I remember well, I had arround 10 
tags when xwiki 'decided' that I could see them.

Best regards.

Ajdin Brandic a écrit :
 Tags facility to display all tags in XWiki is not working as I mentioned 
 before.  I would really like someone from the development team to answer this 
 post as there are others with the same problem.  I searched internet for 
 'xwiki tags' and 'how to use xwiki tags' but get tons of pages which display 
 No documents have been tagged yet

 I created an API that searches through Tags, I added some Velocity code to 
 view/delete tags on a page, but cannot get the system to display all tags 
 (Well I can on v1.6 but myxwiki is using the latest version).

 Ajdin

 -Original Message-
 From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of 
 Jean Couteau
 Sent: 29 December 2008 13:10
 To: XWiki Users
 Subject: Re: [xwiki-users] Tags

 Hi Adjin,

 I do not know the reason, but I have exactly the same problem...

 Best regards,
 Jean

 Ajdin Brandic a écrit :
   
 Hi

 I've tried the same as below on my live site 
 http://patternlanguagenetwork.myxwiki.org; but no joy.  Is there a reason 
 why tags are not showing?  I could not find any info on the web.

 Ajdin


 -Original Message-
 From: users-boun...@xwiki.org on behalf of Ajdin Brandic
 Sent: Wed 24/12/2008 12:43
 To: XWiki Users
 Subject: [xwiki-users] Tags
  
 Hi
  
 I'm playing with tags and noticed something odd.  I've added tags to a 
 few pages but when I go to xwiki/bin/view/Main/Tags I always get 
 message No documents have been tagged yet. To tag a document, edit it 
 and enter the tags 
  
 I've searched all the posts but found only one person having the same 
 problem in April 2008 but no one answered.
  
 In the end I found the problem in the page itself
  
 ##set($sql = select distinct elements(prop.list) from BaseObject as 
 obj, DBStringListProperty as prop where obj.className='XWiki.TagClass'
 and obj.id=prop.id.id and prop.id.name='tags')
  
 Note at the end  and prop.id.name='tags'   should be  and 
 prop.name='tags' 
  
 Example:
 http://patternlanguagenetwork.myxwiki.org/xwiki/bin/view/Main/Tags
 There are some tags added alredy but none displayed.
  
 Also is there a list of all Hibernate Object names that relate to
 database tables (ie. DBStringListProperty = xwikilistitems   or
 LargeStringProperty = xwikilargestrings).  I am trying to work with 
 xwiki but its documentation is patchy and sometimes out of date so I 
 try to find info in the database to understand xwiki structure but get 
 stuck when I want to get some info out using HQL.  I usualy spend 
 hours looking through Volocity scripts.
  
 Ajdin Brandic
 Coventry University
  
  
 

 NOTICE

 This message and any files transmitted with it is intended for the addressee 
 only and may contain information that is confidential or privileged. 
 Unauthorised use is strictly prohibited. If you are not the addressee, you 
 should not read, copy, disclose or otherwise use this message, except for 
 the purpose of delivery to the addressee. 

 Any views or opinions expressed within this e-mail are those of the author 
 and do not necessarily represent those of Coventry University.
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

   
 --
 --

 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users
   
 

 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

   


-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Find all objects of a class (more than one object on a page)

2009-01-14 Thread Jean Couteau
Dear all,

I am a bit lost with hql requests.

What I would like to do is find all the objects of Space.MyClass (even 
if there are more than one object on a page).

I tried to play with

#set ($sql = , BaseObject as obj where obj.name=doc.fullName and 
obj.className='Space.MyClass')

and then

#foreach ($item in $xwiki.searchDocuments($sql))

to display the results.

But the only thing i can get is the documents.

Is there a searchObjects method or something like that ?

Any hint or solution ?

Jean

-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Using one Class and Template for creating documents in more than one space...

2009-01-13 Thread Jean Couteau
Hi, i am quite new to XWiki, but i hope i can help.
 If I create a class similar to the one in the FAQ tutorial but add one or
 more new properties to define a space and category could I use this class
 and associated design sheet and template to create FAQ documents for more
 than one space?
   
I used this form to create blog entries from Main.WebHome :

Add a news : form action= id=newdoc method=post
div
input type=hidden name=parent value=Blog.WebHome /
input type=hidden name=template value=XWiki.ArticleClassTemplate /
input type=hidden name=sheet value=1 /
input type=hidden name=webname value=Blog/
input type=hidden name=name value=/
input type=text name=title value=news name size=18/
input type=button value=Add onclick='if 
(updateName(this.form.title,this.form.name)) { action=../../inline/ + 
this.form.webname.value + / + this.form.name.value; 
this.form.submit(); }' /
/div
/form

if you change the webname value you should be able to create entries in 
other spaces using the ArticleClassTemplate. If you replace the 
XWiki.ArticleClassTemplate with your template, I guess you should create 
an entry of your template in the said space.
 Is it possible to programatically determine what space a document should be
 created in when it is saved?
   
I think this is not possible, but maybe you can create the link with 
conditions so that it creates the page following the link.
 Are there any simple examples of how something like this would be done? I've
 gone through just about every piece of documentation but the development
 process is still unclear.
   
Write velocity script to determine your $space and $page variables,

write a [link$space.$page] and this should work.

I am not sure about what i am writing but I would investigate this way.

Hope this helps

Jean

-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Cannot show calendar events on Main.WebHome

2009-01-06 Thread Jean Couteau
Sergiu Dumitriu a écrit :
 Jean Couteau wrote:
   
 Dear all,

 i am playing with the calendar to do what i thought was quite simple, 
 but i am stuck. Some explanations :

 I am trying to put the calendar table on my wiki home page, without the 
 event list or the add event form.

 What i have done is :

 - add a section between calendar and event list on XWiki.CalendarEvent
 - use code to retrieve only the first section of this document and 
 render it :

 #set( $doc1=$xwiki.getDocument(XWiki.CalendarSheet).getDocument())
 #set ($content = $doc1.getContentOfSection(1))
 #set( $doc2=$xwiki.getDocument(Main.EventCalendar))
 $xwiki.renderText($content, $doc2)

 It's nice, i have my calendar table rendered, but no sign of my events.

 I tried to change the $doc2 variable to see if it was a context problem 
 or something but nothing worked out.

 Am i missing something ?
 

 The calendar plugin does not work well with $xwiki.renderText, since it
 uses a different way of getting the current document than the one used
 by $xwiki.renderText.

 TO fix this, edit XWiki.CalendarSheet and replace:

 $cview.getHTMLCalendar($cparams, )

 with:

 $cview.getHTMLCalendar($cparams, $doc, )

   
It works perfectly. Lot of thanks for this quick response.

-- 

Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Tags

2008-12-29 Thread Jean Couteau
Hi Adjin,

I do not know the reason, but I have exactly the same problem...

Best regards,
Jean

Ajdin Brandic a écrit :
 Hi

 I've tried the same as below on my live site 
 http://patternlanguagenetwork.myxwiki.org; but no joy.  Is there a reason 
 why tags are not showing?  I could not find any info on the web.

 Ajdin


 -Original Message-
 From: users-boun...@xwiki.org on behalf of Ajdin Brandic
 Sent: Wed 24/12/2008 12:43
 To: XWiki Users
 Subject: [xwiki-users] Tags
  
 Hi
  
 I'm playing with tags and noticed something odd.  I've added tags to a
 few pages but when I go to xwiki/bin/view/Main/Tags I always get 
 message No documents have been tagged yet. To tag a document, edit it
 and enter the tags 
  
 I've searched all the posts but found only one person having the same
 problem in April 2008 but no one answered.
  
 In the end I found the problem in the page itself
  
 ##set($sql = select distinct elements(prop.list) from BaseObject as
 obj, DBStringListProperty as prop where obj.className='XWiki.TagClass'
 and obj.id=prop.id.id and prop.id.name='tags')
  
 Note at the end  and prop.id.name='tags'   should be  and
 prop.name='tags' 
  
 Example:
 http://patternlanguagenetwork.myxwiki.org/xwiki/bin/view/Main/Tags
 There are some tags added alredy but none displayed.
  
 Also is there a list of all Hibernate Object names that relate to
 database tables (ie. DBStringListProperty = xwikilistitems   or
 LargeStringProperty = xwikilargestrings).  I am trying to work with
 xwiki but its documentation is patchy and sometimes out of date so I try
 to find info in the database to understand xwiki structure but get stuck
 when I want to get some info out using HQL.  I usualy spend hours
 looking through Volocity scripts.
  
 Ajdin Brandic
 Coventry University
  
  
 

 NOTICE

 This message and any files transmitted with it is intended for the addressee 
 only and may contain information that is confidential or privileged. 
 Unauthorised use is strictly prohibited. If you are not the addressee, you 
 should not read, copy, disclose or otherwise use this message, except for the 
 purpose of delivery to the addressee. 

 Any views or opinions expressed within this e-mail are those of the author 
 and do not necessarily represent those of Coventry University.
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

   
 

 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users
   

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users