Re: [xwiki-users] xwiki basic documentation

2008-02-22 Thread Vincent Massol


On Feb 22, 2008, at 11:29 PM, Honna Segel wrote:

I don't seem to be able to find basic documentation of xwiki  
concepts, such as 'space', 'object'. Both of those words mean  
something to me, but it's not clear what they mean in the xwiki  
world.  Does xwiki presuppose familiarity with some other body of  
documentation? Where can I get this reference material?


We don't have any glossary yet. Feel free to start one in http://dev.xwiki.org/xwiki/bin/view/Drafts/ 
 if you want.


However we do have descriptions of the terms you mention;

* Check http://platform.xwiki.org/xwiki/bin/view/Features/
* And for objects , etc, see the dev guide at:
http://platform.xwiki.org/xwiki/bin/view/DevGuide/

Thanks
-Vincent___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] xwiki basic documentation

2008-02-22 Thread Honna Segel
I don't seem to be able to find basic documentation of xwiki concepts, such
as 'space', 'object'. Both of those words mean something to me, but it's not
clear what they mean in the xwiki world.  Does xwiki presuppose familiarity
with some other body of documentation? Where can I get this reference
material?
 
Regards,
 
Honna
 
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] New installation - XAR upload failing

2008-02-22 Thread Doug Donohoe

I'm a first time installer, running 1.3M2 and trying to upload the XAR file.
I'm getting the following error in the xwiki.log file (which, oddly, is in
the tomcat base dir instead of the tomcat/logs dir).

Also, when I try and create users, the form submits, but it doesn't appear
to be saving because no users are listed after 'save'.

I'm running on linux, MySQL 4.1 and JDK 1.6.  The DB was created
successfully and I was able to edit the front page.

Any ideas?  Should I try 1.2 instead?

Thanks,

-Doug

ERROR lucene.IndexUpdater- invalid parameters given to add:
XWiki.Import, null, {grouplist={xwiki:XWiki.XWikiGuest=[]},
fileuploadlist=[name=null,
StoreLocation=/usr/local/tomcat/temp/upload_720660f3_11842ccbd27__8000_0003.tmp,
size=86bytes, isFormField=true, FieldName=xredirect, name=null,
StoreLocation=/usr/local/tomcat/temp/upload_720660f3_11842ccbd27__8000_0004.tmp,
size=41bytes, isFormField=true, FieldName=filename,
name=xwiki-enterprise-wiki-1.3-milestone-2.xar,
StoreLocation=/usr/local/tomcat/temp/upload_720660f3_11842ccbd27__8000_0005.tmp,
size=351930bytes, isFormField=false, FieldName=filepath],
[EMAIL PROTECTED],
[EMAIL PROTECTED], baseskin=albatross,
[EMAIL PROTECTED],
ajax=false, locale=en, doc=XWiki.Import, mainxwiki=xwiki, skin=toucan,
[EMAIL PROTECTED],
[EMAIL PROTECTED] 
-- 
View this message in context: 
http://www.nabble.com/New-installation---XAR-upload-failing-tp15641651p15641651.html
Sent from the XWiki- Users mailing list archive at Nabble.com.

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


Re: [xwiki-users] Anyone is successful when he install xwiki on Oracle 9i?

2008-02-22 Thread Vincent Massol
AFAIK we don't support Oracle 9i out of the box, only 10g. It doesn't  
mean it's not possible to find a good HBM config for it, just that we  
haven't done it as part of the XWiki project (if you check xwiki.org  
you'll see a  config for 10g only).


-Vincent

On Feb 21, 2008, at 3:27 PM, Sergiu Dumitriu wrote:


Hi,

Did you properly configure the hibernate configuration file?
hibernate.cfg.xml
The distributed file uses the hibernate 10g Dialect.

Liu Aijun wrote:

Anyone is successful when install on Oracle 9i?

I searched this maillist,and tryed several solution, but I failed  
runing

xwiki with Oracle 9i.

Are there any new solutions? =
I have tryed two version:
xwiki 1.2.2and   xwiki 1.3m2.
Oracle 9.2.x.x , Oracle JDBC driver version:Oracle 10.0.1.0

Error Message:
Error number 3201 in 3: Exception while saving document Main.WebHome
Wrapped Exception: could not update:
[com 
.xpn 
.xwiki 
.doc.rcs.XWikiRCSNodeContent#component[docId,version1,version2] 
{docId=-114121954,

version2=1, version1=1}]
com.xpn.xwiki.XWikiException: Error number 3201 in 3: Exception while
saving document Main.WebHome
Wrapped Exception: could not update:
[com 
.xpn 
.xwiki 
.doc.rcs.XWikiRCSNodeContent#component[docId,version1,version2] 
{docId=-114121954,

version2=1, version1=1}]
   at
com 
.xpn 
.xwiki 
.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:455)



   at
