Re: [xwiki-users] groovy.lang.MissingMethodException - No signatureof method

2009-01-30 Thread Denis Gervalle
Hi Adjin,

com.xpn.xwiki.doc.XWikiDocument.addAttachment() has just been added in  
revision 14565, which was only release in 1.8M1. Before, the  
addAttachment() function was only available from  
com.xpn.xwiki.api.Document object. You may want to wrap your  
XWikiDocument object into a Document object with:

com.xpn.xwiki.api.Document apidoc = new Document(doc,context)
apidoc.addAttachment(filenameToSavaAs, imgAsBites)

Or you may do the job by yourself (be very careful that changing an  
XWikiDocument implies that you have to clone it first, if you want to  
avoid cache corruption in case you never store your changes or it  
fails.), this should be something like this:

def att = doc.getAttachment(filenameToSavaAs)
if( !att ) att = new com.xpn.xwiki.doc.XWikiAttachment(doc,  
filenameToSavaAs)
doc.getAttachmentList().add(att)
att.content = imgAsBites
att.author = context.user
// att.comment = 'comments for your attachement if you want'
doc.saveAttachmentContent(att,context)

Hope this helps,

Denis


On 29 janv. 09, at 18:01, Ajdin Brandic wrote:

 * I'm posting this again cos the whole post got mixed up with
 another post Custom class field as field on a different class
 http://n2.nabble.com/Custom-class-field-as-field-on-a-different-class-t
 p2152709p2239310.html  *

 As written previously I'm trying to trigger some code on document  
 save.

 Sergiu Dumitriu explained issue I had with
 (com.xpn.xwiki.doc.XWikiDocument vs.
 com.xpn.xwiki.api.Document).  I got most the stuff to work except  
 (last
 two lines of code) I am not able to save image from url as attachment.

 I get Wrapped Exception: No signature of method
 com.xpn.xwiki.doc.XWikiDocument.addAttachment() is applicable for
 argument types: (java.lang.String, [B, com.xpn.xwiki.XWikiContext)
 values: {notif1.png, [-119,.., [vcontext:...]}

 Looking at the documentation at
 http://maven.xwiki.org/site/xwiki-core-parent/xwiki-core/apidocs/com/xpn
 /xwiki/doc/XWikiDocument.html
 Says  XWikiAttachment | addAttachment(java.lang.String fileName,  
 byte[]
 data, XWikiContext context) 

 Have I got type issue here or???

 This is what I'm doing
 def doc = xwiki.getDocument(docName, context); //use this for
 com.xpn.xwiki.XWiki def tmpElList = el.split([\]) def umlImage =
 tmpElList[1] def imgAsBites =
 xwiki.getURLContentAsBytes(http://www.websequencediagrams.com/index.php
 +umlImage, context);
 def newAttachment = doc.addAttachment(filenameToSavaAs,imgAsBites,
 context); //use this for com.xpn.xwiki.XWiki
 saveAttachmentContent(newAttachment,context);

 Has anyone had a similar problem?

 Ajdin

 -Original Message-
 From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On  
 Behalf
 Of Sergiu Dumitriu
 Sent: 14 January 2009 17:03
 To: XWiki Users
 Subject: Re: [xwiki-users] groovy.lang.MissingMethodException

 Ajdin Brandic wrote:
 Hi

 I'm trying to execute another script on Save event.  I've created a
 notification class (based on xwiki example
 http://dev.xwiki.org/xwiki/bin/view/Drafts/GroovyNotifications) and
 pointed to it in Administration  Programming  Notification pages.

 This script gets called every time which is fine and when I try to
 display name of a document that is being saved (doc.fullName) all
 works well. document name it works fine but when I try to display one
 of the fieldnames doc.display('Summary') I get

 groovy.lang.MissingMethodException: No signature of method
 com.xpn.xwiki.doc.XWikiDocument.display() is applicable for argument
 types: (java.lang.String) values: {Summary}

 I tried
  def tmpDoc = context.getWiki().getDocument(doc.fullName, context);
 But again fullName is OK but display('Summary') isn't

 Am I missing something in my syntax?  How do I make document values
 available in my Notification class?

 As you see, that is not an api object, but an internal class
 (com.xpn.xwiki.doc.XWikiDocument vs. com.xpn.xwiki.api.Document). This
 means that API methods don't work, unless they have an equivalent in  
 the
 other class.

 You can either look at the methods of the XWikiDocument class, or  
 get an
 API object and work with it (new com.xpn.xwiki.apiDocument(tmpDoc)

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


 

 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
 

Re: [xwiki-users] groovy.lang.MissingMethodException - Nosignatureof method

2009-01-30 Thread Ajdin Brandic
Hi

Denis thank you very much.  I did not know it was the v1.8 feature.
http://maven.xwiki.org/ site doesn't mention it either.
I'm developing this for a myxwiki site and I think the farm still runs
1.7, correct me if I'm wrong, so your advice was spot on.

Ajdin

-Original Message-
From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf
Of Denis Gervalle
Sent: 30 January 2009 09:11
To: XWiki Users
Subject: Re: [xwiki-users] groovy.lang.MissingMethodException -
Nosignatureof method

Hi Adjin,

com.xpn.xwiki.doc.XWikiDocument.addAttachment() has just been added in
revision 14565, which was only release in 1.8M1. Before, the
addAttachment() function was only available from
com.xpn.xwiki.api.Document object. You may want to wrap your
XWikiDocument object into a Document object with:

com.xpn.xwiki.api.Document apidoc = new Document(doc,context)
apidoc.addAttachment(filenameToSavaAs, imgAsBites)

Or you may do the job by yourself (be very careful that changing an
XWikiDocument implies that you have to clone it first, if you want to
avoid cache corruption in case you never store your changes or it
fails.), this should be something like this:

def att = doc.getAttachment(filenameToSavaAs)
if( !att ) att = new com.xpn.xwiki.doc.XWikiAttachment(doc,
filenameToSavaAs)
doc.getAttachmentList().add(att)
att.content = imgAsBites
att.author = context.user
// att.comment = 'comments for your attachement if you want'
doc.saveAttachmentContent(att,context)

Hope this helps,

Denis


On 29 janv. 09, at 18:01, Ajdin Brandic wrote:

 * I'm posting this again cos the whole post got mixed up with 
 another post Custom class field as field on a different class 
 http://n2.nabble.com/Custom-class-field-as-field-on-a-different-class
 -t
 p2152709p2239310.html  *

 As written previously I'm trying to trigger some code on document 
 save.

 Sergiu Dumitriu explained issue I had with 
 (com.xpn.xwiki.doc.XWikiDocument vs.
 com.xpn.xwiki.api.Document).  I got most the stuff to work except 
 (last two lines of code) I am not able to save image from url as 
 attachment.

 I get Wrapped Exception: No signature of method
 com.xpn.xwiki.doc.XWikiDocument.addAttachment() is applicable for 
 argument types: (java.lang.String, [B, com.xpn.xwiki.XWikiContext)
 values: {notif1.png, [-119,.., [vcontext:...]}

 Looking at the documentation at
 http://maven.xwiki.org/site/xwiki-core-parent/xwiki-core/apidocs/com/x
 pn
 /xwiki/doc/XWikiDocument.html
 Says  XWikiAttachment | addAttachment(java.lang.String fileName, 
 byte[] data, XWikiContext context) 

 Have I got type issue here or???

 This is what I'm doing
 def doc = xwiki.getDocument(docName, context); //use this for 
 com.xpn.xwiki.XWiki def tmpElList = el.split([\]) def umlImage = 
 tmpElList[1] def imgAsBites = 
 xwiki.getURLContentAsBytes(http://www.websequencediagrams.com/index.p
 hp
 +umlImage, context);
 def newAttachment = doc.addAttachment(filenameToSavaAs,imgAsBites,
 context); //use this for com.xpn.xwiki.XWiki 
 saveAttachmentContent(newAttachment,context);

 Has anyone had a similar problem?

 Ajdin

 -Original Message-
 From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On 
 Behalf Of Sergiu Dumitriu
 Sent: 14 January 2009 17:03
 To: XWiki Users
 Subject: Re: [xwiki-users] groovy.lang.MissingMethodException

 Ajdin Brandic wrote:
 Hi

 I'm trying to execute another script on Save event.  I've created a

 notification class (based on xwiki example
 http://dev.xwiki.org/xwiki/bin/view/Drafts/GroovyNotifications) and 
 pointed to it in Administration  Programming  Notification pages.

 This script gets called every time which is fine and when I try to 
 display name of a document that is being saved (doc.fullName) all 
 works well. document name it works fine but when I try to display one

 of the fieldnames doc.display('Summary') I get

 groovy.lang.MissingMethodException: No signature of method
 com.xpn.xwiki.doc.XWikiDocument.display() is applicable for argument
 types: (java.lang.String) values: {Summary}

 I tried
  def tmpDoc = context.getWiki().getDocument(doc.fullName, context); 
 But again fullName is OK but display('Summary') isn't

 Am I missing something in my syntax?  How do I make document values 
 available in my Notification class?

 As you see, that is not an api object, but an internal class 
 (com.xpn.xwiki.doc.XWikiDocument vs. com.xpn.xwiki.api.Document). This

 means that API methods don't work, unless they have an equivalent in 
 the other class.

 You can either look at the methods of the XWikiDocument class, or get 
 an API object and work with it (new com.xpn.xwiki.apiDocument(tmpDoc)

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


 

 NOTICE

 This message and any files transmitted with it is intended for the 
 

Re: [xwiki-users] Merging xwiki databases

2009-01-30 Thread Ludovic Dubost

Hi,

You have two options here:

- either you want to merge them in the same exact XWiki UI. For this you 
can use XAR export and import to import one into the other (you need to 
be carefull about pages having the same name)
- or you move to XWiki Enterprise Manager and there you can have both 
your wiki live together on the same machine but on 2 different URLs. For 
this you install XWiki Enterprise Manager, create two wikis like you 
would from scratch and either import the wikis using XARs or using MySQL 
database imports into the database created for your 2 wikis.

The second solution has the advantage of keeping your 2 wikis 
independent while sharing the server resource and the Database instance, 
and would allow you to create more wikis in your company.

Ludovic

CASTRO roney a écrit :
 I have two xwikis running on two different servers, with different databases. 
 I want to centralize those xwikis in only one server. Therefore, I'm looking 
 for a way (or a tool) to merge the information present in the xwiki on the 
 server that will be disabled, into the database of the xwiki running on the 
 central server, that will remain active. The structure of the old wiki will 
 remain the same, and will be accessed from a link at the main page of the 
 xwiki that will remain active.
 Does anyone know if it is possible to do that?! If it is, how can I 
 accomplish this?
 Thanks a lot,

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

   


-- 
Ludovic Dubost
Blog: http://blog.ludovic.org/
XWiki: http://www.xwiki.com
Skype: ldubost GTalk: ldubost

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


[xwiki-users] Calendar, photo album and blog for each space

2009-01-30 Thread Christian Dionne
Hi,

 

Sorry if this question was already asked.  Is there a way to make
available the Calendar, Photo album and blog but for individual spaces?
It would mean that only user from that space would see the content of
these sections.

 

To make this clearer:

-  Space 1

oCalendar 1

oPhoto Album 1

oBlog 1

-  Space 2

oCalendar 2

oPhoto Album 2

oBlog 2

 

For example, calendar 1 and calendar 2 would have totally different
content only available to the users own their current space.

 

Thanks for your help,

Christian Dionne 
 
 Devez-vous vraiment imprimer ce courriel? Pensons a l'environnement! Do you 
really need to print this email? Help preserve our environment!
 
 
L'information apparaissant dans ce message electronique et dans les documents 
qui y sont joints est de nature confidentielle ou privilegiee. Si ce message 
vous est parvenu par erreur et que vous n'en etes pas le destinataire vise, 
vous etes par les presentes avises que toute utilisation, copie ou distribution 
de ce message est strictement interdite. Vous etes donc prie d'en informer 
immediatement l'expediteur et de detruire ce message, ainsi que les documents 
qui y sont joints, le cas echeant.

The information in this message, including in all attachments, is confidential 
or privileged. In the event you have received this message in error and are not 
the intended recipient, you are hereby advised that any use, copying or 
reproduction of this document is strictly forbidden. Please notify immediately 
the sender of this error and destroy this message, including its attachments, 
as the case may be.
__
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Calendar, photo album and blog for each space

2009-01-30 Thread Jerome Velociter
Bonjour Christian,

You can do that with the blog already, using its latest version (shipped 
with XWiki Enterprise starting version 1.8M1). There is a UI in the wiki 
administration to create new blogs hosted in their own spaces.
For Calendar and Album Photo apps, unfortunately, that is not going to 
work without some adaptation of the applications (Note also that we are 
not going to bundle those applications, calendar and photo album, any 
longer with XWiki Enterprise - but they will remain available for 
download and installation on code.xwiki.org).

Note that XWiki Workspaces (http://workspaces.xwiki.org) offers this 
(applications and users management per workspace - no calendar thought).

Hopes this helps,
Jerome.

Christian Dionne wrote:
 Hi,

  

 Sorry if this question was already asked.  Is there a way to make
 available the Calendar, Photo album and blog but for individual spaces?
 It would mean that only user from that space would see the content of
 these sections.

  

 To make this clearer:

 -  Space 1

 oCalendar 1

 oPhoto Album 1

 oBlog 1

 -  Space 2

 oCalendar 2

 oPhoto Album 2

 oBlog 2

  

 For example, calendar 1 and calendar 2 would have totally different
 content only available to the users own their current space.

  

 Thanks for your help,

 Christian Dionne 
  
  Devez-vous vraiment imprimer ce courriel? Pensons a l'environnement! Do you 
 really need to print this email? Help preserve our environment!
  
  
 L'information apparaissant dans ce message electronique et dans les documents 
 qui y sont joints est de nature confidentielle ou privilegiee. Si ce message 
 vous est parvenu par erreur et que vous n'en etes pas le destinataire vise, 
 vous etes par les presentes avises que toute utilisation, copie ou 
 distribution de ce message est strictement interdite. Vous etes donc prie 
 d'en informer immediatement l'expediteur et de detruire ce message, ainsi que 
 les documents qui y sont joints, le cas echeant.

 The information in this message, including in all attachments, is 
 confidential or privileged. In the event you have received this message in 
 error and are not the intended recipient, you are hereby advised that any 
 use, copying or reproduction of this document is strictly forbidden. Please 
 notify immediately the sender of this error and destroy this message, 
 including its attachments, as the case may be.
 __
 ___
 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] Orphaned Pages revisited

2009-01-30 Thread Jerome Velociter
Samuel Lee wrote:
 I stole this from 2 previous emails.  Can someone confirm if this is  
 correct if I want a display of all orphaned pages in my xwiki?

Well, does it do what you expect ? :p

More seriously, it looks ok (though I don't understand why you display 
the document's space/web for each entry). Also, know that there is an 
orphaned pages UI bundled with XWiki Enterprise by default. You'll find 
it in a tab if you follow the Index link in the default navigation 
panel displayed on the left.

Jerome.

PS: note that $doc.web is deprecated since a long time now, you should 
use $doc.space instead

 #set ($sql = where doc.parent is null or doc.parent='')
 #set ($start = 0) #set ($nb = 500)
 #set($curweb=)

 #foreach ($item in $xwiki.searchDocuments($sql, $nb , $start))
 #if ($xwiki.hasAccessLevel(view, ${context.database}:${item}))
 #set($bentrydoc = $xwiki.getDocument($item))
 #if($curweb!=${bentrydoc.web})

 div

 1.1 ${bentrydoc.web}

 /div
 #set ($curweb = ${bentrydoc.web})

 #end
 * [$bentrydoc.name${bentrydoc.web}.$bentrydoc.name] by
 $xwiki.getLocalUserName($bentrydoc.author) on
 $xwiki.formatDate($bentrydoc.date, dd,  HH:mm)
 a href=$bentrydoc.getURL(edit)edit/a
 #end
 #end 
 ___
 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] Document Information Tag Editing

2009-01-30 Thread Jerome Velociter
Hello,

That's indeed strange. Can you confirm you click Save  view or Save 
 continue when you are done filling in the tag field when editing a 
document ? Also, can you tell us precisely which version you did download ?

Thanks,
Jerome.

bretteua wrote:
 I am a new XWiki user and recently installed the Enterprise version and am
 considering using it for a small company corporate Wiki.  So far, I love
 what I see and by comparison is much more user friendly then some of the
 other Wikis I have tested. 

 But, I am having one small problem.  When I am editing a document, the Tags
 input box in the Document Information panel does not work.  If I make any
 changes in the Tags input box, they are not saved with the document. 
 However, if I make changes within the Tags input box in the Information tab
 on a document and click the Save button, the changes are retained. 

 Any suggestions as to why the tags input in the Document Information panel
 might not be working?  I have installed the standalone version and have left
 pretty much all of the defaults intact. 

 Any help would be appreciated. 

 Thank you. 
   

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


Re: [xwiki-users] Change parents' name

2009-01-30 Thread Jerome Velociter
Hello,

Yes, this is possible, also it's not a feature bundled with XWiki right 
now. We do that for backlinks, but not yet for the parent/children 
relationship.
If you are willing to implement that, you have to register to document 
changes notifications. You can write a little groovy script in a wiki 
page that handles this. A good start point with XWiki notifications 
mechanism is 
http://platform.xwiki.org/xwiki/bin/view/DevGuide/Notifications.

Hopes this helps,
Jerome.

MrMela wrote:
 Hello everybody. I don't know if it is a stupid question but...
 I hava e page, called Father and his child, Child
 If I change Father's name to Dad, then Child's parent remains Father, even
 if it does not exist anymore. Is there a way to automatically follow the
 renaming of the page, making Child's parent become Dad, as it happens with
 links?

 Thank you
   

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


[xwiki-users] How to set page break?

2009-01-30 Thread wahono
I am newbie in xwiki (yesterday I download xwiki enterprise), I want add page 
break in page. My purpose is if I do export to PDF, this page (although only 1 
line) should print in 1 page.

Thanks in advance.

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


Re: [xwiki-users] Calendar, photo album and blog for each space

2009-01-30 Thread Christian Dionne
Hi Jerome,

Thanks for the quick and precise answer.

Christian

-Message d'origine-
De : users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] De la part de 
Jerome Velociter
Envoyé : 30 janvier 2009 14:27
À : XWiki Users
Objet : Re: [xwiki-users] Calendar, photo album and blog for each space

Bonjour Christian,

You can do that with the blog already, using its latest version (shipped 
with XWiki Enterprise starting version 1.8M1). There is a UI in the wiki 
administration to create new blogs hosted in their own spaces.
For Calendar and Album Photo apps, unfortunately, that is not going to 
work without some adaptation of the applications (Note also that we are 
not going to bundle those applications, calendar and photo album, any 
longer with XWiki Enterprise - but they will remain available for 
download and installation on code.xwiki.org).

Note that XWiki Workspaces (http://workspaces.xwiki.org) offers this 
(applications and users management per workspace - no calendar thought).

Hopes this helps,
Jerome.

Christian Dionne wrote:
 Hi,

  

 Sorry if this question was already asked.  Is there a way to make
 available the Calendar, Photo album and blog but for individual spaces?
 It would mean that only user from that space would see the content of
 these sections.

  

 To make this clearer:

 -  Space 1

 oCalendar 1

 oPhoto Album 1

 oBlog 1

 -  Space 2

 oCalendar 2

 oPhoto Album 2

 oBlog 2

  

 For example, calendar 1 and calendar 2 would have totally different
 content only available to the users own their current space.

  

 Thanks for your help,

 Christian Dionne 
  
  Devez-vous vraiment imprimer ce courriel? Pensons a l'environnement! Do you 
 really need to print this email? Help preserve our environment!
  
  
 L'information apparaissant dans ce message electronique et dans les documents 
 qui y sont joints est de nature confidentielle ou privilegiee. Si ce message 
 vous est parvenu par erreur et que vous n'en etes pas le destinataire vise, 
 vous etes par les presentes avises que toute utilisation, copie ou 
 distribution de ce message est strictement interdite. Vous etes donc prie 
 d'en informer immediatement l'expediteur et de detruire ce message, ainsi que 
 les documents qui y sont joints, le cas echeant.

 The information in this message, including in all attachments, is 
 confidential or privileged. In the event you have received this message in 
 error and are not the intended recipient, you are hereby advised that any 
 use, copying or reproduction of this document is strictly forbidden. Please 
 notify immediately the sender of this error and destroy this message, 
 including its attachments, as the case may be.
 __
 ___
 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] Document Information Tag Editing

2009-01-30 Thread bretteua

Thanks for the response Jerome.  I am embarssed to say that I must be losing
my mind.  When I tested this again today, it worked as expected.  I know for
a fact that this was not working before.  But, I just tagged a bunch of
pages from the Document Information Panel and it worked properly every time. 
My apologies for wasting your time.

Thank you,
Bret


Jerome Velociter-2 wrote:
 
 Hello,
 
 That's indeed strange. Can you confirm you click Save  view or Save 
  continue when you are done filling in the tag field when editing a 
 document ? Also, can you tell us precisely which version you did download
 ?
 
 Thanks,
 Jerome.
 
 bretteua wrote:
 I am a new XWiki user and recently installed the Enterprise version and
 am
 considering using it for a small company corporate Wiki.  So far, I love
 what I see and by comparison is much more user friendly then some of the
 other Wikis I have tested. 

 But, I am having one small problem.  When I am editing a document, the
 Tags
 input box in the Document Information panel does not work.  If I make any
 changes in the Tags input box, they are not saved with the document. 
 However, if I make changes within the Tags input box in the Information
 tab
 on a document and click the Save button, the changes are retained. 

 Any suggestions as to why the tags input in the Document Information
 panel
 might not be working?  I have installed the standalone version and have
 left
 pretty much all of the defaults intact. 

 Any help would be appreciated. 

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

-- 
View this message in context: 
http://n2.nabble.com/Document-Information-Tag-Editing-tp2234947p2246925.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] Orphaned Pages revisited

2009-01-30 Thread Samuel Lee
Wow, I had no idea that there was an Orphaned Pages UI.  Very good  
stuff.  Thanks!

Sam

On Jan 30, 2009, at 11:37 AM, Jerome Velociter wrote:

 Samuel Lee wrote:
 I stole this from 2 previous emails.  Can someone confirm if this is
 correct if I want a display of all orphaned pages in my xwiki?

 Well, does it do what you expect ? :p

 More seriously, it looks ok (though I don't understand why you display
 the document's space/web for each entry). Also, know that there is an
 orphaned pages UI bundled with XWiki Enterprise by default. You'll  
 find
 it in a tab if you follow the Index link in the default navigation
 panel displayed on the left.

 Jerome.

 PS: note that $doc.web is deprecated since a long time now, you should
 use $doc.space instead

 #set ($sql = where doc.parent is null or doc.parent='')
 #set ($start = 0) #set ($nb = 500)
 #set($curweb=)

 #foreach ($item in $xwiki.searchDocuments($sql, $nb , $start))
 #if ($xwiki.hasAccessLevel(view, ${context.database}:${item}))
 #set($bentrydoc = $xwiki.getDocument($item))
 #if($curweb!=${bentrydoc.web})

 div

 1.1 ${bentrydoc.web}

 /div
 #set ($curweb = ${bentrydoc.web})

 #end
 * [$bentrydoc.name${bentrydoc.web}.$bentrydoc.name] by
 $xwiki.getLocalUserName($bentrydoc.author) on
 $xwiki.formatDate($bentrydoc.date, dd,  HH:mm)
 a href=$bentrydoc.getURL(edit)edit/a
 #end
 #end
 ___
 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] Orphaned Pages revisited

2009-01-30 Thread Samuel Lee
Okay, one more question,
I'm not a big programmer, so maybe there's something already out  
there.  Is there something that will allow me to delete all orphaned  
pages?

Sam

On Jan 30, 2009, at 11:37 AM, Jerome Velociter wrote:

 Samuel Lee wrote:
 I stole this from 2 previous emails.  Can someone confirm if this is
 correct if I want a display of all orphaned pages in my xwiki?

 Well, does it do what you expect ? :p

 More seriously, it looks ok (though I don't understand why you display
 the document's space/web for each entry). Also, know that there is an
 orphaned pages UI bundled with XWiki Enterprise by default. You'll  
 find
 it in a tab if you follow the Index link in the default navigation
 panel displayed on the left.

 Jerome.

 PS: note that $doc.web is deprecated since a long time now, you should
 use $doc.space instead

 #set ($sql = where doc.parent is null or doc.parent='')
 #set ($start = 0) #set ($nb = 500)
 #set($curweb=)

 #foreach ($item in $xwiki.searchDocuments($sql, $nb , $start))
 #if ($xwiki.hasAccessLevel(view, ${context.database}:${item}))
 #set($bentrydoc = $xwiki.getDocument($item))
 #if($curweb!=${bentrydoc.web})

 div

 1.1 ${bentrydoc.web}

 /div
 #set ($curweb = ${bentrydoc.web})

 #end
 * [$bentrydoc.name${bentrydoc.web}.$bentrydoc.name] by
 $xwiki.getLocalUserName($bentrydoc.author) on
 $xwiki.formatDate($bentrydoc.date, dd,  HH:mm)
 a href=$bentrydoc.getURL(edit)edit/a
 #end
 #end
 ___
 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