Additional classes in a groovyclass page
Hi All, As I read it, when I call a groovy page using parseGroovyFromPage, the first class designated inside is attached to the returned object (so calling it subsequently will call methods inside that class). Does parseGroovyFromPage allow one to have multiple classes per groovy page (and by extension,how would one plug into a specific class when initializing the page via parseGroovyFromPage)? Brandon Esbach Software Engineer Tyco Electronics LoughMahon Technology Park, Skehard Road, Blackrock, Cork, Ireland Tel +353 21 4808305
Hello, Is there any simple way to add more than one "Comments" section on a single page? I'm making a page that lists summaries to different files, and would like to allow people to comment on them without making a separate page for each one. Thanks, D. Wilson
I presume that you mean that one page includes bits of several others. Takes a little hacking, but I've created a macro that includes the comments from the included pages and takes you to the individual pages to post comments. brain[sic]
-----Original Message----- From: [email protected] [mailto:[email protected]] Sent: Thursday, April 19, 2007 1:16 PM To: [email protected] Subject: [xwiki-users] Multiple comments sections on a page
Hello,
Is there any simple way to add more than one "Comments" section on a single page? I'm making a page that lists summaries to different files, and would like to allow people to comment on them without making a separate page for each one.
Thanks,
D. Wilson
The idea was more along the lines of allowing users to comment on different parts of the same page. Think of a page with short book reviews for example. The page could have a number of single paragraph reviews, and after each one, users could post comments. The problem with the current setup is that, in the book review example, the comments for all the different reviews would be in a single section and it would be difficult and cumbersome to match comments to individual reviews. I realize this could be done simply by using multiple pages (one per review) but to preserve readability, I'd like to keep it all on a single page. Thank you, Duncan THOMAS, BRIAN M (ATTSI) wrote:
I presume that you mean that one page includes bits of several others.
Takes a little hacking, but I've created a macro that includes the comments from the included pages and takes you to the individual pages to post comments.
brain[sic]
-----Original Message----- From: [email protected] [mailto:[email protected]] Sent: Thursday, April 19, 2007 1:16 PM To: [email protected] Subject: [xwiki-users] Multiple comments sections on a page
Hello,
Is there any simple way to add more than one "Comments" section on a single page? I'm making a page that lists summaries to different files, and would like to allow people to comment on them without making a separate page for each one.
Thanks,
D. Wilson
------------------------------------------------------------------------
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
If I understand correctly, you're just looking to comment seperately different chunks of a single document? You could try the following, though it assumes knowledge of velocity, querystrings, and classes: WARNING: I have not tried this myself, and as I've not tried anything like this, I have not checked if there is a better way around it. The main class object for the document contains just bare minimum to describe the page. Create a paragraph object. This is added by a user to the page to denote a paragraph/chunk for commenting. Create a paragraph_comment object. This is added by the user and pointed at the paragraph. Paragraph object details: -Text -Author -Date -Reference (you would populate this yourself, just use a mashup of username+date+randomNumeric; make sure to keep it short-ish). Paragraph_comment object details: -Text -Author -Date -Paragraph_reference You then use a link with a predefined querystring to create a new paragraph, and for creating a paragraph_comment; for paragraph_comment always pass in the "Reference" value as another querystring. Your class sheet would look something like (you would need to look at velocity examples around xwiki to get this right) #if($request.modifyparagraph) [code for handling paragraph additions] #elseif($request.modifycomment) [code for handling comment additions, and inserting $request.commentref into the paragraph_reference] #else [standard class object display] [if in view mode] [for-each paragraph object] [show paragraph] [for-each paragraph-comment**] [if Paragraph_reference = Reference show comment] [end for-each] [end for-each] [end if view mode] #end Doesn't sound simple with the bad way I explain it; but something along those lines would do the job. ** Not sure how to make this step efficient. Maybe setup an array with object numbers, remove the ones you use? -----Original Message----- From: Duncan Wilson [mailto:[email protected]] Sent: 24 April 2007 20:54 To: [email protected] Subject: Re: [xwiki-users] Multiple comments sections on a page The idea was more along the lines of allowing users to comment on different parts of the same page. Think of a page with short book reviews for example. The page could have a number of single paragraph reviews, and after each one, users could post comments. The problem with the current setup is that, in the book review example, the comments for all the different reviews would be in a single section and it would be difficult and cumbersome to match comments to individual reviews. I realize this could be done simply by using multiple pages (one per review) but to preserve readability, I'd like to keep it all on a single page. Thank you, Duncan THOMAS, BRIAN M (ATTSI) wrote:
I presume that you mean that one page includes bits of several others.
Takes a little hacking, but I've created a macro that includes the comments from the included pages and takes you to the individual pages
to post comments.
brain[sic]
-----Original Message----- From: [email protected] [mailto:[email protected]] Sent: Thursday, April 19, 2007 1:16 PM To: [email protected] Subject: [xwiki-users] Multiple comments sections on a page
Hello,
Is there any simple way to add more than one "Comments" section on a single page? I'm making a page that lists summaries to different files, and would like to allow people to comment on them without making a separate page for each one.
Thanks,
D. Wilson
---------------------------------------------------------------------- --
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
participants (4)
-
Duncan Wilson -
dwilson@berkeley.edu -
Esbach, Brandon -
THOMAS, BRIAN M (ATTSI)