com 
.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java: 
97)

   at
com 
.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java: 
91)

   at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1077)
   at com.xpn.xwiki.web.SaveAction.save(SaveAction.java:120)
   at
com 
.xpn 
.xwiki.web.SaveAndContinueAction.action(SaveAndContinueAction.java: 
64)



   at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:187)
   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:710)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   at
org 
.apache 
.catalina 
.core 
.ApplicationFilterChain 
.internalDoFilter(ApplicationFilterChain.java:290)



   at
org 
.apache 
.catalina 
.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: 
206)



   at
com 
.xpn 
.xwiki 
.web 
.SetCharacterEncodingFilter 
.doFilter(SetCharacterEncodingFilter.java:117)



   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:175)



   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: 
263)

   at
org 
.apache.coyote.http11.Http11Processor.process(Http11Processor.java: 
844)

   at
org.apache.coyote.http11.Http11Protocol 
$Http11ConnectionHandler.process(Http11Protocol.java:584)



   at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java: 
447)

   at java.lang.Thread.run(Thread.java:619)


Wrapped Exception:

java.sql.SQLException: ORA-01483: DATE 或 NUMBER 赋值变量的长度无效

   at
oracle 
.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)

   at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
   at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
   at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
   at
oracle 
.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java: 
213)



   at
oracle 
.jdbc 
.driver 
.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1117)



   at
oracle 
.jdbc 
.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java: 
1270)



   at
oracle 
.jdbc 
.driver 
.OraclePreparedStatement 
.executeInternal(OraclePreparedStatement.java:3415)



   at
oracle 
.jdbc 
.driver 
.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java: 
3498)



   at
org 
.apache 
.commons 
.dbcp 
.DelegatingPreparedStatement 
.executeUpdate(DelegatingPreparedStatement.java:101)





--
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


___

Re: [xwiki-users] Latex html in editor for math formulas?

2008-02-22 Thread Axel
On Thu, Feb 21, 2008 at 5:07 AM, Sergiu Dumitriu <[EMAIL PROTECTED]> wrote:
> Paul Libbrecht wrote:
...
>  http://math.etsu.edu/LaTeXMathML/LaTeXMathML.js -> LaTeX => MathML
>  converter in JavaScript. The code should be converted to Java, so that
>  the whole process can be done in the native language for XWiki.
Did someone test this as a starting point? (I've never used it)
http://scenari-platform.org/svn/dev-core/trunk/Jav_EXT/com/scenari/ext/latex/


-- 
Axel Kramer
WikiBlog: http://www.groovy-news.org/e/page/axelclk
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] [XE 1.2.2] Space characters trimmed in attachmentnames

2008-02-22 Thread Jean-Vincent Drean
> Ok, thanks Jean-Vincent,
>  IMO temporary fix is worse than initial issue ... :/
>

Well this temporary fix isn't perfect but still better than the
blocking issues that were raised before : undeletable attachments,
unembeddable images, etc.
BTW may be we should clear the name but keep the spaces (which aren't
a problem), wdyt ?

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


Re: [xwiki-users] [XE 1.2.2] Space characters trimmed in attachmentnames

2008-02-22 Thread BOUSQUET Jeremie
Ok, thanks Jean-Vincent,
IMO temporary fix is worse than initial issue ... :/

Jeremie



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jean-Vincent 
Drean
Sent: vendredi 22 février 2008 10:12
To: XWiki Users
Subject: Re: [xwiki-users] [XE 1.2.2] Space characters trimmed in 
attachmentnames

> Hello,
>
> Don't know if it's a bug or an evolution, but after migrating my xwiki to
> 1.2.2, when I attach a new file to a page, all spaces characters are trimmed
> from the name. I didn't found anything about that in Jira.
> For example "My Doc Attached.doc" gets renamed to "MyDocAttached.doc".

http://jira.xwiki.org/jira/browse/XWIKI-2090
http://jira.xwiki.org/jira/browse/XWIKI-2087

The use of the clearName method for attachment names is a temporary
fix until the resolution of all our encoding issues.

> I see at least one issue coming from this : if you attach the same file it's
> not considered the same because it's renamed. Your existing links also link
> to the previous version, and it's not easy to find by end-user.
> And anyway you don't want the file to be renamed when attached ...

Yes this is a drawback of this fix.

JV.
___
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


Re: [xwiki-users] Printing sections

2008-02-22 Thread Jerome Velociter
Hi Vito,

The best place to contribute this macro is http://code.xwiki.org.
Just click the "add" button under Latest macros, fill the form, and you
will be done.

Thank you,
Jerome.

> Hi all,
>
> I've written a macro that allows to print just one section from an
> xwiki-page.
> I don't know if someone could find it useful, anyway, here it is.
>
> ---
> #macro(allowPrintSection)
>
> 
>   
>   
> #set ($i = 0)
> #set ($tocData = ${doc.getTOC(2, 2, false)})
> #foreach ($tocEntry in $tocData.entrySet())
>   #set ($i = $i+1)
>value="$i">$xwiki.parseContent($tocEntry.value.text)
> #end
>   
>   
> 
>
> #if($request.printSection)
>   #set ($sections = $doc.getContent())
>   #set ($i = 0)
>   #foreach ($section in $sections.split("
> 1.1 "))
> #if ($i == $xwiki.parseInt($request.printSection))
>   #set ($newContent = $section)
> #end
> #set ($i = $i+1)
>   #end
>   #set ($newContent = "1.1 "+$newContent)
>   #set ($newDoc = $xwiki.getDocument("Main.PRINT_tmpSectionToPrint"))
>   #if ($newDoc == $xwiki.getNull())
> #if (!$xwiki.copyDocument($request.pageName,
> "Main.PRINT_tmpSectionToPrint"))
>   *Error while printing section...*
> #end
>   #end
>   $newDoc.setContent($newContent)
>   $newDoc.save()
>   Section ready to be printed: click here.
> #end
> #end
>
>
> Any ideas or suggestions are welcome!
> Vito
>
> --
> Vitantonio Messa
> +358 46 889 48 49 - [EMAIL PROTECTED]
> COSS - The Finnish Centre for Open Source Solutions
> @ Technology Centre Hermia Ltd.
> Hermiankatu 1, FIN-33720 Tampere, FINLAND
>
> ___
> 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


Re: [xwiki-users] Bulletin Board cannot display topic title and first post !?

2008-02-22 Thread [Ricardo Rodriguez] Your EPEC Network ICT Team

Guillaume Lerouge wrote:


The point seems to be how $bbdoc is assigned within the control
structure #foreach. Does this make sense for you? Thanks!


I must admit I have no idea why the code behaves this way, but since 
your code apparently works better than mine I updated the XAR using it 
:-) -> if it works let's use it ;-)

Thanks! After all this is about collaboration!

The point is that $bbdoc gets the value of the first granted document, 
let's say [EMAIL PROTECTED], and this is the value used 
for the no-granted entries from this point onwards. It will be great to 
know why does this happen. Let's hope others have sometime to jump in 
here and solve the doubt.


Cheers,

Ricardo

--
Ricardo Rodríguez
Your EPEC Network ICT Team

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


Re: [xwiki-users] Bulletin Board cannot display topic title and first post !?

2008-02-22 Thread Guillaume Lerouge
Hi Ricardo,

thanks for taking the time to test stuff and sort it out :-)

The point seems to be how $bbdoc is assigned within the control
> structure #foreach. Does this make sense for you? Thanks!


I must admit I have no idea why the code behaves this way, but since your
code apparently works better than mine I updated the XAR using it :-) -> if
it works let's use it ;-)

Thanks for your help,

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


Re: [xwiki-users] Bulletin Board cannot display topic title and first post !?

2008-02-22 Thread [Ricardo Rodriguez] Your EPEC Network ICT Team
[Ricardo Rodriguez] Your EPEC Network ICT Team wrote:
> As for the "bug", I have not been able yet to find a pattern. It happens 
> with some users, but not with others. And I am not able to find the 
> differences between them concerning rights assignments. Come back as 
> soon as possible.
>
> Thanks!
>   
The differences comes from the number/order of the spaces each user has 
access to. Given three fora, each of them with its own space, see these 
results...

José Carlos can only view the first one:
http://mire.environmentalchange.net/~webmaster/images/BBCodeViewFirst.png

Cruz, the first and the second ones:
http://mire.environmentalchange.net/~webmaster/images/BBCodeViewFirstSecond.png

My own user has view access to all three fora:
http://mire.environmentalchange.net/~webmaster/images/BBCodeViewAllThree.png

Flavio, second and third:
http://mire.environmentalchange.net/~webmaster/images/BBCodeViewSecondThird.png

Manuel, just second:
http://mire.environmentalchange.net/~webmaster/images/BBCodeViewSecond.png

Arturo, only to the third:
http://mire.environmentalchange.net/~webmaster/images/BBCodeViewThird.png

And Mónica no view access to any fora:
http://mire.environmentalchange.net/~webmaster/images/BBCodeViewNone.png

"Extra" links point to the right forum even though access is denied when 
clicked.


This code works fine for me...

#set($sql = ", BaseObject as obj where obj.name=doc.fullName and 
obj.className='BBCode.BBClass' and obj.name<>'BBCode.BBClassTemplate' 
order by doc.date desc")
#foreach($item in $xwiki.searchDocuments($sql))
#if($xwiki.getDocument($item).hasAccessLevel('view', $context.user) 
== 'true')
#if ($xwiki.getDocument($item).getValue('bbtitle') != "")
* [$xwiki.getDocument($item).display('bbtitle')>$item]
#else
* [$item]
#end
#end
#end

The only difference is that I've removed #set ($bbdoc = 
$xwiki.getDocument($item)) and used $xwiki.getDocument($item) instead of 
$bbdoc.

The point seems to be how $bbdoc is assigned within the control 
structure #foreach. Does this make sense for you? Thanks!

Ricardo

-- 
Ricardo Rodríguez
Your EPEC Network ICT Team

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


Re: [xwiki-users] Query a date field?

2008-02-22 Thread Uncanny Manners
Thanks for the reply,
the dtDateToCompare variable works correctly when I compare to an actual
document property, eg $doc.modifiedDate, so from what I can see it's
assessing it correctly.

Here's the rub.
By sheer luck (and blindly trying any combination that'd make some sort of
sense), it seems the actual problem is that the property should be
referenced using DateProperty, not StringProperty (at least, thats what
works).
Please can someone in dev confirm/deny the following query for
$xwiki.search:
select obj.name
from
   BaseObject obj,
   XWikiDocument doc,
   DateProperty propnrd
where
   obj.className='XWiki.clickClass' and
   obj.name<>'XWiki.clickClassTemplate' and
   obj.name not like('%/%') and
   doc.fullName=obj.name and
   propnrd.id.id=obj.id and
   propnrd.id.name='clickDateAssign' and
   propnrd.value < '${dtDateToCompare}'
order by
   obj.name asc




On Fri, Feb 22, 2008 at 11:13 AM, Marius Dumitru Florea <
[EMAIL PROTECTED]> wrote:

> Hi,
>
> I don't know for sure but I suspect your problem has something to do with
> date format. At the time the page is rendered '${dtDateToCompare}' gets
> translated into a string (using toString if it's not already a string).
> The date format used (explicitly by you or implicitly by toString) may not
> match  the one used by your DB. If this is the case then I see 2
> solutions:
>
> * find out the date format used by your DB (a simple select on a table
> having a date field might do) and format the dtDateToCompare
> correspondingly
>
> * replace '${dtDateToCompare}' with a parameter using ? (the JDBC syntax)
> or :paramName (HQL syntax) and call the corresponding searchDocuments
> method.
>
> I hope this helps,
> Marius
>
> > Hi everyone, having a small problem on an HQL query (and hope someone's
> > managed to get this working before)
> >
> > NOTE: $dtDateToCompare is yesturdays date, generated with groovy
> >
> > select obj.name
> > from
> >BaseObject obj,
> >XWikiDocument doc,
> >StringProperty propnrd
> > where
> >obj.className='XWiki.clickClass' and
> >obj.name<>'XWiki.clickClassTemplate' and
> >obj.name not like('%/%') and
> >doc.fullName=obj.name and
> >propnrd.id.id=obj.id and
> >propnrd.id.name='clickDateAssign' and
> >propnrd.value < '${dtDateToCompare}'
> > order by
> >obj.name asc
> >
> > This works if I use the modified date property of the document (as a
> > test);
> > but not for a custom date property (propnrd.id.name='clickDateAssign' is
> a
> > date property of the class).
> >
> > Anybody do something similar and can share some pointers?  Using MySQL
> if
> > that makes any difference
> > ___
> > 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


Re: [xwiki-users] Printing sections

2008-02-22 Thread Vitantonio Messa
Thanks for the tip: I'll do that.

Guillaume Lerouge wrote:
> Hi Vitantonio,
>
> thanks for this snippet :-)
>
> It would be even better if you could post it on code.xwiki.org 
> , in the code Snippet section.
>
> Thanks in advance,
>
> Guillaume
>
> On 22/02/2008, *Vitantonio Messa* <[EMAIL PROTECTED] 
> > wrote:
>
> Hi all,
>
> I've written a macro that allows to print just one section from an
> xwiki-page.
> I don't know if someone could find it useful, anyway, here it is.
>
> ---
> #macro(allowPrintSection)
>
> 
>   
>   
> #set ($i = 0)
> #set ($tocData = ${doc.getTOC(2, 2, false)})
> #foreach ($tocEntry in $tocData.entrySet())
>   #set ($i = $i+1)
>value="$i">$xwiki.parseContent($tocEntry.value.text)
> #end
>   
>value="Print
> section"/>
> 
>
> #if($request.printSection)
>   #set ($sections = $doc.getContent())
>   #set ($i = 0)
>   #foreach ($section in $sections.split("
> 1.1 "))
> #if ($i == $xwiki.parseInt($request.printSection))
>   #set ($newContent = $section)
> #end
> #set ($i = $i+1)
>   #end
>   #set ($newContent = "1.1 "+$newContent)
>   #set ($newDoc = $xwiki.getDocument("Main.PRINT_tmpSectionToPrint"))
>   #if ($newDoc == $xwiki.getNull())
> #if (!$xwiki.copyDocument($request.pageName,
> "Main.PRINT_tmpSectionToPrint"))
>   *Error while printing section...*
> #end
>   #end
>   $newDoc.setContent($newContent)
>   $newDoc.save()
>   Section ready to be printed: click here.
> #end
> #end
>
>
> Any ideas or suggestions are welcome!
> Vito
>
> --
> Vitantonio Messa
> +358 46 889 48 49 - [EMAIL PROTECTED]
> 
> COSS - The Finnish Centre for Open Source Solutions
> @ Technology Centre Hermia Ltd.
> Hermiankatu 1, FIN-33720 Tampere, FINLAND
>
> ___
> users mailing list
> users@xwiki.org 
> http://lists.xwiki.org/mailman/listinfo/users
>
>
>
>
> -- 
> http://wikibc.blogspot.com/
> 
>
> ___
> 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


Re: [xwiki-users] Printing sections

2008-02-22 Thread Guillaume Lerouge
Hi Vitantonio,
thanks for this snippet :-)

It would be even better if you could post it on code.xwiki.org, in the code
Snippet section.

Thanks in advance,

Guillaume

On 22/02/2008, Vitantonio Messa <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I've written a macro that allows to print just one section from an
> xwiki-page.
> I don't know if someone could find it useful, anyway, here it is.
>
> ---
> #macro(allowPrintSection)
>
> 
>   
>   
> #set ($i = 0)
> #set ($tocData = ${doc.getTOC(2, 2, false)})
> #foreach ($tocEntry in $tocData.entrySet())
>   #set ($i = $i+1)
>value="$i">$xwiki.parseContent($tocEntry.value.text)
> #end
>   
>   
> 
>
> #if($request.printSection)
>   #set ($sections = $doc.getContent())
>   #set ($i = 0)
>   #foreach ($section in $sections.split("
> 1.1 "))
> #if ($i == $xwiki.parseInt($request.printSection))
>   #set ($newContent = $section)
> #end
> #set ($i = $i+1)
>   #end
>   #set ($newContent = "1.1 "+$newContent)
>   #set ($newDoc = $xwiki.getDocument("Main.PRINT_tmpSectionToPrint"))
>   #if ($newDoc == $xwiki.getNull())
> #if (!$xwiki.copyDocument($request.pageName,
> "Main.PRINT_tmpSectionToPrint"))
>   *Error while printing section...*
> #end
>   #end
>   $newDoc.setContent($newContent)
>   $newDoc.save()
>   Section ready to be printed: click here.
> #end
> #end
>
>
> Any ideas or suggestions are welcome!
> Vito
>
> --
> Vitantonio Messa
> +358 46 889 48 49 - [EMAIL PROTECTED]
> COSS - The Finnish Centre for Open Source Solutions
> @ Technology Centre Hermia Ltd.
> Hermiankatu 1, FIN-33720 Tampere, FINLAND
>
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>



-- 
http://wikibc.blogspot.com/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Printing sections

2008-02-22 Thread Vitantonio Messa
Hi all,

I've written a macro that allows to print just one section from an 
xwiki-page.
I don't know if someone could find it useful, anyway, here it is.

---
#macro(allowPrintSection)


  
  
#set ($i = 0)
#set ($tocData = ${doc.getTOC(2, 2, false)})
#foreach ($tocEntry in $tocData.entrySet())
  #set ($i = $i+1)
  $xwiki.parseContent($tocEntry.value.text)
#end
  
  


#if($request.printSection)
  #set ($sections = $doc.getContent())
  #set ($i = 0)
  #foreach ($section in $sections.split("
1.1 "))
#if ($i == $xwiki.parseInt($request.printSection))
  #set ($newContent = $section)
#end
#set ($i = $i+1)
  #end
  #set ($newContent = "1.1 "+$newContent)
  #set ($newDoc = $xwiki.getDocument("Main.PRINT_tmpSectionToPrint"))
  #if ($newDoc == $xwiki.getNull())
#if (!$xwiki.copyDocument($request.pageName, 
"Main.PRINT_tmpSectionToPrint")) 
  *Error while printing section...*
#end
  #end
  $newDoc.setContent($newContent)
  $newDoc.save()
  Section ready to be printed: click here.
#end
#end


Any ideas or suggestions are welcome!
Vito

-- 
Vitantonio Messa
+358 46 889 48 49 - [EMAIL PROTECTED]
COSS - The Finnish Centre for Open Source Solutions
@ Technology Centre Hermia Ltd.
Hermiankatu 1, FIN-33720 Tampere, FINLAND

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


Re: [xwiki-users] Query a date field?

2008-02-22 Thread Marius Dumitru Florea
Hi,

I don't know for sure but I suspect your problem has something to do with
date format. At the time the page is rendered '${dtDateToCompare}' gets
translated into a string (using toString if it's not already a string).
The date format used (explicitly by you or implicitly by toString) may not
match  the one used by your DB. If this is the case then I see 2
solutions:

* find out the date format used by your DB (a simple select on a table
having a date field might do) and format the dtDateToCompare
correspondingly

* replace '${dtDateToCompare}' with a parameter using ? (the JDBC syntax)
or :paramName (HQL syntax) and call the corresponding searchDocuments
method.

I hope this helps,
Marius

> Hi everyone, having a small problem on an HQL query (and hope someone's
> managed to get this working before)
>
> NOTE: $dtDateToCompare is yesturdays date, generated with groovy
>
> select obj.name
> from
>BaseObject obj,
>XWikiDocument doc,
>StringProperty propnrd
> where
>obj.className='XWiki.clickClass' and
>obj.name<>'XWiki.clickClassTemplate' and
>obj.name not like('%/%') and
>doc.fullName=obj.name and
>propnrd.id.id=obj.id and
>propnrd.id.name='clickDateAssign' and
>propnrd.value < '${dtDateToCompare}'
> order by
>obj.name asc
>
> This works if I use the modified date property of the document (as a
> test);
> but not for a custom date property (propnrd.id.name='clickDateAssign' is a
> date property of the class).
>
> Anybody do something similar and can share some pointers?  Using MySQL if
> that makes any difference
> ___
> 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


Re: [xwiki-users] Upgrading a wiki-farm

2008-02-22 Thread Vitantonio Messa
Hi Jerome,

thanks for the answer: I just did some testing and it seems to go 
smoothly also for me ;)

Vito


Jerome Velociter wrote:
> Hi Vito,
>
>   
>> Hi all,
>>
>> I'm going to upgrade a wiki-farm from the version 1.1RC1 to 1.2.2. Does
>> anyone have tried to upgrade a wiki-farm? Any suggestion?
>>
>> I know there are explanation on how to do this on xwiki.org, I want just
>> to know if someone has done it already.
>> 
>
> I've upgraded a farm from 1.1.2 to 1.2.2, it went pretty smooth.
>
>   
>> Thanks!
>>
>> Vito
>>
>> ___
>> 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
>   


-- 
Vitantonio Messa
+358 46 889 48 49 - [EMAIL PROTECTED]
COSS - The Finnish Centre for Open Source Solutions
@ Technology Centre Hermia Ltd.
Hermiankatu 1, FIN-33720 Tampere, FINLAND

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


[xwiki-users] Query a date field?

2008-02-22 Thread Uncanny Manners
Hi everyone, having a small problem on an HQL query (and hope someone's
managed to get this working before)

NOTE: $dtDateToCompare is yesturdays date, generated with groovy

select obj.name
from
   BaseObject obj,
   XWikiDocument doc,
   StringProperty propnrd
where
   obj.className='XWiki.clickClass' and
   obj.name<>'XWiki.clickClassTemplate' and
   obj.name not like('%/%') and
   doc.fullName=obj.name and
   propnrd.id.id=obj.id and
   propnrd.id.name='clickDateAssign' and
   propnrd.value < '${dtDateToCompare}'
order by
   obj.name asc

This works if I use the modified date property of the document (as a test);
but not for a custom date property (propnrd.id.name='clickDateAssign' is a
date property of the class).

Anybody do something similar and can share some pointers?  Using MySQL if
that makes any difference
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Need addAttachments(java.lang.String fieldName) and addAttachments() example

2008-02-22 Thread Ngo Thi Hong Nga
Hi, I see these 2 methods in the document of XE 1.1.2 but don't know how to
use them. Anyone can show me a snippet ?
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Upgrading a wiki-farm

2008-02-22 Thread Jerome Velociter
Hi Vito,

> Hi all,
>
> I'm going to upgrade a wiki-farm from the version 1.1RC1 to 1.2.2. Does
> anyone have tried to upgrade a wiki-farm? Any suggestion?
>
> I know there are explanation on how to do this on xwiki.org, I want just
> to know if someone has done it already.

I've upgraded a farm from 1.1.2 to 1.2.2, it went pretty smooth.

> Thanks!
>
> Vito
>
> ___
> 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


[xwiki-users] Upgrading a wiki-farm

2008-02-22 Thread Vitantonio Messa
Hi all,

I'm going to upgrade a wiki-farm from the version 1.1RC1 to 1.2.2. Does 
anyone have tried to upgrade a wiki-farm? Any suggestion?

I know there are explanation on how to do this on xwiki.org, I want just 
to know if someone has done it already.
Thanks!

Vito

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


Re: [xwiki-users] How to attach and deattach file by code

2008-02-22 Thread [Ricardo Rodriguez] Your EPEC Network ICT Team
Ngo Thi Hong Nga wrote:
> My solution sounds silly but it works :)
> Assume that the upload document is named XWiki.Upload. In this 
> document, I change the value of the hidden field "xredirect" to 
> XWiki.DoSomething. I create another document named XWiki.DoSomething, 
> in it, write some code to deal with the file content, blah ... , 
> finally, redirect back to XWiki.Upload.
Thanks!

-- 
Ricardo Rodríguez
Your EPEC Network ICT Team

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


[xwiki-users] Javascript error in default xwiki

2008-02-22 Thread Aymeric Nave
Hi,

After installing the default xwiki war file, without installing any xar,
WebHome page is displayed without any css style and javascript errors occur
on mouse events.
Errors come from the js file /xwiki/skins/albatross/xwiki.js

Is this bug referenced ?

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


Re: [xwiki-users] [XE 1.2.2] Space characters trimmed in attachment names

2008-02-22 Thread Jean-Vincent Drean
> Hello,
>
> Don't know if it's a bug or an evolution, but after migrating my xwiki to
> 1.2.2, when I attach a new file to a page, all spaces characters are trimmed
> from the name. I didn't found anything about that in Jira.
> For example "My Doc Attached.doc" gets renamed to "MyDocAttached.doc".

http://jira.xwiki.org/jira/browse/XWIKI-2090
http://jira.xwiki.org/jira/browse/XWIKI-2087

The use of the clearName method for attachment names is a temporary
fix until the resolution of all our encoding issues.

> I see at least one issue coming from this : if you attach the same file it's
> not considered the same because it's renamed. Your existing links also link
> to the previous version, and it's not easy to find by end-user.
> And anyway you don't want the file to be renamed when attached …

Yes this is a drawback of this fix.

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


Re: [xwiki-users] How to attach and deattach file by code

2008-02-22 Thread Ngo Thi Hong Nga
My solution sounds silly but it works :)
Assume that the upload document is named XWiki.Upload. In this document, I
change the value of the hidden field "xredirect" to XWiki.DoSomething. I
create another document named XWiki.DoSomething, in it, write some code
to deal with the file content, blah ... , finally, redirect back to
XWiki.Upload.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] How to attach and deattach file by code

2008-02-22 Thread [Ricardo Rodriguez] Your EPEC Network ICT Team

Ngo Thi Hong Nga wrote:

I have already known how to do that. I have another question:
I have a form with 3 file inputs and an "Attach" button. After 
click this button, 3 files are attached to the current document. How 
can I do this using the XWiki action /xwiki/bin/upload ?. I tried but 
only 1 file is allowed.



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

Hi,

Could you share your solution to the first question with the community? 
It will be useful at least for me myself! Thanks!


Cheers,

--
Ricardo Rodríguez
Your EPEC Network ICT Team

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