[xwiki-users] Form for 2 objects on different pages
[[Note: The XWiki project is switching away from this mailing list and moving to a forum: https://discourse.xwiki.org. This list will be made readonly in a few days. Please post on the forum from now on. Thanks.]] - Hi We have two objects of two different Classes, each on it's own page. We looked, for a example, http://platform.xwiki.org/xwiki/bin/view/DevGuide/APIGuide#HAccessobjectsinapage ## get the document which has the object (only one here) - this is the page where I can see things in the object editor ## Retrieve the first object (index [0]) among all objects attached to the page MySpace.MyDocWithMyClassObjects and of a certain class MySpace.MyClass #set( $MyDoc = $xwiki.getDocument("MySpace.MyDocWithMyClassObjects")) ## get the document wich contains the class definition: this page has entries in the class editor #set( $class = $xwiki.getClass("MySpace.MyClass")) #foreach($prop in $class.properties) ## go through all properties * ${prop.prettyName} : $MyDoc.display($prop.getName()) #end our implementation is a bit different as we have two objects to manage: ## first the object on this page ($doc) #set($class = $doc.getObject('Sandbox.testClassOOPage1').xWikiClass) #foreach($prop in $class.properties) ; $prop.prettyName : $doc.display($prop.getName()) #end ## then the object (of a different class) on another page #set($docClass2 = $xwiki.getDocument('Sandbox.testClassOOPage2Example') ) $docClass2 #set($objectOfClass2 = $docClass2.getObject('Sandbox.testClassOOPage2').xWikiClass) #foreach($class2Prop in $objectOfClass2.properties) ; $class2Prop.prettyName : $docClass2.display($class2Prop.getName()) #end This works fine in view mode... But the problem is that we also need EDIT mode (inline) The form seems ok before saving , we have input controls for both objects (of different classes). We also see the data of both objects But when I modify the data of the second object in the form and press SAVE & VIEW the modification is not saved... How can we achieve our goal Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email
[xwiki-users] Table of content in a panel
Is it possible to use the TOC-macro in a side panel When I have a panel with the following code: {{velocity}} #panelheader('waihonaTableOfContent') {{toc start=1 depth=6 numbered=false scope=page /}} #panelfooter() {{/velocity}} And I place that panel on a page I'm getting no results? Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email
[xwiki-users] Passing param's with translation key's
Imagine this translation bundle: greeting=hello welcome=Welcome WaihonaCode.qbiClass_l1=I can {0} pass {1} {2} params too using the Java MessageFormat syntax my question: With app-within-minutes the following syntax is generated ; $escapetool.xml($doc.displayPrettyName("l1", false, false)) $doc.displayPrettyName("l1", false, false) will somehow look for a key: WaihonaCode.qbiClass_l1 Can we somehow pass the parameters as expected in the translation bundle with the displayPrettyName? If not what would be the code I need to enter to replace the functionality provided displayPrettyName Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email
Re: [xwiki-users] catch error on include macro
Verstuurd vanaf mijn iPhone > Op 20 mrt. 2017 om 13:17 heeft Vincent Massol het > volgende geschreven: > > Hi, > >> On 20 Mar 2017, at 13:08, Gerritjan Koekkoek wrote: >> >> I'm using: {{include document=".yyy"/}} quite a lot. >> >> When using it on a page where the current user has not the rights to view I >> get velocity error box! >> >> >> Is it possible to give the user some hint instead of the error: >> >> >> Like: "To read the complete content of this page you need to login!" with a >> link to Login… > > This is not related to logging in or not… It’s related to not having view > rights on the page… You can prevent some users or groups from having view > rights on any page/children even if the user is logged in. > > Now if you’re on page that shouldn’t work if the user is not logged in > (because it includes another page for which the user doesn’t have view > rights), then it probably means you have some wrong permissions set for the > current page and it should probably not be viewable by the user. > This assumption is not always true. This page has text that can be Viewed by guest and included a page that can/should not be viewed... In particular it should work to convince the reading user to consider login or registration and login. The velocity error will probably have the opposite effect... > Thanks > -Vincent > >> Gerritjan Koekkoek >> Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS >> Visit our website<http://www.cdlsworld.org> >> Facebook<https://www.facebook.com/gerritjan.koekkoek> >> email >> >> >> >
[xwiki-users] catch error on include macro
I'm using: {{include document=".yyy"/}} quite a lot. When using it on a page where the current user has not the rights to view I get velocity error box! Is it possible to give the user some hint instead of the error: Like: "To read the complete content of this page you need to login!" with a link to Login... Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email
[xwiki-users] default language
Hi, We have translation pages (holding a object of XWiki.TranslationDocumentClass) We have created these pages with Default language English The issue we have is that translation-key's have been modified, removed and added to the Dutch translation that are not part of the original English page (the default language) a: can we set the Dutch translation to be the default ...? (manually or by script) b: if not possible is there a script possible that takes the dutch content and copies it over the English content. Since we have many of these pages I'm looking for a script, otherwise we can off-course do it manually... Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email
[xwiki-users] Nice display title
It has always been normal that if a page did not have the attribute 'title' (it was left empty) it would use a smart way to see if in the text there was a header of level 1,2 or 3 at the top. And then display that as the title... Now I've migrated pages to a XWiki 8.4.4 and this does not work any more? What can cause this change in behavior ? Is it a known issue when migrating pages from 6.4 to ??? Is the nested pages a possible cause? I tried to put the h2 title in the title attribute as well, but still the pagename is shown as title? Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email
Re: [xwiki-users] Image as background
I tried to use SSX as best practise. I used below CSS3: .container-with-background { width: 100%; height: 500px; background-color: blue; background: url("$xwiki.getAttachmentURL($doc, ${xwiki.getDocument($doc).getObject('WaihonaCode.centresExpertiseClass').photo})") no-repeat center; background-size: cover; background-clip: padding-box; } Blue is just a color in this example, I Actually use a color related to the primary-color of color theme (flamingo) This works as long as $doc = page holding the SSX object. But I actually have a class, sheet and object page. So $doc in my case is the page holding the object. This returns a error: [Error] Failed to load resource: the server responded with a status of 404 (Not Found) ($xwiki.getAttachmentURL($doc, ${xwiki.getDocument($doc).getObject('WaihonaCode.centresExpertiseClass').photo}), line 0) The url generated is: ...ssx/space/($xwiki.getAttach...) Is there a way of accessing the variables required to call getAttachmentURL(); Full-doc name and a Object-property from the SSX? Or would it be, in this case, better to generate inline CSS in the sheet? (and use the Clean=false parameter) Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email From: users on behalf of Vincent Massol Sent: 08 February 2017 13:20:04 To: XWiki Users Subject: Re: [xwiki-users] Image as background Hi Gerritjan, > On 8 Feb 2017, at 13:16, Gerritjan Koekkoek wrote: > > Hi, > > > I have a attached image on a page. > > > My aim is to use the image as a background image, > > > So the resulting HTML should be > > > http://i54.tinypic.com/4zuxif.jpg)"> > > > So in the HTML-macro I have a $doc.getAttachmentURL('xxx.png') > > But executing it it looks like the wiki-engine is also transforming the > "background-image:" as a wiki image, so I get resource not found errors? > > > Any suggestion how to wrap? The best practice is to use a SSX: http://platform.xwiki.org/xwiki/bin/view/DevGuide/SkinExtensionsTutorial Note: Re the HTML macro please paste our exact content. The HTML macro will clean the HTML by default to make sure it generates valid XHTML. To prevent this cleanup , use clean=“false”. See the doc for the HTML macro for more details. Thanks -Vincent > Gerritjan Koekkoek > Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS > Visit our website<http://www.cdlsworld.org> > Facebook<https://www.facebook.com/gerritjan.koekkoek> > email > > >
[xwiki-users] Image as background
Hi, I have a attached image on a page. My aim is to use the image as a background image, So the resulting HTML should be http://i54.tinypic.com/4zuxif.jpg)"> So in the HTML-macro I have a $doc.getAttachmentURL('xxx.png') But executing it it looks like the wiki-engine is also transforming the "background-image:" as a wiki image, so I get resource not found errors? Any suggestion how to wrap? Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email
Re: [xwiki-users] jodatime challenge
Reading the documentation of the XWiki JoDaTime module (XWiki services based) I feel it holds a lot of value next to $datetool and $datecomparisontool (velocity based) But I fail to understand the documentation http://extensions.xwiki.org/xwiki/bin/view/Extension/Joda+Time+Plugin As the examples are quite easy to read they did not clarify me enough to just use date-values stored in XWiki XObjectProperties of type date What default format does the property deliver; Should I use $doc.Display(date-property)? , $doc.Display(date-property).value() or $object.getProperty(date-property) What I understand from JoDaTime is that it is great to render dates in 'view' mode in the internationally localized format (Dutch Notation vs English Notation), but when I switch to 'edit' mode how can I have a DateWidget understands that format So my simple question was to calculate the age based on a date-property in a wiki object and Now? Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email From: users on behalf of [IDIS Technical Secretariat] Ricardo Rodríguez Sent: 20 January 2017 09:36:05 To: XWiki Users Subject: Re: [xwiki-users] jodatime challenge Thanks Vincent! On Fri, Jan 20, 2017 at 9:06 AM Vincent Massol wrote: > Hi, > > > On 20 Jan 2017, at 08:27, [IDIS Technical Secretariat] Ricardo Rodríguez > wrote: > > > > Hi! The same code works fine in an XWiki 7.3 installation... > > > > http://portal.idisantiago.es/xwiki/bin/view/ICT/PureDate/ > > > > Thus, "my" problem is to find where ComparisonDateTool is located in this > > installation and make it works in a legacy XWiki Enterprise 2.4.30451 > one. > > Wow XE 2.4 is really old... > > I don’t remember if the $datetool binding was available and it’s possible > that it wasn’t. > > FYI it’s located in a java class in the xwiki-velocity*.jar file. > > Yes, XE 2.4 is really a paleoXWiki installation! But it is still solving some problems to me here! That pending migration is still a pending migration/upgrade... Some notes on this issue in comments here... http://atriumkm.idisantiago.es/bin/ICT/PureDate I'll give it a try ASAP! Cheers! > Thanks > -Vincent > > > > > Any help will be welcome! Thank! > > > > On Thu, Jan 19, 2017 at 11:41 PM [IDIS Technical Secretariat] Ricardo > > Rodríguez wrote: > > > >> Hi! I've been these last days trying to regain access to an ancient > issue > >> while dealing with dates. Searching Jira I found this... > >> > >> http://jira.xwiki.org/browse/XWIKI-5610?jql=text%20~%20%22datetool%22 > >> > >> ... and this at XWiki Platforma site... > >> > >> http://platform.xwiki.org/xwiki/bin/view/SRD/datetool > >> > >> To the best of my understanding ComparisonDateTool is implemented and > >> accessible through $datetool velocity variable. But I'm not able to get > it > >> working. > >> > >> On Thu, Jan 19, 2017 at 3:54 PM Hamster wrote: > >> > >> Have you checked the documentation for the DateTool > >> < > >> > https://velocity.apache.org/tools/devel/apidocs/org/apache/velocity/tools/generic/DateTool.html > >>> > >> and the ComparisonDateTool > >> < > >> > https://velocity.apache.org/tools/devel/apidocs/org/apache/velocity/tools/generic/ComparisonDateTool.html > >>> > >> ? > >> > >> > >> Please, check this page... > >> > >> http://atriumkm.idisantiago.es/bin/ICT/PureDate > >> > >> I'm able to get working the examples at DateTool page, but not those at > >> ComparisonDateTool page. Please, could anybody point us in the right > >> direction? Where are we failing? > >> > >> > >> -- > >> View this message in context: > >> > http://xwiki.475771.n2.nabble.com/jodatime-challenge-tp7602468p7602489.html > >> Sent from the XWiki- Users mailing list archive at Nabble.com. > >> > >> > >> Thank you very much for your work! > >> > >> Ricardo > >> -- > >> Ricardo Rodríguez > >> Research Management and Promotion Technician > >> Technical Secretariat > >> Health Research Institute of Santiago de Compostela (IDIS) > >> http://www.idisantiago.es > >> > > -- > > Ricardo Rodríguez > > Research Management and Promotion Technician > > Technical Secretariat > > Health Research Institute of Santiago de Compostela (IDIS) > > http://www.idisantiago.es > > -- Ricardo Rodríguez Research Management and Promotion Technician Technical Secretariat Health Research Institute of Santiago de Compostela (IDIS) http://www.idisantiago.es
[xwiki-users] jodatime challenge
Hi, I would like to calculate the age of a person in years I have the date of birth stored in a XWiki class-object in a property of type Date/Time The age should be calculated against NOW! (Sysdate in local-user time, although the rounding in years does not make this a very important requirement. Also I would like to be able to calculate a duration by subtracting two dates stored in a XWiki class-object in a property of type Date/Time Please a velocity-based guidance how to do this? (JoDaTime based) Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email
[xwiki-users] Muliple xForms on One page
Hi, Is it possible to have multiple xForms on one page when the objects to be edited are not on the same page. We have a object of class "child" and a object of Class "parent"; each object is stored on it's own page. But users would like to be able to modify the object of class "header" while they are editing the object of class In my headerClass sheet I have... {{velocity}} ## You can modify this page to customize the presentation of your object. ## At first you should keep the default presentation and just save the document. #if(!$headerDoc) #set($headerDoc = $xwiki.getDocument("Sandbox.testHeader")) #end #set($classHeader = $headerDoc.getObject('Sandbox.classHeader').xWikiClass) #foreach($prop in $classHeader.properties) ; $prop.prettyName : $headerDoc.display($prop.getName()) #end {{/velocity}} In my childClass sheet I have: {{velocity}} #set($headerDoc = $xwiki.getDocument("Sandbox.testHeader") ) {{display reference="$headerDoc"/}} ## You can modify this page to customize the presentation of your object. ## At first you should keep the default presentation and just save the document. #set($class = $doc.getObject('Sandbox.classChild').xWikiClass) #foreach($prop in $class.properties) ; $prop.prettyName : $doc.display($prop.getName()) #end {{/velocity}} When I create or edit the page holding the childClass object I do get the impression I can Edit the header object, but when I save only the properties of the child object are saved? Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email
[xwiki-users] Version comment too long to view
We have editors that modified wiki pages and used the comment option that goes with a version. But when viewing version history we see some comments ending with."..." This suggests that the rest of the comment is in the database, but not viewable by the version history table Is there a way to view the full comment made with a version Is there a maximum text size for version comments Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email
[xwiki-users] How to suppress default date in xForms based on XWiki Class
We have classes with date properties Of these properties we set "Empty Is Today" = false In the sheet we use ; $escapetool.xml($doc.displayPrettyName('d1', false, false)) : $doc.display('d1') It displays a date and when saving the property is saved with that date while user did not enter any date. The date seems to be connected to the class-page-date? The requirement is that the field can be left empty! Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email
[xwiki-users] Gaptscha alternative
Hi, What alternatives to the default Gaptscha can be used? And how? I like the 'I am not a robot' checkboxes that we see on more and more sites. Our users complain about the read-ability of the current XWiki Gaptscha version Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email
Re: [xwiki-users] SOLR Search, using
But that page does not tell me how to Set ShowFacet = true/false Set highlighting = On/Off I tried to remove all the 'facetFields': But that did not help Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email From: users on behalf of Thomas Mortagne Sent: 13 December 2016 09:03:01 To: XWiki Users Subject: Re: [xwiki-users] SOLR Search, using On Tue, Dec 13, 2016 at 8:21 AM, Gerritjan Koekkoek wrote: > What and how should I supply solr-config parameters to: > > > - Not generate the Facet, drill down feature (as there is a button in the UI!) > > - Enable/Disable highlighting (as there is a button in the UI!) Facet and highlighting can be enabled/disabled in the search page itself or more generally in the Main.SolrSearchConfig page. See http://extensions.xwiki.org/xwiki/bin/view/Extension/Solr+Search+Application#HSearchUIConfiguration for more about customizing the solr configuration. > > > - How can I specify the spaces (multiple) (Actually Nested pages as I'm on > 8.xx) that should be excluded or Included in the search? Are there other > paramaters that need to be supplied when using the spaces (nested Pages) > > > What is the place to add/remove HtML-classes to tune what the user will see; > as the default displays a lot of metadata of the pages (Located in, Last > modified, ...) > > > Gerritjan Koekkoek > Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS > Visit our website<http://www.cdlsworld.org> > Facebook<https://www.facebook.com/gerritjan.koekkoek> > email > > > -- Thomas Mortagne
[xwiki-users] SOLR Search, using
What and how should I supply solr-config parameters to: - Not generate the Facet, drill down feature (as there is a button in the UI!) - Enable/Disable highlighting (as there is a button in the UI!) - How can I specify the spaces (multiple) (Actually Nested pages as I'm on 8.xx) that should be excluded or Included in the search? Are there other paramaters that need to be supplied when using the spaces (nested Pages) What is the place to add/remove HtML-classes to tune what the user will see; as the default displays a lot of metadata of the pages (Located in, Last modified, ...) Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email
[xwiki-users] Using computed field in a class
We use computed field in a class We would like that the sheet, that creates a xform for this class, displays these fields always in a 'disabled' mode (read-only) Using $doc.display('computedField') currently presents the field Editable when the user is creating a new object or edits the existing object of class We tried using $doc.display('computedField','view') but this has no effect on the computedFields; funny enough $doc.display('normalField', 'view') does put the field in 'view' (read-only) mode. We would actually prefer that it will just a 'disabled' tag to the form field Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email
Re: [xwiki-users] Content conversion
thanks, Got it: #set($test2Doc = $xwiki.getDocument('Sandbox.testImageCount').getTranslatedDocument()) #foreach($imageBlock in $test2Doc.getDocument().getXDOM().getBlocks("class:ImageBlock", "DESCENDANT")) $imageBlock.getReference().reference #end But can I do the same for a Blog attribute: (extract) ? Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email From: users on behalf of Thomas Mortagne Sent: 05 December 2016 16:49 To: XWiki Users Subject: Re: [xwiki-users] Content conversion On Mon, Dec 5, 2016 at 4:42 PM, Gerritjan Koekkoek wrote: > You are right; renaming Sandbox.testImageCount as a terminal page changed the > situation. getting closer > > > The output of: > > #set($test2Doc = > $xwiki.getDocument('Sandbox.testImageCount').getTranslatedDocument()) > > {{{$test2Doc.content}}} > > $test2Doc.getDocument().getXDOM().getBlocks("class:ImageBlock", > "DESCENDANT").class.name > > {{{$test2Doc.getDocument().getXDOM().getBlocks("class:ImageBlock", > "DESCENDANT")}}} > > is: > > Sandbox.testImageCount > > Dit is text Dit is text Dit is text [[image:logo-amc.png]] Dit is textDit is > text Dit is textDit is text Dit is textDit is text Dit is textDit is text Dit > is textDit is text Dit is textDit is text Dit is text > java.util.ArrayList > [org.xwiki.rendering.block.ImageBlock@bd3e4fc7] > > > But how can I transform this to a list of images? You can get the reference of the image using method ImageBlock#getReference(). It will give you an instance of ResourceReference (actually in this use case it should be a AttachmentResourceReference which extends ResourceReference probably). See http://nexus.xwiki.org/nexus/service/local/repositories/releases/archive/org/xwiki/rendering/xwiki-rendering-api/8.4.1/xwiki-rendering-api-8.4.1-javadoc.jar/!/index.html for more details. > > > > Gerritjan Koekkoek > Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS > Visit our website<http://www.cdlsworld.org> > Facebook<https://www.facebook.com/gerritjan.koekkoek> > email > > > > > From: users on behalf of Thomas Mortagne > > Sent: 05 December 2016 16:32:32 > To: XWiki Users > Subject: Re: [xwiki-users] Content conversion > > Are you sure "Sandbox.testImageCount'" is the right reference ? Do you > have something when you print $test2Doc.content ? > > If "Sandbox.testImageCount" does not exist maybe you need to try > "Sandbox.testImageCount.WebHome". > > On Mon, Dec 5, 2016 at 4:24 PM, Gerritjan Koekkoek > wrote: >> I fail to understand the rendering framework suggestion >> >> #set($test2Doc = >> $xwiki.getDocument('Sandbox.testImageCount').getTranslatedDocument()) >> >> $test2Doc.getDocument().getXDOM().getBlocks("class:ImageBlock", "DESCENDANT") >> >> Gives me a empty array, although the source document looks like this (XWiki >> 2.1) >> >> Dit is text >> Dit is text >> Dit is text >> >> [[image:logo-amc.png]] >> Dit is textDit is text >> Dit is textDit is text >> Dit is textDit is text >> Dit is textDit is text >> Dit is textDit is text >> Dit is textDit is text >> >> Note that I would like to extract from this: "logo-amc.png" >> >> >> Gerritjan Koekkoek >> Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS >> Visit our website<http://www.cdlsworld.org> >> Facebook<https://www.facebook.com/gerritjan.koekkoek> >> email >> >> >> >> >> From: users on behalf of Thomas Mortagne >> >> Sent: 02 December 2016 11:41:40 >> To: XWiki Users >> Subject: Re: [xwiki-users] Content conversion >> >> On Fri, Dec 2, 2016 at 11:02 AM, Gerritjan Koekkoek >> wrote: >>> Is it possible to get what images are inside a content page. >>> >>> Note I do not mean Attached images, but the images displayed inline in the >>> content >> >> You can parse any content into XDOM and then search for ImageBlock in >> it. See >> http://rendering.xwiki.org/xwiki/bin/view/Main/GettingStarted#HExamples. >> >>> >>> >>> Is it also possible to display the content without these images, as plain >>> Text (also remove the wiki-markup ) >> >> We usually use plain text rendered (id "plain/1.0") for this. >> Basically you use rendering framework to parse the content and then >> serialize it with a special plain text renderer. >> >>> >>> >>> Gerritjan Koekkoek >>> Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS >>> Visit our website<http://www.cdlsworld.org> >>> Facebook<https://www.facebook.com/gerritjan.koekkoek> >>> email >>> >>> >>> >> >> >> >> -- >> Thomas Mortagne > > > > -- > Thomas Mortagne -- Thomas Mortagne
Re: [xwiki-users] Content conversion
You are right; renaming Sandbox.testImageCount as a terminal page changed the situation. getting closer The output of: #set($test2Doc = $xwiki.getDocument('Sandbox.testImageCount').getTranslatedDocument()) {{{$test2Doc.content}}} $test2Doc.getDocument().getXDOM().getBlocks("class:ImageBlock", "DESCENDANT").class.name {{{$test2Doc.getDocument().getXDOM().getBlocks("class:ImageBlock", "DESCENDANT")}}} is: Sandbox.testImageCount Dit is text Dit is text Dit is text [[image:logo-amc.png]] Dit is textDit is text Dit is textDit is text Dit is textDit is text Dit is textDit is text Dit is textDit is text Dit is textDit is text Dit is text java.util.ArrayList [org.xwiki.rendering.block.ImageBlock@bd3e4fc7] But how can I transform this to a list of images? Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email From: users on behalf of Thomas Mortagne Sent: 05 December 2016 16:32:32 To: XWiki Users Subject: Re: [xwiki-users] Content conversion Are you sure "Sandbox.testImageCount'" is the right reference ? Do you have something when you print $test2Doc.content ? If "Sandbox.testImageCount" does not exist maybe you need to try "Sandbox.testImageCount.WebHome". On Mon, Dec 5, 2016 at 4:24 PM, Gerritjan Koekkoek wrote: > I fail to understand the rendering framework suggestion > > #set($test2Doc = > $xwiki.getDocument('Sandbox.testImageCount').getTranslatedDocument()) > > $test2Doc.getDocument().getXDOM().getBlocks("class:ImageBlock", "DESCENDANT") > > Gives me a empty array, although the source document looks like this (XWiki > 2.1) > > Dit is text > Dit is text > Dit is text > > [[image:logo-amc.png]] > Dit is textDit is text > Dit is textDit is text > Dit is textDit is text > Dit is textDit is text > Dit is textDit is text > Dit is textDit is text > > Note that I would like to extract from this: "logo-amc.png" > > > Gerritjan Koekkoek > Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS > Visit our website<http://www.cdlsworld.org> > Facebook<https://www.facebook.com/gerritjan.koekkoek> > email > > > > > From: users on behalf of Thomas Mortagne > > Sent: 02 December 2016 11:41:40 > To: XWiki Users > Subject: Re: [xwiki-users] Content conversion > > On Fri, Dec 2, 2016 at 11:02 AM, Gerritjan Koekkoek > wrote: >> Is it possible to get what images are inside a content page. >> >> Note I do not mean Attached images, but the images displayed inline in the >> content > > You can parse any content into XDOM and then search for ImageBlock in > it. See > http://rendering.xwiki.org/xwiki/bin/view/Main/GettingStarted#HExamples. > >> >> >> Is it also possible to display the content without these images, as plain >> Text (also remove the wiki-markup ) > > We usually use plain text rendered (id "plain/1.0") for this. > Basically you use rendering framework to parse the content and then > serialize it with a special plain text renderer. > >> >> >> Gerritjan Koekkoek >> Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS >> Visit our website<http://www.cdlsworld.org> >> Facebook<https://www.facebook.com/gerritjan.koekkoek> >> email >> >> >> > > > > -- > Thomas Mortagne -- Thomas Mortagne
Re: [xwiki-users] Content conversion
I fail to understand the rendering framework suggestion #set($test2Doc = $xwiki.getDocument('Sandbox.testImageCount').getTranslatedDocument()) $test2Doc.getDocument().getXDOM().getBlocks("class:ImageBlock", "DESCENDANT") Gives me a empty array, although the source document looks like this (XWiki 2.1) Dit is text Dit is text Dit is text [[image:logo-amc.png]] Dit is textDit is text Dit is textDit is text Dit is textDit is text Dit is textDit is text Dit is textDit is text Dit is textDit is text Note that I would like to extract from this: "logo-amc.png" Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email From: users on behalf of Thomas Mortagne Sent: 02 December 2016 11:41:40 To: XWiki Users Subject: Re: [xwiki-users] Content conversion On Fri, Dec 2, 2016 at 11:02 AM, Gerritjan Koekkoek wrote: > Is it possible to get what images are inside a content page. > > Note I do not mean Attached images, but the images displayed inline in the > content You can parse any content into XDOM and then search for ImageBlock in it. See http://rendering.xwiki.org/xwiki/bin/view/Main/GettingStarted#HExamples. > > > Is it also possible to display the content without these images, as plain > Text (also remove the wiki-markup ) We usually use plain text rendered (id "plain/1.0") for this. Basically you use rendering framework to parse the content and then serialize it with a special plain text renderer. > > > Gerritjan Koekkoek > Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS > Visit our website<http://www.cdlsworld.org> > Facebook<https://www.facebook.com/gerritjan.koekkoek> > email > > > -- Thomas Mortagne
Re: [xwiki-users] Content conversion
{{velocity}} $services.rendering.getAvailableParserSyntaxes() #set($testDoc = $xwiki.getDocument('BlogNL.Peter')) #set($testObject = $testDoc.getObject('Blog.BlogPostClass')) #set ($xdom = $services.rendering.parse("${testObject.extract}","XWiki/2.0")) #set ($plainText = $services.rendering.render($xdom, "Plain/1.0")) {{{$plainText}}} {{/velocity}} But plainText is not showing anything Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email From: users on behalf of Thomas Mortagne Sent: 02 December 2016 11:41:40 To: XWiki Users Subject: Re: [xwiki-users] Content conversion On Fri, Dec 2, 2016 at 11:02 AM, Gerritjan Koekkoek wrote: > Is it possible to get what images are inside a content page. > > Note I do not mean Attached images, but the images displayed inline in the > content You can parse any content into XDOM and then search for ImageBlock in it. See http://rendering.xwiki.org/xwiki/bin/view/Main/GettingStarted#HExamples. > > > Is it also possible to display the content without these images, as plain > Text (also remove the wiki-markup ) We usually use plain text rendered (id "plain/1.0") for this. Basically you use rendering framework to parse the content and then serialize it with a special plain text renderer. > > > Gerritjan Koekkoek > Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS > Visit our website<http://www.cdlsworld.org> > Facebook<https://www.facebook.com/gerritjan.koekkoek> > email > > > -- Thomas Mortagne
Re: [xwiki-users] Content conversion
OK, any documentation available for rendering conversion? We would like to see it applied in velocity? Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email From: users on behalf of Thomas Mortagne Sent: 02 December 2016 11:41:40 To: XWiki Users Subject: Re: [xwiki-users] Content conversion On Fri, Dec 2, 2016 at 11:02 AM, Gerritjan Koekkoek wrote: > Is it possible to get what images are inside a content page. > > Note I do not mean Attached images, but the images displayed inline in the > content You can parse any content into XDOM and then search for ImageBlock in it. See http://rendering.xwiki.org/xwiki/bin/view/Main/GettingStarted#HExamples. > > > Is it also possible to display the content without these images, as plain > Text (also remove the wiki-markup ) We usually use plain text rendered (id "plain/1.0") for this. Basically you use rendering framework to parse the content and then serialize it with a special plain text renderer. > > > Gerritjan Koekkoek > Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS > Visit our website<http://www.cdlsworld.org> > Facebook<https://www.facebook.com/gerritjan.koekkoek> > email > > > -- Thomas Mortagne
[xwiki-users] Content conversion
Is it possible to get what images are inside a content page. Note I do not mean Attached images, but the images displayed inline in the content Is it also possible to display the content without these images, as plain Text (also remove the wiki-markup ) Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email
[xwiki-users] How to register macro's
Due to some action all macro's on my XWiki are giving errors; not registered. How can I do a batch registration to fix that problem... Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] AGE and calculating date
Thanks Vincent, great. How would you advise to add this to a xForm. We would like to allow the user in EDIT mode to enter years, months and days (since birth) I would then specify a class with a number/integer Attribute age, type Number/Integer $doc.display(age) would give me a numeric field to enter in HTML Should I use: - Custom display using joda - A piece of velocity in the sheet using joda - a piece of Javascript showing to the user a set of controls Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email From: users on behalf of Vincent Massol Sent: 14 November 2016 09:05:04 To: XWiki Users Subject: Re: [xwiki-users] AGE and calculating date Hi, > On 14 Nov 2016, at 08:56, Gerritjan Koekkoek wrote: > > Hi, > > > I think this might a velocity/java script or groovy question more as a xwiki > question. > > > We want to record a age (Period of days/seconds since birth date). > > What datatype would you recommend: > > - String structured > > - Numeric integer of Days or Seconds I’d use a Number. > - Date/Time > > > We would like to be able to display the data as: > > - Date notation > > - Years, Months, Weeks > > - Years, Months, Days > > - Years, Months > > > Things to consider is that each month has different period lengths in days > and that each 4 years we have different number of days in a year > > > > Should/Can we do this server side (velocity) > > What velocity tools or services can we use I’d use Joda Time ($xwiki.jodatime). See http://extensions.xwiki.org/xwiki/bin/view/Extension/Joda+Time+Plugin You should google jodatime to find out all its API (it’s quite rich). Thanks -Vincent > Gerritjan Koekkoek > Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS > Visit our website<http://www.cdlsworld.org> > Facebook<https://www.facebook.com/gerritjan.koekkoek> > email ___ 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] AGE and calculating date
Thanks Vincent, great. How would you advise to add this to a xForm. We would like to allow the user in EDIT mode to enter years, months and days (since birth) I would then specify a class with a number/integer Attribute age, type Number/Integer $doc.display(age) would give me a numeric field to enter in HTML Should I use: - Custom display using joda - A piece of velocity in the sheet using joda - a piece of Javascript showing to the user a set of controls Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email From: users on behalf of Vincent Massol Sent: 14 November 2016 09:05:04 To: XWiki Users Subject: Re: [xwiki-users] AGE and calculating date Hi, > On 14 Nov 2016, at 08:56, Gerritjan Koekkoek wrote: > > Hi, > > > I think this might a velocity/java script or groovy question more as a xwiki > question. > > > We want to record a age (Period of days/seconds since birth date). > > What datatype would you recommend: > > - String structured > > - Numeric integer of Days or Seconds I’d use a Number. > - Date/Time > > > We would like to be able to display the data as: > > - Date notation > > - Years, Months, Weeks > > - Years, Months, Days > > - Years, Months > > > Things to consider is that each month has different period lengths in days > and that each 4 years we have different number of days in a year > > > > Should/Can we do this server side (velocity) > > What velocity tools or services can we use I’d use Joda Time ($xwiki.jodatime). See http://extensions.xwiki.org/xwiki/bin/view/Extension/Joda+Time+Plugin You should google jodatime to find out all its API (it’s quite rich). Thanks -Vincent > Gerritjan Koekkoek > Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS > Visit our website<http://www.cdlsworld.org> > Facebook<https://www.facebook.com/gerritjan.koekkoek> > email ___ 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] AGE and calculating date
Hi, I think this might a velocity/java script or groovy question more as a xwiki question. We want to record a age (Period of days/seconds since birth date). What datatype would you recommend: - String structured - Numeric integer of Days or Seconds - Date/Time We would like to be able to display the data as: - Date notation - Years, Months, Weeks - Years, Months, Days - Years, Months Things to consider is that each month has different period lengths in days and that each 4 years we have different number of days in a year Should/Can we do this server side (velocity) What velocity tools or services can we use Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Attachment Application
I'm trying to use the macro from the Attachment Application. {{attachmentSelector classname="$campaignClass" property="picture1" buttontext="$escapetool.xml($doc.displayPrettyName('campaignUIString', false, false))" savemode="direct" displayImage="true" width="120" link="true" targetdocname="Photos.CdLSnl"/}} Issue is that the image file name; selected by the picker, is stored in the property picture1 without the page reference. Because we have provided a targetdocname. The documentation: targetdocname: An optional reference to a document to use as the source (and target) for the attachments to display. By default the current document is used. So we want stored in picture1 a string photos.cdl...@picture.jpg But it stores: picture.jpg We need the complete document and filename since our application is using multiple displayers, not only the macro version Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] XWiki 8 migration JSX Extension velocity parse
Yes : parse was/is set to true Verstuurd vanaf mijn iPhone > Op 13 okt. 2016 om 12:13 heeft Guillaume Delhumeau > het volgende geschreven: > > Hello. > > On your JavaScript Skin Extension object, have you set "Parse content" to > "yes"? > > 2016-10-12 13:59 GMT+02:00 Gerritjan Koekkoek : > >> Hi, >> >> >> We have this javascript function >> >> function getStats(event) { >> >>var url = "$xwiki.getURL('cdlsDashboard.statsGlobal', >> 'view')?xpage=plain&outputSyntax=plain"; >> >>request(url, setStats, event); >> >> } >> >> Since migration to version 8 the browser console shows a strange get >> function and resulting error: >> cdlsworld.devxwiki.com/xwiki/bin/view/cdlsDashboard/$xwiki. >> getURL('cdlsDashboard.statsGlobal',%20'view') >> >> It looks like the velocity is not based before creating a javascript? >> I've had similar in a stylesheet extension >> >> Is something changed in version XWiki 8 (we came from 6.4.x)? >> >> >> Gerritjan Koekkoek >> Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS >> Visit our website<http://www.cdlsworld.org> >> Facebook<https://www.facebook.com/gerritjan.koekkoek> >> email >> >> >> >> ___ >> users mailing list >> users@xwiki.org >> http://lists.xwiki.org/mailman/listinfo/users >> > > > > -- > Guillaume Delhumeau (guillaume.delhum...@xwiki.com) > Research & Development Engineer at XWiki SAS > Committer on the XWiki.org project > ___ > 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] XWiki 8 migration JSX Extension velocity parse
Hi, We have this javascript function function getStats(event) { var url = "$xwiki.getURL('cdlsDashboard.statsGlobal', 'view')?xpage=plain&outputSyntax=plain"; request(url, setStats, event); } Since migration to version 8 the browser console shows a strange get function and resulting error: cdlsworld.devxwiki.com/xwiki/bin/view/cdlsDashboard/$xwiki.getURL('cdlsDashboard.statsGlobal',%20'view') It looks like the velocity is not based before creating a javascript? I've had similar in a stylesheet extension Is something changed in version XWiki 8 (we came from 6.4.x)? Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Display macro
Hi Vincent, I must admit the extension Include-macro en Display-macro documentation does not contain any suggestion that it does not work. I posted my question as I'm very sure I came across this statement that it would not work in some doc I found via google search ... when I come across it again I will notify you... Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email From: users on behalf of Vincent Massol Sent: 07 October 2016 09:53:03 To: XWiki Users Subject: Re: [xwiki-users] Display macro > On 07 Oct 2016, at 09:48, Gerritjan Koekkoek wrote: > > When in Velocity generating HTML > > {{velocity}} > > {{html}} > > #foreaech() > > #if(display instead of include is required) > >{{display reference ='page that only works when using display'/}} > > #else > >#includeInContext(page that does not require display) > > #end > > {{/html}} > > {{/velocity}} > > > What is the velocity macro (or code snippet) to make it work? > > > As documented the {{display}} or {{include}} does not work from within the > velocity and/or html macro. They do work. Where did you see that in the doc? Could you give the link so that we fix it? Thanks -Vincent > Documentation could maybe be improved by adding what to do when this calling > from within Velocity/html is required > > > Gerritjan Koekkoek > Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS > Visit our website<http://www.cdlsworld.org> > Facebook<https://www.facebook.com/gerritjan.koekkoek> > email > > ___ 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] Display macro
Thanks Thomas, But the code in the example is just to show the outline... Believe me: I need HTML around the foreach loop to set enclosing div's and jquery and/or bootstrap classes But your help was great; including the wiki="true" parameter in the html macro makes the display work fine... Thanks Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email From: users on behalf of Thomas Mortagne Sent: 07 October 2016 09:56:40 To: XWiki Users Subject: Re: [xwiki-users] Display macro On Fri, Oct 7, 2016 at 9:48 AM, Gerritjan Koekkoek wrote: > When in Velocity generating HTML > > {{velocity}} > > {{html}} > > #foreaech() > > #if(display instead of include is required) > > {{display reference ='page that only works when using display'/}} > > #else > > #includeInContext(page that does not require display) > > #end > > {{/html}} > > {{/velocity}} > > > What is the velocity macro (or code snippet) to make it work? > > > As documented the {{display}} or {{include}} does not work from within the > velocity and/or html macro. Documentation could maybe be improved by adding > what to do when this calling from within Velocity/html is required Using {{display}} or {{include}} works well in Velocity. But html macro disable wiki syntax by default and those are wiki syntax (see http://extensions.xwiki.org/xwiki/bin/view/Extension/HTML+Macro#HParametersdefinition). That said there is no reason to use html in the example you are giving (use {{include}} instead of #includeInContex). > > > Gerritjan Koekkoek > Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS > Visit our website<http://www.cdlsworld.org> > Facebook<https://www.facebook.com/gerritjan.koekkoek> > email > > > > ___ > users mailing list > users@xwiki.org > http://lists.xwiki.org/mailman/listinfo/users -- Thomas Mortagne ___ 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] Display macro
When in Velocity generating HTML {{velocity}} {{html}} #foreaech() #if(display instead of include is required) {{display reference ='page that only works when using display'/}} #else #includeInContext(page that does not require display) #end {{/html}} {{/velocity}} What is the velocity macro (or code snippet) to make it work? As documented the {{display}} or {{include}} does not work from within the velocity and/or html macro. Documentation could maybe be improved by adding what to do when this calling from within Velocity/html is required Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] XWQL datatype question
Thanks, code checked, made some improvements. But the query should recognize that both class attributes are of type DBLIST. the question is how I should specify the where clause: so where dblist_property1 = :bindvalue1 and dblist_property2 = :bindvalue2 What should we put in our two bindvalue's ? a string: 'text' a array: ['text'] a object {text} Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email From: users on behalf of Guillaume Delhumeau Sent: 28 September 2016 12:12:16 To: XWiki Users Subject: Re: [xwiki-users] XWQL datatype question Hi. Note that this line: #set( $qParticipations = "from doc.object('$participationClassName') as participation where doc.fullName <> 'waihonapediaResearchParticipationTemplate' and participation.research = :thisresearch" and participation.family = :thisUser) is invalid (you closed the " too soon). But I guess it's not your problem. Also, I really doubt that you have a page called 'waihonapediaResearchParticipationTemplate' (it's supposed to be a fullname). There is also invalid simple quotes (') in doc.object. So the correct query should be: #set( $qParticipations = "from doc.object(WaihonaCode. waihonapediaResearchParticipationClass) as participation where doc.fullName <> 'WaihonaCode.waihonapediaResearchParticipationTemplate' and participation.research = :thisresearch and participation.family = :thisUser") I hope it helps, 2016-09-27 14:03 GMT+02:00 Gerritjan Koekkoek : > Hi, > > > I have this class: > > #set( $participationClassName = "WaihonaCode. > waihonapediaResearchParticipationClass" ) > > > Class properties > > researchparticipation.family (family: List of Users) > > researchparticipation.research (research: Database List) > > researchparticipation.participate (participate: Boolean) > > researchparticipation.datasend (datasend: Boolean) > > > > I have this XWQL: > > > #set( $qParticipations = "from doc.object('$participationClassName') as > participation where doc.fullName <> > 'waihonapediaResearchParticipationTemplate' > and participation.research = :thisresearch" and participation.family = > :thisUser) > > > I'm getting velocity error: > > Caused by: org.hibernate.QueryException: could not resolve property: > research of: com.xpn.xwiki.objects.BaseObject [ select doc.fullName from > com.xpn.xwiki.doc.XWikiDocument as doc , com.xpn.xwiki.objects.BaseObject > as participation where > > > When doing similar on a class where class properties are of type string I > have no Issues? > > What should I do with these properties: List of Users (always only 1) and > Database List (always only 1)? > > > Gerritjan Koekkoek > Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS > Visit our website<http://www.cdlsworld.org> > Facebook<https://www.facebook.com/gerritjan.koekkoek> > email > > > > ___ > users mailing list > users@xwiki.org > http://lists.xwiki.org/mailman/listinfo/users > -- Guillaume Delhumeau (guillaume.delhum...@xwiki.com) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project ___ 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] XWQL datatype question
Hi, I have this class: #set( $participationClassName = "WaihonaCode.waihonapediaResearchParticipationClass" ) Class properties researchparticipation.family (family: List of Users) researchparticipation.research (research: Database List) researchparticipation.participate (participate: Boolean) researchparticipation.datasend (datasend: Boolean) I have this XWQL: #set( $qParticipations = "from doc.object('$participationClassName') as participation where doc.fullName <> 'waihonapediaResearchParticipationTemplate' and participation.research = :thisresearch" and participation.family = :thisUser) I'm getting velocity error: Caused by: org.hibernate.QueryException: could not resolve property: research of: com.xpn.xwiki.objects.BaseObject [ select doc.fullName from com.xpn.xwiki.doc.XWikiDocument as doc , com.xpn.xwiki.objects.BaseObject as participation where When doing similar on a class where class properties are of type string I have no Issues? What should I do with these properties: List of Users (always only 1) and Database List (always only 1)? Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Change page into terminal page
Hi Vincent Hi Gerritjan, >> On 27 Sep 2016, at 10:01, Gerritjan Koekkoek wrote: >> >> We have just migrated from 6.4 to 8.2.x >> >> >> A page holding a UIEXtension object has a parameter: >> >> icon=image:cdlsservices.cdlsn...@nw-news-icon.png >> >> >> In a panel we display the pages holding these UIExtension objects >> >> To display the image we use: >> >> #set($icon = >> $services.rendering.render($services.rendering.parse("image:${params.icon}", >> 'xwiki/2.1'), 'xhtml/1.0')) >> >> It used to generate a string: >> xwiki/bin/download/cdlsServices/cdlsNews/nw-news-icon.png >> >> But after migration it generates: Actually we did NOT do a migration, just a upgrade of the wiki and a execution of the upgrade wizard! >> xwiki/bin/download/cdlsServices/cdlsNews/WebHome/nw-news-icon.png >> (notice the WebHome part...) > >This shouldn't have changed after upgrading to 8.2.x. Unless you've modified >the page >cdlsServices.cdlsNews and transformed it into a non-terminal page >(in this case you transformed its >reference from cdlsServices.cdlsNews to >cdlsServices.cdlsNews.WebHome). No we did not migrate the pages to a different structure, just did not touch them at all, although, trying to fix the problem I have edited ad saved the page many times, but nothing special >> The browser reports that it can not find the image!. When going to the >> attached image and showing it: >> xwiki/bin/download/cdlsServices/cdlsNews/nw-news-icon.png >> And this url display's the image. >> >> I guess there are multiple paths to a solution here? >> - Can I change the page holding the UIExtension to a terminal page? How? > >Yes but again the upgrade to 8.2.1 isn't changing any page so you must have >done something. Have you >executed the Nested Page Migrator on this page for >example? > >Yes you can change it back to terminal indeed, see > >http://platform.xwiki.org/xwiki/bin/view/Features/DocumentLifecycle#HMove2FRename<http://platform.xwiki.org/xwiki/bin/view/Features/DocumentLifecycle#HMove2FRename> When I did a rename the target page was already marked as Terminal-page? But that did not fix my issue. Then I did a rename unchecking the 'terminal page' box and this made the picture appear (so still using: #set($icon = $services.rendering.render($services.rendering.parse("image:${params.icon}", 'xwiki/2.1'), 'xhtml/1.0')) > >> - different use of rendering services? >> >You could also keep the page as Nested (ie non terminal) and use: >icon=image:cdlsservices.cdlsnews.webh...@nw-news-icon.png Thanks, this is also a bit cleaner, although I assume I should do it without the 'WebHome' >Thanks >-Vincent > - ??? > > > > > Gerritjan Koekkoek > Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS > Visit our website<http://www.cdlsworld.org> > Facebook<https://www.facebook.com/gerritjan.koekkoek> Gerritjan Koekkoek | Facebook<https://www.facebook.com/gerritjan.koekkoek> www.facebook.com Gerritjan Koekkoek is on Facebook. Join Facebook to connect with Gerritjan Koekkoek and others you may know. Facebook gives people the power to share and... > email > ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users users -- XWiki Users - lists.xwiki.org Mailing Lists<http://lists.xwiki.org/mailman/listinfo/users> lists.xwiki.org List for XWiki users. To see the collection of prior postings to the list, visit the users Archives. Using users: To post a message to all the list ... ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Change page into terminal page
We have just migrated from 6.4 to 8.2.x A page holding a UIEXtension object has a parameter: icon=image:cdlsservices.cdlsn...@nw-news-icon.png In a panel we display the pages holding these UIExtension objects To display the image we use: #set($icon = $services.rendering.render($services.rendering.parse("image:${params.icon}", 'xwiki/2.1'), 'xhtml/1.0')) It used to generate a string: xwiki/bin/download/cdlsServices/cdlsNews/nw-news-icon.png But after migration it generates: xwiki/bin/download/cdlsServices/cdlsNews/WebHome/nw-news-icon.png (notice the WebHome part...) The browser reports that it can not find the image!. When going to the attached image and showing it: xwiki/bin/download/cdlsServices/cdlsNews/nw-news-icon.png And this url display's the image. I guess there are multiple paths to a solution here? - Can I change the page holding the UIExtension to a terminal page? How? - different use of rendering services? - ??? Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Flamingo color theme advanced Less
What would be the notation in the advanced box I now have: @import('custom.less') And I added custom.less as attachment to my skin-page. But this gives me a compile error on the less... Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email From: users on behalf of Ecaterina Moraru (Valica) Sent: 26 September 2016 15:08:51 To: XWiki Users Subject: Re: [xwiki-users] Flamingo color theme advanced Less You could attach your less files to the Skin page, especially since if you have advanced / big customizations is more the responsibility of the skin, rather than the color theme. Thanks, Caty On Mon, Sep 26, 2016 at 3:35 PM, Gerritjan Koekkoek wrote: > Our Advanced box in the flamingo color theme is getting pretty Big (But it > works !) > > > But would it be possible to attach less files to the color theme page and > adding something like > > > @import("waihonabuttons.less") in the advanced box of the color theme? > > > What would I need in the part of the filename? > > > Gerritjan Koekkoek > Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS > Visit our website<http://www.cdlsworld.org> > Facebook<https://www.facebook.com/gerritjan.koekkoek> > email > > > > ___ > 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
[xwiki-users] Flamingo color theme advanced Less
Our Advanced box in the flamingo color theme is getting pretty Big (But it works !) But would it be possible to attach less files to the color theme page and adding something like @import("waihonabuttons.less") in the advanced box of the color theme? What would I need in the part of the filename? Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Union of queries
Does one of the Query languages of XWIki support Union of results Select column1, column2, column3 from classX UNION Select column1, column2, column3 from ClassY In my use case it is required for a livetable. I could also complete the JSON in two steps. What is recommended? Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] LIvetable macro display objects on same page
Im on 6.4.7 (no things like terminal pages, but thanks, important as we will migrate) I think the key question is: Is there any dependancies between what is put in the parameters of the livable macro and the resulting JSON These are the parameters I submit to the macro. [personKey, observationType, measureNominal, withmilestone, byRole, withtopic] {personKey={type=hidden, filterable=false, sortable=false}, observationType={type=hidden, filterable=false, sortable=false}, measureNominal={type=number, filterable=false, sortable=false, size=5}, withmilestone={type=text, filterable=false, sortable=false, size=5}, byRole={type=text, filterable=false, sortable=false, size=5}, withtopic={type=hidden, filterable=false, sortable=false, size=10}} {className=WaihonaCode.observationClass, resultPage=Sandbox.testLivetableJSONGenerator, translationPrefix=waihonapedia.scorecards.growth.weight., rowCount=10, extraParams=&personkey=RaiKoekkoek&observationtype=weight&observationdoc=RaiKoekkoek_growthfeeding} This is the generated JSON {"totalrows": 2,"matchingtags" : {},"tags" : [],"reqNo": 1,"returned rows": 2,"offset": 1, "rows": [{"doc_viewable" : true, "personKey" : "RaiKoekkoek","measureNominal" : "2","withmilestone" : "birth","withtopic" : "growthfeeding","observationType" : "weight","byRole" : "dd"},{"doc_viewable" : true, "personKey" : "RaiKoekkoek","measureNominal" : "3","withmilestone" : "","withtopic" : "growthfeeding","observationType" : "weight","byRole" : "dd"}] } The live tabel does display the total rows and returned rows, but no data Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ____ From: users on behalf of Daniel Ullfig Sent: 15 August 2016 17:51:04 To: XWiki Users Subject: Re: [xwiki-users] LIvetable macro display objects on same page is the page that creates the JSON marked as terminal (no children)? you might have to add "WebHome" to the name of the page. Dan -Original Message- From: Gerritjan Koekkoek Sent: Saturday, August 13, 2016 12:56 AM To: XWiki Users Subject: Re: [xwiki-users] LIvetable macro display objects on same page Thanks, Understand the part of the Array. Think I have that working When I call the JSON directly it generates the following: { "totalrows": 2, "matchingtags" : {}, "tags" : [], "reqNo": "$numbertool.integer($request.reqNo)", "returned rows": 2, "offset": 1, "rows": [{"doc_viewable" : true, "personKey" : "RaiKoekkoek","odatetimestart" : "Tue Nov 02 11:00:44 CET 1999","odatetimeend" : "Fri Jul 15 11:03:11 CEST 2016","oyears" : "","omonths" : "","measureInterval" : "","measureNominal" : "2","measureOrdinal" : "","measureRatio" : "","withmilestone" : "birth","withtopic" : "growthfeeding","observationType" : "weight","byRole" : "dd", "object_id" : "1", "document_count" : "1", "document_ref" : "waihonapediaPrivat.RaiKoekkoek_growthfeeding"},{"doc_viewable" : true, "personKey" : "RaiKoekkoek","odatetimestart" : "Fri Dec 31 03:09:07 CET 1999","odatetimeend" : "","oyears" : "","omonths" : "","measureInterval" : "","measureNominal" : "3","measureOrdinal" : "","measureRatio" : "","withmilestone" : "","withtopic" : "growthfeeding","observationType" : "weight","byRole" : "dd", "object_id" : "2", "document_count" : "1", "document_ref" : "waihonapediaPrivat.RaiKoekkoek_growthfeeding"}] } Which is good as the page holding the objects holds 2 objects that match criteria and 2 other objects that do not match criteria. Problem is that the table shows the Total rows but the records (table-rows) are not showing Is the JSON in the right format, what about doc_viewable? Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS
Re: [xwiki-users] LIvetable macro display objects on same page
Thanks, Understand the part of the Array. Think I have that working When I call the JSON directly it generates the following: { "totalrows": 2, "matchingtags" : {}, "tags" : [], "reqNo": "$numbertool.integer($request.reqNo)", "returned rows": 2, "offset": 1, "rows": [{"doc_viewable" : true, "personKey" : "RaiKoekkoek","odatetimestart" : "Tue Nov 02 11:00:44 CET 1999","odatetimeend" : "Fri Jul 15 11:03:11 CEST 2016","oyears" : "","omonths" : "","measureInterval" : "","measureNominal" : "2","measureOrdinal" : "","measureRatio" : "","withmilestone" : "birth","withtopic" : "growthfeeding","observationType" : "weight","byRole" : "dd", "object_id" : "1", "document_count" : "1", "document_ref" : "waihonapediaPrivat.RaiKoekkoek_growthfeeding"},{"doc_viewable" : true, "personKey" : "RaiKoekkoek","odatetimestart" : "Fri Dec 31 03:09:07 CET 1999","odatetimeend" : "","oyears" : "","omonths" : "","measureInterval" : "","measureNominal" : "3","measureOrdinal" : "","measureRatio" : "","withmilestone" : "","withtopic" : "growthfeeding","observationType" : "weight","byRole" : "dd", "object_id" : "2", "document_count" : "1", "document_ref" : "waihonapediaPrivat.RaiKoekkoek_growthfeeding"}] } Which is good as the page holding the objects holds 2 objects that match criteria and 2 other objects that do not match criteria. Problem is that the table shows the Total rows but the records (table-rows) are not showing Is the JSON in the right format, what about doc_viewable? Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email From: users on behalf of Daniel Ullfig Sent: 12 August 2016 22:43:40 To: XWiki Users Subject: Re: [xwiki-users] LIvetable macro display objects on same page you won't be able to use HQL because it will return a list of pages, all pointing to the same page. A good starting point is the example given in the Livetable Macro documentation. I used that as a starting point. You need to read all the objects into an array using $doc.getObjects( 'myClass' ), where myClass is the name of your xwiki object class. Dan -Original Message- From: Gerritjan Koekkoek Sent: Friday, August 12, 2016 8:47 AM To: XWiki Users Subject: Re: [xwiki-users] LIvetable macro display objects on same page Yes, that's correct, thank you... Is there a convenient way to generate the json for a set of objects of one class on one page? Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email From: users on behalf of Daniel Ullfig Sent: 12 August 2016 17:34:34 To: XWiki Users Subject: Re: [xwiki-users] LIvetable macro display objects on same page Are you attaching several objects of the same type to the page? In that case, the standard livetable will not work. you will have to implement a JSON page to return the data for the livetable. Dan -Original Message- From: Gerritjan Koekkoek Sent: Friday, August 12, 2016 5:32 AM To: XWiki Users Subject: [xwiki-users] LIvetable macro display objects on same page Can the livable macro display objects that are on the same page ? my use case looks to show the right number of records, but all the rows show the data of the first object on the page. {{velocity wiki=false}} #set($myColumns = ["personKey","observationType", "doc.name" , "odatetimestart","measureNominal", "withmilestone", "byRole", "withtopic", "_actions"]) #set($myTableOptions = { "className":"WaihonaCode.observationClass", "translationPrefix" : "waihonapedia.scorecards.growth.", "rowCount": 10, "extraParams" : "&personKey=RaiKoekkoek&observationType=weight&doc.name=RaiKoekkoek_growthfeeding" } ) #set($columnsProperties = { "personKey" : { "typ
Re: [xwiki-users] LIvetable macro display objects on same page
Yes, that's correct, thank you... Is there a convenient way to generate the json for a set of objects of one class on one page? Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email From: users on behalf of Daniel Ullfig Sent: 12 August 2016 17:34:34 To: XWiki Users Subject: Re: [xwiki-users] LIvetable macro display objects on same page Are you attaching several objects of the same type to the page? In that case, the standard livetable will not work. you will have to implement a JSON page to return the data for the livetable. Dan -Original Message- From: Gerritjan Koekkoek Sent: Friday, August 12, 2016 5:32 AM To: XWiki Users Subject: [xwiki-users] LIvetable macro display objects on same page Can the livable macro display objects that are on the same page ? my use case looks to show the right number of records, but all the rows show the data of the first object on the page. {{velocity wiki=false}} #set($myColumns = ["personKey","observationType", "doc.name" , "odatetimestart","measureNominal", "withmilestone", "byRole", "withtopic", "_actions"]) #set($myTableOptions = { "className":"WaihonaCode.observationClass", "translationPrefix" : "waihonapedia.scorecards.growth.", "rowCount": 10, "extraParams" : "&personKey=RaiKoekkoek&observationType=weight&doc.name=RaiKoekkoek_growthfeeding" } ) #set($columnsProperties = { "personKey" : { "type" : "hidden", "filterable":"false"}, "observationType" : { "type" : "hidden", "filterable":"false"}, "doc.name" :{"type":"hidden", "filterable":"false"}, "odatetimestart" : { "type" : "date", "sortable":"false" , "filterable":"false", "size" : 5}, "measureNominal" : { "type" : "number" , "filterable":"false", "size" : 5}, "withmilestone" : {"type" : "text", "filterable":"false" , "size" : 5}, "byRole" : { "type" : "text", "filterable":"false" , "size" : 5}, "withtopic" : { "type" : "text", "filterable":"false" , "size" : 10} }) #livetable('growthTable' $myColumns $columnsProperties $myTableOptions) {{/velocity}} Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ___ 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
[xwiki-users] LIvetable macro display objects on same page
Can the livable macro display objects that are on the same page ? my use case looks to show the right number of records, but all the rows show the data of the first object on the page. {{velocity wiki=false}} #set($myColumns = ["personKey","observationType", "doc.name" , "odatetimestart","measureNominal", "withmilestone", "byRole", "withtopic", "_actions"]) #set($myTableOptions = { "className":"WaihonaCode.observationClass", "translationPrefix" : "waihonapedia.scorecards.growth.", "rowCount": 10, "extraParams" : "&personKey=RaiKoekkoek&observationType=weight&doc.name=RaiKoekkoek_growthfeeding" } ) #set($columnsProperties = { "personKey" : { "type" : "hidden", "filterable":"false"}, "observationType" : { "type" : "hidden", "filterable":"false"}, "doc.name" :{"type":"hidden", "filterable":"false"}, "odatetimestart" : { "type" : "date", "sortable":"false" , "filterable":"false", "size" : 5}, "measureNominal" : { "type" : "number" , "filterable":"false", "size" : 5}, "withmilestone" : {"type" : "text", "filterable":"false" , "size" : 5}, "byRole" : { "type" : "text", "filterable":"false" , "size" : 5}, "withtopic" : { "type" : "text", "filterable":"false" , "size" : 10} }) #livetable('growthTable' $myColumns $columnsProperties $myTableOptions) {{/velocity}} Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Computed field (Display, Edit and Value)
In our class we have a computed field It shows a Date and two numbers - the date represents a observation date calculated based on the two numbers and date of birth. - The two numbers are -- 1 Years since birth -- Months - Together they represent Years + Months that a person reaches a certain milestone. (example: The child started to grab objects at age 0 years and 6 months, the child started walking at age 4 years and 5 months) We would like to see the following in our sheet: View mode: the date as a non-editable value and the two numbers with their labels Edit mode: only the two numbers with labels Preferably we would like to use in our sheet $objectDoc.Display('computed field') But when we use the values in Velocity as class.attribute.value.years and class.attribute.value.months But it looks like the requirement for $doc.display('') forces us to write html code in our computed field that we need to strip away when using the velocity.value? Any suggestions... Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Images with wysywig
When our user use the wysywig editor to insert a image And the user chooses to upload the image from computer The system will attach the image to the current $doc But it will insert a link [[image:x.xxx]] where z.xxx is the attached filename. This works fine when page is visited. But when in BLOG or using {{include reference='docWithImage'/}} It can not find the link and show the according 'can not find image' icon Is it possible to automatically insert a image as [[image:wiki:space.p...@x.]] (is this called extended reference to attached image]) Same for any attached file where user chooses to add a link to attachment (PDF, .doc, .xls) Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Flamingo color theme mapping on skin div's
Hi, I understand all Less variables are from bootstrap. I also understand the less files that are linked to a color theme will compile a style.css that is loaded on each page My question is how are they applied to XWiki default skin div's (id's or classes) Where is defined: #xwikimaincontainer will have a number of less variables (or not) In other words: Which XWiki ID's an/or classes use: @brand-primary And which XWiki ID's and/or classes are considered to get @component-active-bg applied ? Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email From: users on behalf of Ecaterina Moraru (Valica) Sent: 12 July 2016 10:56:26 To: XWiki Users Subject: Re: [xwiki-users] Flamingo color theme mapping on skin div's Hi, @component-active-bg come from Bootstrap. You can find about the default variables in variables.less. The way they were used can be found in the .less files. Thanks, Caty On Tue, Jul 12, 2016 at 9:38 AM, Gerritjan Koekkoek wrote: > Who has mapped the flamingo-colortheme on the skin-div's? > > Or is this documented anywhere ? > > > what is default styled with Brand-primary, Brand-success, Brand-info, > Brand-warning, Brand-danger > > what is @Component-active-color and @Component-active-bg > > > > Gerritjan Koekkoek > Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS > Visit our website<http://www.cdlsworld.org> > Facebook<https://www.facebook.com/gerritjan.koekkoek> > email > > > > ___ > 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
[xwiki-users] Flamingo color theme mapping on skin div's
Who has mapped the flamingo-colortheme on the skin-div's? Or is this documented anywhere ? what is default styled with Brand-primary, Brand-success, Brand-info, Brand-warning, Brand-danger what is @Component-active-color and @Component-active-bg Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Delete myxwiki site?
no, not required! Everything has been saved in the New Website www.waihonapedia.org Verstuurd vanaf mijn iPhone > Op 8 jul. 2016 om 09:34 heeft Vincent Massol het > volgende geschreven: > > Hi Gerritjan, > >> On 08 Jul 2016, at 09:32, Gerritjan Koekkoek wrote: >> >> The site http://waihonapedia.myxwiki.org/ has had it's purpose and is >> obsolete now. >> >> Waihona (Main.WebHome) - XWiki<http://waihonapedia.myxwiki.org/> >> waihonapedia.myxwiki.org >> WaihonaPedia. Deze website is verplaatst. Ga naar WaihonaPedia. Deze site >> zal na ongeveer 6 maanden worden uitgezet, dus pas uw bookmarks die nog naar >> deze site ... >> >> I request to delete the site? If I can do this myself, please instruct? > > I can do it. But do you want a XAR export of the pages? > > Thanks > -Vincent > >> Gerritjan Koekkoek >> Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS >> Visit our website<http://www.cdlsworld.org> >> Facebook<https://www.facebook.com/gerritjan.koekkoek> >> email > ___ > 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] Delete myxwiki site?
The site http://waihonapedia.myxwiki.org/ has had it's purpose and is obsolete now. Waihona (Main.WebHome) - XWiki<http://waihonapedia.myxwiki.org/> waihonapedia.myxwiki.org WaihonaPedia. Deze website is verplaatst. Ga naar WaihonaPedia. Deze site zal na ongeveer 6 maanden worden uitgezet, dus pas uw bookmarks die nog naar deze site ... I request to delete the site? If I can do this myself, please instruct? Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Velocity code to move a attachment to another (new) page
Hi, I'm writing a migration script that requires to move the attachment(s) from the old-page to the new page. Any suggestions? Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] XWiki on Jelastic
My question is: Would somebody like to volunteer to create a Jelastic market place configuration of Xwiki? This would help making XWIki more popular. I have no doubt it is possible to configure XWiki the manual way (like described in the administrator guide) but that would only help people who consider themselves technical enough to configure their own server(i'm not seeing myself as such a person, I admire people that can configure a server) I think the Jelastic Market place targets a audience that currently will stick with the hosting offered by XWiki SAS or with the free Cloud option (on the farm) You just request a XWiki instance and you get back a username-password with that you can login as admin... How to make a XWiki marketplace app is described here: http://blog.jelastic.com/2015/12/17/create-your-own-marketplace-with-applications-for-one-click-installation/ Then consumers like myself would, by one click get a fully working XWiki benefitting from Pay-Per-Use model of Jelastic... Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website Facebook email From: users on behalf of Thomas Mortagne Sent: 23 May 2016 15:43:49 To: XWiki Users Subject: Re: [xwiki-users] XWiki on Jelastic See http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Performances#HMemory On Mon, May 23, 2016 at 3:30 PM, Jesse Bright wrote: > What kind of resources were allocated to your sever? The minimum values > allowed by Jelastic, in my experience, are inadequate to run Xwiki. > Unfortunately their one-click install does not set the server up for you as > well but this is not really expected. > > Regards, > > Jesse > >> On May 23, 2016, at 1:00 AM, Gerritjan Koekkoek >> wrote: >> >> Hi, >> >> >> I've experimented with Jelastic. To my pleasant surprise in their >> marketplace there is XWiki. >> >> It promises a click and run setup; that could help making XWiki popular. >> >> >> But the experience was very disappointing. I think this will actually damage >> popularity. >> >> What I noticed: >> >> * Jelastic marketplace XWiki is based on a Milestone Relase instead of a >> stable release. >> * It is deployed on a tomcat instance; but the settings are such that you >> get the Upgrade wizard quite conveniently (+++) but then clicking "install" >> results in a very slow (-) process that, in my case, never succeeded in >> a up-and-running XWiki >> * The Tomcat log shows memory problems, and this is confirmed to the user >> with Elastic emails that Tomcat is reaching limits >> >> Would it not be useful if somebody from the community would configure a much >> better XWiki experience? My knowledge is not good enough to do the >> Administrator stuff required >> >> >> Gerritjan Koekkoek >> Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS >> Visit our website<http://www.cdlsworld.org> >> Facebook<https://www.facebook.com/gerritjan.koekkoek> >> email >> >> >> >> ___ >> 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 -- Thomas Mortagne ___ 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] XWiki on Jelastic
Hi, I've experimented with Jelastic. To my pleasant surprise in their marketplace there is XWiki. It promises a click and run setup; that could help making XWiki popular. But the experience was very disappointing. I think this will actually damage popularity. What I noticed: * Jelastic marketplace XWiki is based on a Milestone Relase instead of a stable release. * It is deployed on a tomcat instance; but the settings are such that you get the Upgrade wizard quite conveniently (+++) but then clicking "install" results in a very slow (-) process that, in my case, never succeeded in a up-and-running XWiki * The Tomcat log shows memory problems, and this is confirmed to the user with Elastic emails that Tomcat is reaching limits Would it not be useful if somebody from the community would configure a much better XWiki experience? My knowledge is not good enough to do the Administrator stuff required Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Getting the translated country name
I found a nice way to translate $language into pretty language name in the translation desired. {{velocity}} #displayLanguagePrettyName("it") #macro(displayLanguagePrettyName $language)#set($languageLocale = $services.localization.toLocale("it"))$stringtool.capitalize($languageLocale.getDisplayName("nl"))#end {{/velocity}} So changing the 'nl' to 'pt' (portugese) it will do Italiaans (dutch) -> Italiano (portugese) Ca the same be done for country? Italië (dutch) -> Itália (Portuguse) Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] [ANN] Tour Application v1.0 Released
Nice, Tried it immediately? But what CSS selectors can be used, I assumed the ID's Tried: HAMCvragenlijstenvoorbezoekexpertisepoli (Header in the page) and amcResearch wich is a ID for a Block enclosed as a ? But the boxes appear in the middle of the screen and do not show a Arrow pointing to the ID? XWiki 6.4.x From: users on behalf of Vincent Massol Sent: 12 May 2016 11:20:12 To: XWiki Users Cc: XWiki Developers Subject: Re: [xwiki-users] [ANN] Tour Application v1.0 Released Nice, thanks Alex! -Vincent > On 12 May 2016, at 12:04, Alexandru Cotiuga > wrote: > > HI all, > > A new version of the Tour Application extension is available. See > http://extensions.xwiki.org/xwiki/bin/view/Extension/Tour+Application#Hv1.0. > You can install or upgrade with the Extension Manager. > > Thanks, > Alex ___ 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] relation Code and Translation key's App-Within-Minutes
Hi I'm struggling to understand the relationship between the code generated by App-With-Minutes for the Sheet and the Generated translation files; Especially if I want to rename application, page, class) (or copy it to another wiki) #set ($discard = $services.localization.use('document', 'WaihonaCode.qbgTranslations')) (% class="xform" %) ((( ; $escapetool.xml($doc.displayPrettyName('date1', false, false)) : $doc.display('date1') ... ))) The space WaihonaCode is where class, sheet and template are located 'date1' is the class attribute we need a translated text This is what is generated in the translation file: # Class fields WaihonaCode.qbgClass_date1=Date Since we do not see any $services.localization.render("date1") i'm uncertain how the key is created? (what logic is applied?) Why is there: $escapetool.xml($doc.displayPrettyName('date1', false, false))? Why escape tool? what is the function of the method displayPrettyName('date1', false, false))? Is there any client side functionality (JavaScript) required for this to work? Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Can we use database list when class references is same class
ClassHealthDimensions Class properties -key (key: String) -parent (parent: Database List) -title (title: Computed Field) -description (description: Computed Field) Parent attribute specified as Database List XWiki Class Name: WaihonaCode.classHealthDimensions (where WaihonaCode is the space where class is defined) Id Field Name: key Value Field Name: title I would like to create a tree of objects with a few objects having no parent (top-level) The other objects should have one parent referencing a object of the same class But when creating a object the database list remains empty? What am I missing? Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] UIExtension Access document holding the UIExtension object
From: users on behalf of vinc...@massol.net Sent: 05 February 2016 10:25 To: XWiki Users Subject: Re: [xwiki-users] UIExtension Access document holding the UIExtension object On 5 Feb 2016 at 10:15:56, Gerritjan Koekkoek (gerrit...@cdlsworld.org(mailto:gerrit...@cdlsworld.org)) wrote: > > > From: users on behalf of vinc...@massol.net > Sent: 05 February 2016 09:53 > To: XWiki Users > Subject: Re: [xwiki-users] UIExtension Access document holding the > UIExtension object > > On 5 Feb 2016 at 09:44:08, Gerritjan Koekkoek > (gerrit...@cdlsworld.org(mailto:gerrit...@cdlsworld.org)) wrote: > > > > > > > From: users on behalf of vinc...@massol.net > > Sent: 05 February 2016 09:39 > > To: XWiki Users > > Subject: Re: [xwiki-users] UIExtension Access document holding the > > UIExtension object > > > > On 5 Feb 2016 at 09:35:36, Gerritjan Koekkoek (gerrit...@cdlsworld.org) > > wrote: > > > > Hi, > > Using: > > So you could have params like: > > > > name = $doc.documentReference (or $doc.fullName) > > title = $doc.title > > creator = $doc.creatorReference > > hasAdmin = $services.authorization.checkAccess(‘ADMIN’, > > $doc.authorReference) > > > > >> Looks like the $doc is retrieving the current doc and not the Document > > >> that holds the UIExtension object? > > Any way to access the holding Document? > > > > > > $xwiki.getDocument(‘name of uiextension doc’) > > > > >>> Thanks, that is indeed the 'simple' solution. > > >>> This requires updating the parameter if you move the page/object: use > > >>> Case is distributing the app to another wiki > > > You could open a jira issue to request an improvement. > > FWIW and FYI the code is here: > https://github.com/xwiki/xwiki-platform/blob/4533b98fb45a9010198582a7053bc67e0b81b26d/xwiki-platform-core/xwiki-platform-uiextension/xwiki-platform-uiextension-api/src/main/java/org/xwiki/uiextension/internal/WikiUIExtensionParameters.java#L159-L159 > > >>>> Thanks a lot. It was very helpful. I think the workaround is not too > >>>> difficult and I think the value of having access to that document > >>>> meta-information is limited for the typical use-cases of a UIExtension, > >>>> So a JIRA issue would maybe be too much > My suggested work-around would be to use the ExtensionID; and with that ID > perform a XWQL query on object of UIExetensionClass where ExtensionID = > :ExtensionID(from the uiExtension) > Off course this would require Unique ExtensionID's but that would anyway be a > good-practice? yes >>>>>> Maybe I have a use case for a Jira issue ? Could you evaluate if you >>>>>> consider it a bug: I have set the rights of a page holding an UIExtension object to DENY VIEW to $guest The UIExtension will still show: #set($dashboardMenuItems = $services.uix.getExtensions('dashboard.mainMenu.items',{'sortByParameter' : 'displayorder'}) ) But then performing the XWQL to access meta information of that page works as expected: it does not return any information But I consider it kind of kinky that the object is showing in the getExtensions? Or not? - Gerritjan -Vincent > Thanks > -Vincent > > > > > From: users on behalf of vinc...@massol.net > > Sent: 04 February 2016 15:32 > > To: XWiki Users > > Subject: Re: [xwiki-users] UIExtension Access document holding the > > UIExtension object > > > > Hi, > > > > > > On 3 Feb 2016 at 11:24:22, Gerritjan Koekkoek > > (gerrit...@cdlsworld.org(mailto:gerrit...@cdlsworld.org)) wrote: > > > > > Hi, > > > > > > > > > We have pages having ONE UIExtension objects of XWiki.UIExtensionClass. > > > > > > Using as > > > > > > $services.uix.getExtensions('dashboard.mainMenu.items',{'sortByParameter' > > > : 'displayorder'}) > > > > > > > > > With a #foreach loop we can access all the parameters. (and other > > > extension properties) > > > > > > But is it possible to get the page information (Name, Title, Creator, > > > Rights) > > > > > > > > > The use case is that we want a dynamic menu based on that information? > > > > > > > > > The following did not give the desired result: > > > > > > #set($dashboardMenuItems = > > > $
Re: [xwiki-users] UIExtension Access document holding the UIExtension object
From: users on behalf of vinc...@massol.net Sent: 05 February 2016 09:53 To: XWiki Users Subject: Re: [xwiki-users] UIExtension Access document holding the UIExtension object On 5 Feb 2016 at 09:44:08, Gerritjan Koekkoek (gerrit...@cdlsworld.org(mailto:gerrit...@cdlsworld.org)) wrote: > > > From: users on behalf of vinc...@massol.net > Sent: 05 February 2016 09:39 > To: XWiki Users > Subject: Re: [xwiki-users] UIExtension Access document holding the > UIExtension object > > On 5 Feb 2016 at 09:35:36, Gerritjan Koekkoek (gerrit...@cdlsworld.org) wrote: > > Hi, > Using: > So you could have params like: > > name = $doc.documentReference (or $doc.fullName) > title = $doc.title > creator = $doc.creatorReference > hasAdmin = $services.authorization.checkAccess(‘ADMIN’, $doc.authorReference) > > >> Looks like the $doc is retrieving the current doc and not the Document > >> that holds the UIExtension object? > Any way to access the holding Document? > > > $xwiki.getDocument(‘name of uiextension doc’) > > >>> Thanks, that is indeed the 'simple' solution. > >>> This requires updating the parameter if you move the page/object: use > >>> Case is distributing the app to another wiki You could open a jira issue to request an improvement. FWIW and FYI the code is here: https://github.com/xwiki/xwiki-platform/blob/4533b98fb45a9010198582a7053bc67e0b81b26d/xwiki-platform-core/xwiki-platform-uiextension/xwiki-platform-uiextension-api/src/main/java/org/xwiki/uiextension/internal/WikiUIExtensionParameters.java#L159-L159 >>>> Thanks a lot. It was very helpful. I think the workaround is not too >>>> difficult and I think the value of having access to that document >>>> meta-information is limited for the typical use-cases of a UIExtension, So >>>> a JIRA issue would maybe be too much My suggested work-around would be to use the ExtensionID; and with that ID perform a XWQL query on object of UIExetensionClass where ExtensionID = :ExtensionID(from the uiExtension) Off course this would require Unique ExtensionID's but that would anyway be a good-practice? Thanks -Vincent > > From: users on behalf of vinc...@massol.net > Sent: 04 February 2016 15:32 > To: XWiki Users > Subject: Re: [xwiki-users] UIExtension Access document holding the > UIExtension object > > Hi, > > > On 3 Feb 2016 at 11:24:22, Gerritjan Koekkoek > (gerrit...@cdlsworld.org(mailto:gerrit...@cdlsworld.org)) wrote: > > > Hi, > > > > > > We have pages having ONE UIExtension objects of XWiki.UIExtensionClass. > > > > Using as > > > > $services.uix.getExtensions('dashboard.mainMenu.items',{'sortByParameter' : > > 'displayorder'}) > > > > > > With a #foreach loop we can access all the parameters. (and other extension > > properties) > > > > But is it possible to get the page information (Name, Title, Creator, > > Rights) > > > > > > The use case is that we want a dynamic menu based on that information? > > > > > > The following did not give the desired result: > > > > #set($dashboardMenuItems = > > $services.uix.getExtensions('dashboard.mainMenu.items',{'sortByParameter' : > > 'displayorder'}) ) > > > > #foreach($dashboardMenuItem in $dashboardMenuItems) > > > > #set($dashboardMenuItemDocument = $xwiki.getDocument($dashboardMenuItem)) > > > > #end > > > I guess you already know about > http://extensions.xwiki.org/xwiki/bin/view/Extension/UIExtension+Module ? > > $services.uix.getExtensions returns a List and UIExtension is: > > public interface UIExtension > { > /** > * @return the ID of this extension > */ > String getId(); > > /** > * @return the ID of the extension point this UI extension is providing an > extension for > */ > String getExtensionPointId(); > > /** > * A map of parameters provided by the extension. When providing a new > Extension Point the developer must document > * the list of parameters he requires. > * > * @return a map of parameters provided by the extension > */ > Map getParameters(); > > /** > * @return the {@link Block} that must be rendered when this extension is > displayed > */ > Block execute(); > } > > > So as you can see there’s no way to return anything else here. > > However, when you define your UIX you can pass any number of parameters > (which are retrieved through calling getParame
Re: [xwiki-users] UIExtension Access document holding the UIExtension object
From: users on behalf of vinc...@massol.net Sent: 05 February 2016 09:39 To: XWiki Users Subject: Re: [xwiki-users] UIExtension Access document holding the UIExtension object On 5 Feb 2016 at 09:35:36, Gerritjan Koekkoek (gerrit...@cdlsworld.org) wrote: Hi, Using: So you could have params like: name = $doc.documentReference (or $doc.fullName) title = $doc.title creator = $doc.creatorReference hasAdmin = $services.authorization.checkAccess(‘ADMIN’, $doc.authorReference) >> Looks like the $doc is retrieving the current doc and not the Document that >> holds the UIExtension object? Any way to access the holding Document? $xwiki.getDocument(‘name of uiextension doc’) >>> Thanks, that is indeed the 'simple' solution. >>> This requires updating the parameter if you move the page/object: use Case >>> is distributing the app to another wiki From: users on behalf of vinc...@massol.net Sent: 04 February 2016 15:32 To: XWiki Users Subject: Re: [xwiki-users] UIExtension Access document holding the UIExtension object Hi, On 3 Feb 2016 at 11:24:22, Gerritjan Koekkoek (gerrit...@cdlsworld.org(mailto:gerrit...@cdlsworld.org)) wrote: > Hi, > > > We have pages having ONE UIExtension objects of XWiki.UIExtensionClass. > > Using as > > $services.uix.getExtensions('dashboard.mainMenu.items',{'sortByParameter' : > 'displayorder'}) > > > With a #foreach loop we can access all the parameters. (and other extension > properties) > > But is it possible to get the page information (Name, Title, Creator, Rights) > > > The use case is that we want a dynamic menu based on that information? > > > The following did not give the desired result: > > #set($dashboardMenuItems = > $services.uix.getExtensions('dashboard.mainMenu.items',{'sortByParameter' : > 'displayorder'}) ) > > #foreach($dashboardMenuItem in $dashboardMenuItems) > > #set($dashboardMenuItemDocument = $xwiki.getDocument($dashboardMenuItem)) > > #end I guess you already know about http://extensions.xwiki.org/xwiki/bin/view/Extension/UIExtension+Module ? $services.uix.getExtensions returns a List and UIExtension is: public interface UIExtension { /** * @return the ID of this extension */ String getId(); /** * @return the ID of the extension point this UI extension is providing an extension for */ String getExtensionPointId(); /** * A map of parameters provided by the extension. When providing a new Extension Point the developer must document * the list of parameters he requires. * * @return a map of parameters provided by the extension */ Map getParameters(); /** * @return the {@link Block} that must be rendered when this extension is displayed */ Block execute(); } So as you can see there’s no way to return anything else here. However, when you define your UIX you can pass any number of parameters (which are retrieved through calling getParameters() on UIExtension). So you could have params like: name = $doc.documentReference (or $doc.fullName) title = $doc.title creator = $doc.creatorReference hasAdmin = $services.authorization.checkAccess(‘ADMIN’, $doc.authorReference) ... Hope it helps, -Vincent > Gerritjan Koekkoek > Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS > Visit our website > Facebook > email ___ 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
Re: [xwiki-users] UIExtension Access document holding the UIExtension object
Hi, Using: So you could have params like: name = $doc.documentReference (or $doc.fullName) title = $doc.title creator = $doc.creatorReference hasAdmin = $services.authorization.checkAccess(‘ADMIN’, $doc.authorReference) >> Looks like the $doc is retrieving the current doc and not the Document that >> holds the UIExtension object? Any way to access the holding Document? From: users on behalf of vinc...@massol.net Sent: 04 February 2016 15:32 To: XWiki Users Subject: Re: [xwiki-users] UIExtension Access document holding the UIExtension object Hi, On 3 Feb 2016 at 11:24:22, Gerritjan Koekkoek (gerrit...@cdlsworld.org(mailto:gerrit...@cdlsworld.org)) wrote: > Hi, > > > We have pages having ONE UIExtension objects of XWiki.UIExtensionClass. > > Using as > > $services.uix.getExtensions('dashboard.mainMenu.items',{'sortByParameter' : > 'displayorder'}) > > > With a #foreach loop we can access all the parameters. (and other extension > properties) > > But is it possible to get the page information (Name, Title, Creator, Rights) > > > The use case is that we want a dynamic menu based on that information? > > > The following did not give the desired result: > > #set($dashboardMenuItems = > $services.uix.getExtensions('dashboard.mainMenu.items',{'sortByParameter' : > 'displayorder'}) ) > > #foreach($dashboardMenuItem in $dashboardMenuItems) > > #set($dashboardMenuItemDocument = $xwiki.getDocument($dashboardMenuItem)) > > #end I guess you already know about http://extensions.xwiki.org/xwiki/bin/view/Extension/UIExtension+Module ? $services.uix.getExtensions returns a List and UIExtension is: public interface UIExtension { /** * @return the ID of this extension */ String getId(); /** * @return the ID of the extension point this UI extension is providing an extension for */ String getExtensionPointId(); /** * A map of parameters provided by the extension. When providing a new Extension Point the developer must document * the list of parameters he requires. * * @return a map of parameters provided by the extension */ Map getParameters(); /** * @return the {@link Block} that must be rendered when this extension is displayed */ Block execute(); } So as you can see there’s no way to return anything else here. However, when you define your UIX you can pass any number of parameters (which are retrieved through calling getParameters() on UIExtension). So you could have params like: name = $doc.documentReference (or $doc.fullName) title = $doc.title creator = $doc.creatorReference hasAdmin = $services.authorization.checkAccess(‘ADMIN’, $doc.authorReference) ... Hope it helps, -Vincent > Gerritjan Koekkoek > Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS > Visit our website > Facebook > email ___ 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] UIExtension Access document holding the UIExtension object
Hi, We have pages having ONE UIExtension objects of XWiki.UIExtensionClass. Using as $services.uix.getExtensions('dashboard.mainMenu.items',{'sortByParameter' : 'displayorder'}) With a #foreach loop we can access all the parameters. (and other extension properties) But is it possible to get the page information (Name, Title, Creator, Rights) The use case is that we want a dynamic menu based on that information? The following did not give the desired result: #set($dashboardMenuItems = $services.uix.getExtensions('dashboard.mainMenu.items',{'sortByParameter' : 'displayorder'}) ) #foreach($dashboardMenuItem in $dashboardMenuItems) #set($dashboardMenuItemDocument = $xwiki.getDocument($dashboardMenuItem)) #end Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] MyXWiki: migrate users to a permanent XWiki instance
Yes, we have a few applications that are developed on 6.4 Also found it difficult to get used to child-child-child page navigation. Especially when linking to pages you know that exist but can not be found. But I definitely believe dropping the space structure will be the way forward Wait for more intuitive page finding when linking pages Gerritjan Verstuurd vanaf mijn iPhone > Op 28 jan. 2016 om 19:31 heeft Thomas Mortagne > het volgende geschreven: > > Is there a specific reason to not use 7.4 for your new wiki ? > > On Thu, Jan 28, 2016 at 7:31 PM, Thomas Mortagne > wrote: >> You can "add the attribute", the issue is that the document you are >> importing contain an attribute that 6.4 does not understand. >> >> I think we need to modify the importer to just ignore what it does not >> know. In the meantime all you could do is remove the Timezone property >> in the XAR but this is not so easy if you have lots of users. >> >> On Thu, Jan 28, 2016 at 7:02 PM, Gerritjan Koekkoek >> wrote: >>> If I would add the attribute, you think it would work? >>> >>> Verstuurd vanaf mijn iPhone >>> >>>> Op 28 jan. 2016 om 15:24 heeft Thomas Mortagne >>>> het volgende geschreven: >>>> >>>> So in the case of a user the issue if that 7.4 users contain a >>>> property unknown from 6.4.x (the Timezone). >>>> >>>> On Thu, Jan 28, 2016 at 2:20 PM, Thomas Mortagne >>>> wrote: >>>>> Created http://jira.xwiki.org/browse/XWIKI-13038. >>>>> >>>>> On Thu, Jan 28, 2016 at 2:18 PM, Thomas Mortagne >>>>> wrote: >>>>>> I just reproduced it by exporting a user from my tuska.myxwiki.org >>>>>> wiki and trying to import it in 6.4.6. Working on it. >>>>>> >>>>>> On Thu, Jan 28, 2016 at 2:14 PM, Gerritjan Koekkoek >>>>>> wrote: >>>>>>> I could send you the two files? >>>>>>> Should I send you the files via wetransfer.com? >>>>>>> >>>>>>> >>>>>>> Gerritjan Koekkoek >>>>>>> Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS >>>>>>> Visit our website >>>>>>> Facebook >>>>>>> email >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> From: users on behalf of Thomas Mortagne >>>>>>> >>>>>>> Sent: 28 January 2016 14:12 >>>>>>> To: XWiki Users >>>>>>> Subject: Re: [xwiki-users] MyXWiki: migrate users to a permanent XWiki >>>>>>> instance >>>>>>> >>>>>>> So you do have an error during import, no need to search for it if the >>>>>>> import fail. >>>>>>> >>>>>>> I will try to reproduce your use case. >>>>>>> >>>>>>> >>>>>>> On Thu, Jan 28, 2016 at 2:05 PM, Gerritjan Koekkoek >>>>>>> wrote: >>>>>>>> I've tried two scenario's. >>>>>>>> >>>>>>>> Export a single user by going to the local user page and export as XAR >>>>>>>> Then import that XAR in 6.4.7 >>>>>>>> I get the selection list and I select the user page >>>>>>>> Then click import >>>>>>>> Importing XWiki.JoseLaheij.xar: Import successful >>>>>>>> 0 Document(s) installed >>>>>>>> 0 Document(s) skipped >>>>>>>> 1 Document(s) with error >>>>>>>> List of erroneous documents >>>>>>>> XWiki/JoseLaheij.xml >>>>>>>> >>>>>>>> When navigating to the erroneous document: >>>>>>>> Not Found >>>>>>>> >>>>>>>> The requested URL /xwiki/bin/view/XWiki/JoseLaheij/xml was not found >>>>>>>> on this server. >>>>>>>> >>>>>>>> The url looks a bit strange: >>>>>>>> http://www.waihonapedia.org/xwiki/bin/view/XWiki%2FJoseLaheij/xml >>>>>>>> (the %2F instead of /) >>>>>>>> >>>>>>>> The othe
Re: [xwiki-users] MyXWiki: migrate users to a permanent XWiki instance
If I would add the attribute, you think it would work? Verstuurd vanaf mijn iPhone > Op 28 jan. 2016 om 15:24 heeft Thomas Mortagne > het volgende geschreven: > > So in the case of a user the issue if that 7.4 users contain a > property unknown from 6.4.x (the Timezone). > > On Thu, Jan 28, 2016 at 2:20 PM, Thomas Mortagne > wrote: >> Created http://jira.xwiki.org/browse/XWIKI-13038. >> >> On Thu, Jan 28, 2016 at 2:18 PM, Thomas Mortagne >> wrote: >>> I just reproduced it by exporting a user from my tuska.myxwiki.org >>> wiki and trying to import it in 6.4.6. Working on it. >>> >>> On Thu, Jan 28, 2016 at 2:14 PM, Gerritjan Koekkoek >>> wrote: >>>> I could send you the two files? >>>> Should I send you the files via wetransfer.com? >>>> >>>> >>>> Gerritjan Koekkoek >>>> Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS >>>> Visit our website >>>> Facebook >>>> email >>>> >>>> >>>> >>>> >>>> >>>> From: users on behalf of Thomas Mortagne >>>> >>>> Sent: 28 January 2016 14:12 >>>> To: XWiki Users >>>> Subject: Re: [xwiki-users] MyXWiki: migrate users to a permanent XWiki >>>> instance >>>> >>>> So you do have an error during import, no need to search for it if the >>>> import fail. >>>> >>>> I will try to reproduce your use case. >>>> >>>> >>>> On Thu, Jan 28, 2016 at 2:05 PM, Gerritjan Koekkoek >>>> wrote: >>>>> I've tried two scenario's. >>>>> >>>>> Export a single user by going to the local user page and export as XAR >>>>> Then import that XAR in 6.4.7 >>>>> I get the selection list and I select the user page >>>>> Then click import >>>>> Importing XWiki.JoseLaheij.xar: Import successful >>>>> 0 Document(s) installed >>>>> 0 Document(s) skipped >>>>> 1 Document(s) with error >>>>> List of erroneous documents >>>>> XWiki/JoseLaheij.xml >>>>> >>>>> When navigating to the erroneous document: >>>>> Not Found >>>>> >>>>> The requested URL /xwiki/bin/view/XWiki/JoseLaheij/xml was not found on >>>>> this server. >>>>> >>>>> The url looks a bit strange: >>>>> http://www.waihonapedia.org/xwiki/bin/view/XWiki%2FJoseLaheij/xml >>>>> (the %2F instead of /) >>>>> >>>>> The other scenario i used was using the wiki preferences on myXWiki and >>>>> click export. >>>>> Without any dialog a backup.xar is created >>>>> When importing the backup.xar on 6.4.7 file is successfully attached, but >>>>> when clicking to import there is no page shown although the size is 17MB >>>>> >>>>> Gerritjan Koekkoek >>>>> Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS >>>>> Visit our website >>>>> Facebook >>>>> email >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> From: users on behalf of Thomas Mortagne >>>>> >>>>> Sent: 27 January 2016 20:58 >>>>> To: XWiki Users >>>>> Subject: Re: [xwiki-users] MyXWiki: migrate users to a permanent XWiki >>>>> instance >>>>> >>>>> XAR exported in 7.3 are supposed to be compatible with 6.4.x (or 1.0 >>>>> for that matter). Unless you use things like sub space which simply >>>>> don't exist in 6.4 (but even in this case you will get your document >>>>> imported, just not exactly in the same place). >>>>> >>>>> Do you get an error when you import it in the UI or in the log ? >>>>> >>>>> On Wed, Jan 27, 2016 at 7:02 PM, Gerritjan Koekkoek >>>>> wrote: >>>>>> Hi, >>>>>> >>>>>> >>>>>> The last half year we have used a free wiki from myXWiki.org, thanks a >>>>>> lot. >>>>>> >>>>>> Now we have decides to have a dedicated XWiki. Is it possible to migrate >>>>>> the lo
Re: [xwiki-users] MyXWiki: migrate users to a permanent XWiki instance
I could send you the two files? Should I send you the files via wetransfer.com? Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website Facebook email From: users on behalf of Thomas Mortagne Sent: 28 January 2016 14:12 To: XWiki Users Subject: Re: [xwiki-users] MyXWiki: migrate users to a permanent XWiki instance So you do have an error during import, no need to search for it if the import fail. I will try to reproduce your use case. On Thu, Jan 28, 2016 at 2:05 PM, Gerritjan Koekkoek wrote: > I've tried two scenario's. > > Export a single user by going to the local user page and export as XAR > Then import that XAR in 6.4.7 > I get the selection list and I select the user page > Then click import > Importing XWiki.JoseLaheij.xar: Import successful > 0 Document(s) installed > 0 Document(s) skipped > 1 Document(s) with error > List of erroneous documents > XWiki/JoseLaheij.xml > > When navigating to the erroneous document: > Not Found > > The requested URL /xwiki/bin/view/XWiki/JoseLaheij/xml was not found on this > server. > > The url looks a bit strange: > http://www.waihonapedia.org/xwiki/bin/view/XWiki%2FJoseLaheij/xml > (the %2F instead of /) > > The other scenario i used was using the wiki preferences on myXWiki and click > export. > Without any dialog a backup.xar is created > When importing the backup.xar on 6.4.7 file is successfully attached, but > when clicking to import there is no page shown although the size is 17MB > > Gerritjan Koekkoek > Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS > Visit our website > Facebook > email > > > > > > From: users on behalf of Thomas Mortagne > > Sent: 27 January 2016 20:58 > To: XWiki Users > Subject: Re: [xwiki-users] MyXWiki: migrate users to a permanent XWiki > instance > > XAR exported in 7.3 are supposed to be compatible with 6.4.x (or 1.0 > for that matter). Unless you use things like sub space which simply > don't exist in 6.4 (but even in this case you will get your document > imported, just not exactly in the same place). > > Do you get an error when you import it in the UI or in the log ? > > On Wed, Jan 27, 2016 at 7:02 PM, Gerritjan Koekkoek > wrote: >> Hi, >> >> >> The last half year we have used a free wiki from myXWiki.org, thanks a lot. >> >> Now we have decides to have a dedicated XWiki. Is it possible to migrate the >> local users in that myXWiki instance to the new wiki. >> >> I tried to export one user as XAR and import it, but it does not convert to >> a user-object >> >> The same problem with a macro page with the XWikiMacro and >> XWikiMacroParameters objects. >> >> It results in empty wiki pages in the new wiki >> >> >> myXWiki = 7.3 >> >> The new wiki is on 6.4.x >> >> So maybe a downgrade export/import not possible? >> >> >> Gerritjan Koekkoek >> Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS >> Visit our website<http://www.cdlsworld.org> >> Facebook<https://www.facebook.com/gerritjan.koekkoek> >> email >> >> >> >> ___ >> users mailing list >> users@xwiki.org >> http://lists.xwiki.org/mailman/listinfo/users > > > > -- > Thomas Mortagne > ___ > 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 -- Thomas Mortagne ___ 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] MyXWiki: migrate users to a permanent XWiki instance
I've tried two scenario's. Export a single user by going to the local user page and export as XAR Then import that XAR in 6.4.7 I get the selection list and I select the user page Then click import Importing XWiki.JoseLaheij.xar: Import successful 0 Document(s) installed 0 Document(s) skipped 1 Document(s) with error List of erroneous documents XWiki/JoseLaheij.xml When navigating to the erroneous document: Not Found The requested URL /xwiki/bin/view/XWiki/JoseLaheij/xml was not found on this server. The url looks a bit strange: http://www.waihonapedia.org/xwiki/bin/view/XWiki%2FJoseLaheij/xml (the %2F instead of /) The other scenario i used was using the wiki preferences on myXWiki and click export. Without any dialog a backup.xar is created When importing the backup.xar on 6.4.7 file is successfully attached, but when clicking to import there is no page shown although the size is 17MB Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website Facebook email From: users on behalf of Thomas Mortagne Sent: 27 January 2016 20:58 To: XWiki Users Subject: Re: [xwiki-users] MyXWiki: migrate users to a permanent XWiki instance XAR exported in 7.3 are supposed to be compatible with 6.4.x (or 1.0 for that matter). Unless you use things like sub space which simply don't exist in 6.4 (but even in this case you will get your document imported, just not exactly in the same place). Do you get an error when you import it in the UI or in the log ? On Wed, Jan 27, 2016 at 7:02 PM, Gerritjan Koekkoek wrote: > Hi, > > > The last half year we have used a free wiki from myXWiki.org, thanks a lot. > > Now we have decides to have a dedicated XWiki. Is it possible to migrate the > local users in that myXWiki instance to the new wiki. > > I tried to export one user as XAR and import it, but it does not convert to a > user-object > > The same problem with a macro page with the XWikiMacro and > XWikiMacroParameters objects. > > It results in empty wiki pages in the new wiki > > > myXWiki = 7.3 > > The new wiki is on 6.4.x > > So maybe a downgrade export/import not possible? > > > Gerritjan Koekkoek > Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS > Visit our website<http://www.cdlsworld.org> > Facebook<https://www.facebook.com/gerritjan.koekkoek> > email > > > > ___ > users mailing list > users@xwiki.org > http://lists.xwiki.org/mailman/listinfo/users -- Thomas Mortagne ___ 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] MyXWiki: migrate users to a permanent XWiki instance
Hi, The last half year we have used a free wiki from myXWiki.org, thanks a lot. Now we have decides to have a dedicated XWiki. Is it possible to migrate the local users in that myXWiki instance to the new wiki. I tried to export one user as XAR and import it, but it does not convert to a user-object The same problem with a macro page with the XWikiMacro and XWikiMacroParameters objects. It results in empty wiki pages in the new wiki myXWiki = 7.3 The new wiki is on 6.4.x So maybe a downgrade export/import not possible? Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Data-Types in UIExtension parameters
Hi I wonder if it is possible to use velocity data-types (Number, Date/Time, Array or List, Object) in the parameters field of a UIExtension. I get the impression it is always considered as string and we have to do a conversion? Following example (for a List of items in a Array) cdls.try.abc has the following parameters: label=abc target=Sandbox.try2 icon=gerritjan.png test=["Item1", 'item2', "item3"] {{velocity}} $services.uix.getExtensions("cdls.try.abc") #foreach ($extension in $services.uix.getExtensions("cdls.try.abc")) $services.rendering.render($extension.execute(), 'xhtml/1.0') #set($paramlist=$extension.getParameters().get('test')) #end paramlist is String?: $paramlist.class ##Would like it to be a list of items, but now I have to use velocity string functions to create the list... #set($paramlistLengthMinusOne = $paramlist.length() - 1) #set($items = $paramlist.substring(1, $paramlistLengthMinusOne).split(",")) #foreach($item in $items) "$item.replace('"',"")" #end {{/velocity}} Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] myxwiki local user gets rights block on XWikiUserProfileSheet
Hi, Invitation application did not work, so I tried to create a user manually and send him the password. This seems a very bad practice on myxwiki? I have get a lot of rights errors, and now user can not update his profile and gets a no-rights on XWikiUserProfileSheet. What is best way to get users on a myxwiki wiki (as a local user!) Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] myxwiki, invitation app does not work because wiki is closed?
> wrote: > When going to page go invitation app: > > Invitations can not be accepted because this wiki is closed. To allow > invitees to join, save InvitationGuestActions< > http://waihonapedia.myxwiki.org/xwiki/bin/view/Invitation/InvitationGuestActions> > as a user with Programming Rights. > > > > When clicking on invitationGuestActions and saving it it does not change > the page status? > Your account on myxwiki.org doesn't have PR for security reasons. Only the myxwiki.org farm admins have PR. ** But how do I get it fixed then, how can I ask somebody with PR to save that page > > > Gerritjan Koekkoek > Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS > Visit our website<http://www.cdlsworld.org> > Facebook<https://www.facebook.com/gerritjan.koekkoek> > email > > > > ___ > 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
[xwiki-users] myxwiki, invitation app does not work because wiki is closed?
When going to page go invitation app: Invitations can not be accepted because this wiki is closed. To allow invitees to join, save InvitationGuestActions<http://waihonapedia.myxwiki.org/xwiki/bin/view/Invitation/InvitationGuestActions> as a user with Programming Rights. When clicking on invitationGuestActions and saving it it does not change the page status? Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Myxwiki Instance problem
Tried To Change skins of Waihonapedia.myxwiki.org. Got a authorization error. Since That the url give white screen? Help... Thanks, Gerritjan Verstuurd vanaf mijn iPhone ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] XWQL unclear
Caused by: com.xpn.xwiki.XWikiException: Error number 0 in 3: Exception while hibernate execute at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:1305) at com.xpn.xwiki.store.XWikiHibernateBaseStore.executeRead(XWikiHibernateBaseStore.java:1366) at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor.execute(HqlQueryExecutor.java:90) ... 147 more Caused by: org.hibernate.QueryException: could not resolve property: street of: com.xpn.xwiki.objects.BaseObject [ select doc.fullName from com.xpn.xwiki.doc.XWikiDocument as doc , com.xpn.xwiki.objects.BaseObject as ttt where ( ttt.street = 'Burchtenlaan 97' ) and doc.fullName=ttt.name and ttt.className='CdlsatdCode.CdLS_ATD_UserProfileClass' ] I have XWQL statement that throws this error? But double checking I can not find why it states that 'street' is a property it can not solve? #set($supportgroupQry = "from doc.object(CdlsatdCode.CdLS_ATD_UserProfileClass) as ttt where ttt.street = 'Burchtenlaan 97'") $services.query.xwql($supportgroupQry).execute() The class: CdLS_ATD_UserProfileClass Class properties Street Address (street: String) City (city: String) State (state: String) Postal Code (postalCode: String) Country (country: String) Telephone (telephone: String) cdlsPersonName (cdlsPersonName: String) Date of Birth (cdlspersonDOB: Date) Height (cdlspersonHeight: String) measureHeight (measureHeight: Static List) Weight (cdlspersonWeight: String) measureWeight (measureWeight: Static List) Current Medication (currentMedication: TextArea) Your relationship with this person (cdlspersonRelation: String) contextUsr (contextUsr: String) Allowance for visibility of profile (visible: Boolean) Open to be contacted by other members (contact: Boolean) supportGroup (supportGroup: Database List) gender (gender: Static List) socialStatus (socialStatus: String) cdlsPersonAvatar (avatar: String) Gerritjan Koekkoek ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Get parts of a page...
When I add .getTranslatedDocument to the first getDocument it works not as expected In default language I do not notice difference, but when changing the language the lines that inspect the xObject fail Maybe it is important to mention that i'm not looking at ordinary XWiki pages, but pages created with appWithinMinutes. We used the virtual fields Title and Content because they have the advantage that we can translate the title and content without translating the other object-fields. So getDocument is done before getObject and basically I want to inspect the blocks inside the virtual content-field Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website Facebook email From: users on behalf of Thomas Mortagne Sent: 12 June 2015 12:18 To: XWiki Users Subject: Re: [xwiki-users] Get parts of a page... On Fri, Jun 12, 2015 at 12:07 PM, Gerritjan Koekkoek wrote: > I think I do need the block api! > The goal is to inspect the first block for having a "class: 'lead'" > But maybe I do not need the second getDocument()? > As you can see in the code below my original code did not loop through all > the blocks > I got the page content by (now commented out) > $topicDefenitionDocument.display('topicDescription','view',$topicDefenitionObject) > If I could add .getXDOM().getBlocks("class:ParagraphBlock", "DESCENDANT")) to > the object in the above? > > The title of the page I was able to get without the privileged API, like you > stated. > But the blocks of all class:ParagraphBlock I do need to inspect for the > class:'lead' > > I do get translated titles when I switch the language > But the blocks retrieved are only in default language? Did you tried ? getTranslatedDocument() give you the exact same kind of object you got before calling it, just that it's not the same document so you do have getXDOM() API too. > > My current code including the query: > Note the line that works, but will give me > #foreach($t in $topicList) > #set($topicDefenitionDocs = > $services.query.xwql("$topicDefenitionQry2").bindValue("topicreference",$t).addFilter("currentlanguage").execute()) > #if($topicDefenitionDocs != []) > #foreach($topicDefenitionDoc in $topicDefenitionDocs) > #set($topicDefenitionDocument=$xwiki.getDocument($topicDefenitionDoc)) > > #set($topicDefenitionObject=$topicDefenitionDocument.getObject($classDefenitionName)) > == > $topicDefenitionDocument.display('topicTitle','view',$topicDefenitionObject) > == > > ##$topicDefenitionDocument.display('topicDescription','view',$topicDefenitionObject) > #foreach($ParagraphBlock in > $topicDefenitionDocument.getDocument().getTranslatedDocument().getXDOM().getBlocks("class:ParagraphBlock", > "DESCENDANT")) > #if($velocityCount == 1) > #set ($blockParent = $ParagraphBlock.getParent()) > #set ($leadParagraph = $services.rendering.render($ParagraphBlock, > "xwiki/2.1")) > #if($blockParent.getParameter('class') == 'lead') >(%class="lead"%)((($leadParagraph))) > #else > $leadParagraph > #end > #end > #end > #end > #else > $t > #end > #end > __ > From: users on behalf of Thomas Mortagne > > Sent: 12 June 2015 11:10 > To: XWiki Users > Subject: Re: [xwiki-users] Get parts of a page... > > On Fri, Jun 12, 2015 at 10:56 AM, Gerritjan Koekkoek > wrote: >> I did as you described. >> But nope... >> >> Can it be related to the object I have the .getDocument() method on? >> I use XWQL executed with a .addFilter("current language") >> >> On the collection of document-references I get from that query I have a >> foreach loop. >> #foreach($topicDefenitionDoc in $topicDefenitionDocs) >> >> Then I set the variable: >> #set($topicDefenitionDocument=$xwiki.getDocument($topicDefenitionDoc)) >> >> And that variable I use in the 'Block' statement >> #foreach($ParagraphBlock in >> $topicDefenitionDocument.getDocument().getTranslatedDocument().getXDOM().getBlocks("class:ParagraphBlock", >> "DESCENDANT")) >> >> So I basicly do the getDocument.getTranslatedDocument on a object that is >> already filtered for current language > > It has nothing to do with your query, you get the default language > because you call $xwiki.getDocument with the name of the docume
Re: [xwiki-users] Get parts of a page...
I think I do need the block api! The goal is to inspect the first block for having a "class: 'lead'" But maybe I do not need the second getDocument()? As you can see in the code below my original code did not loop through all the blocks I got the page content by (now commented out) $topicDefenitionDocument.display('topicDescription','view',$topicDefenitionObject) If I could add .getXDOM().getBlocks("class:ParagraphBlock", "DESCENDANT")) to the object in the above? The title of the page I was able to get without the privileged API, like you stated. But the blocks of all class:ParagraphBlock I do need to inspect for the class:'lead' I do get translated titles when I switch the language But the blocks retrieved are only in default language? My current code including the query: Note the line that works, but will give me #foreach($t in $topicList) #set($topicDefenitionDocs = $services.query.xwql("$topicDefenitionQry2").bindValue("topicreference",$t).addFilter("currentlanguage").execute()) #if($topicDefenitionDocs != []) #foreach($topicDefenitionDoc in $topicDefenitionDocs) #set($topicDefenitionDocument=$xwiki.getDocument($topicDefenitionDoc)) #set($topicDefenitionObject=$topicDefenitionDocument.getObject($classDefenitionName)) == $topicDefenitionDocument.display('topicTitle','view',$topicDefenitionObject) == ##$topicDefenitionDocument.display('topicDescription','view',$topicDefenitionObject) #foreach($ParagraphBlock in $topicDefenitionDocument.getDocument().getTranslatedDocument().getXDOM().getBlocks("class:ParagraphBlock", "DESCENDANT")) #if($velocityCount == 1) #set ($blockParent = $ParagraphBlock.getParent()) #set ($leadParagraph = $services.rendering.render($ParagraphBlock, "xwiki/2.1")) #if($blockParent.getParameter('class') == 'lead') (%class="lead"%)((($leadParagraph))) #else $leadParagraph #end #end #end #end #else $t #end #end ______ From: users on behalf of Thomas Mortagne Sent: 12 June 2015 11:10 To: XWiki Users Subject: Re: [xwiki-users] Get parts of a page... On Fri, Jun 12, 2015 at 10:56 AM, Gerritjan Koekkoek wrote: > I did as you described. > But nope... > > Can it be related to the object I have the .getDocument() method on? > I use XWQL executed with a .addFilter("current language") > > On the collection of document-references I get from that query I have a > foreach loop. > #foreach($topicDefenitionDoc in $topicDefenitionDocs) > > Then I set the variable: > #set($topicDefenitionDocument=$xwiki.getDocument($topicDefenitionDoc)) > > And that variable I use in the 'Block' statement > #foreach($ParagraphBlock in > $topicDefenitionDocument.getDocument().getTranslatedDocument().getXDOM().getBlocks("class:ParagraphBlock", > "DESCENDANT")) > > So I basicly do the getDocument.getTranslatedDocument on a object that is > already filtered for current language It has nothing to do with your query, you get the default language because you call $xwiki.getDocument with the name of the document only. But I did not seen that your initial code was actually wrong, calling getDocument() twice is useless so the issue does not come from getTranslatedDocument(), it comes fro your second getDocument() (which by the way only work for you because you have the right to use privileged API which you really don't need here). > When I remove the getTranslatedDocument() it works, but only gives me the > default document language and not the current language > When I add the getTranslatedDocument() I get empty output > > Gerritjan Koekkoek > Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS > Visit our website > Facebook > email > > > > > > From: users on behalf of Thomas Mortagne > > Sent: 12 June 2015 09:38 > To: XWiki Users > Subject: Re: [xwiki-users] Get parts of a page... > > On Thu, Jun 11, 2015 at 8:18 PM, Gerritjan Koekkoek > wrote: >> I tied to replace getDocument() in this line with getTranslatedDocument()... > > getTranslatedDocument() is a Document API so you should not remove > getDocument(). In other words you get the translated version of that > document so it's getDocument().getTranslatedDocument(). > >> #foreach($ParagraphBlock in >> $topicDefenitionDocument.getDocument().getXDOM().getBlocks("class:ParagraphBlock", >> "DESCENDANT")) >> >> But the $ParagraphBlock is empty??? >> >> Gerritjan Ko
Re: [xwiki-users] Get parts of a page...
I did as you described. But nope... Can it be related to the object I have the .getDocument() method on? I use XWQL executed with a .addFilter("current language") On the collection of document-references I get from that query I have a foreach loop. #foreach($topicDefenitionDoc in $topicDefenitionDocs) Then I set the variable: #set($topicDefenitionDocument=$xwiki.getDocument($topicDefenitionDoc)) And that variable I use in the 'Block' statement #foreach($ParagraphBlock in $topicDefenitionDocument.getDocument().getTranslatedDocument().getXDOM().getBlocks("class:ParagraphBlock", "DESCENDANT")) So I basicly do the getDocument.getTranslatedDocument on a object that is already filtered for current language When I remove the getTranslatedDocument() it works, but only gives me the default document language and not the current language When I add the getTranslatedDocument() I get empty output Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website Facebook email From: users on behalf of Thomas Mortagne Sent: 12 June 2015 09:38 To: XWiki Users Subject: Re: [xwiki-users] Get parts of a page... On Thu, Jun 11, 2015 at 8:18 PM, Gerritjan Koekkoek wrote: > I tied to replace getDocument() in this line with getTranslatedDocument()... getTranslatedDocument() is a Document API so you should not remove getDocument(). In other words you get the translated version of that document so it's getDocument().getTranslatedDocument(). > #foreach($ParagraphBlock in > $topicDefenitionDocument.getDocument().getXDOM().getBlocks("class:ParagraphBlock", > "DESCENDANT")) > > But the $ParagraphBlock is empty??? > > Gerritjan Koekkoek > Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS > Visit our website > Facebook > email > > > > > > From: users on behalf of Thomas Mortagne > > Sent: 11 June 2015 19:46 > To: XWiki Users > Subject: Re: [xwiki-users] Get parts of a page... > > On Thu, Jun 11, 2015 at 4:37 PM, Gerritjan Koekkoek > wrote: >> I almost have it right I think: >> #foreach($topicDefenitionDoc in $topicDefenitionDocs) >> #set($topicDefenitionDocument=$xwiki.getDocument($topicDefenitionDoc)) >> >> #set($topicDefenitionObject=$topicDefenitionDocument.getObject($classDefenitionName)) >> == >> $topicDefenitionDocument.display('topicTitle','view',$topicDefenitionObject) >> == >> >> ##$topicDefenitionDocument.display('topicDescription','view',$topicDefenitionObject) >> #foreach($ParagraphBlock in >> $topicDefenitionDocument.getDocument().getXDOM().getBlocks("class:ParagraphBlock", >> "DESCENDANT")) >> #if($velocityCount == 1) >> #set ($blockParent = $ParagraphBlock.getParent()) >> #set ($leadParagraph = $services.rendering.render($ParagraphBlock, >> "xwiki/2.1")) >> #if($blockParent.getParameter('class') == 'lead') >>(%class="lead"%)((($leadParagraph))) >> #else >>$leadParagraph >> #end >> #end >> #end >> >> The one issue I have left is the translation. >> The $topicDefenitionsDocs are in the $context.language >> >> But the Blocks are in the default language? >> How can I get the blocks in the $context.language > > In document API you have getTranslatedDocument() which return the > right document from current locale point of view on which you can then > call getXDOM(). > >> >> Gerritjan Koekkoek >> Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS >> Visit our website >> Facebook >> email >> >> >> >> >> >> From: users on behalf of Thomas Mortagne >> >> Sent: 11 June 2015 13:51 >> To: XWiki Users >> Subject: Re: [xwiki-users] Get parts of a page... >> >> On Thu, Jun 11, 2015 at 12:58 PM, Gerritjan Koekkoek >> wrote: >>> A little progress, but what to do to inspect if paragraph has class lead to >>> it and to display the paragraph remains unclear. >>> >>> #foreach($topicDefenitionDoc in $topicDefenitionDocs) >>> #set($topicDefenitionDocument=$xwiki.getDocument($topicDefenitionDoc)) >>> >>> #set($topicDefenitionObject=$topicDefenitionDocument.getObject($classDefenitionName)) >>> == >>> $topicDefenitionDocument.display('topicTitle',
Re: [xwiki-users] Get parts of a page...
I tied to replace getDocument() in this line with getTranslatedDocument()... #foreach($ParagraphBlock in $topicDefenitionDocument.getDocument().getXDOM().getBlocks("class:ParagraphBlock", "DESCENDANT")) But the $ParagraphBlock is empty??? Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website Facebook email From: users on behalf of Thomas Mortagne Sent: 11 June 2015 19:46 To: XWiki Users Subject: Re: [xwiki-users] Get parts of a page... On Thu, Jun 11, 2015 at 4:37 PM, Gerritjan Koekkoek wrote: > I almost have it right I think: > #foreach($topicDefenitionDoc in $topicDefenitionDocs) > #set($topicDefenitionDocument=$xwiki.getDocument($topicDefenitionDoc)) > > #set($topicDefenitionObject=$topicDefenitionDocument.getObject($classDefenitionName)) > == > $topicDefenitionDocument.display('topicTitle','view',$topicDefenitionObject) > == > > ##$topicDefenitionDocument.display('topicDescription','view',$topicDefenitionObject) > #foreach($ParagraphBlock in > $topicDefenitionDocument.getDocument().getXDOM().getBlocks("class:ParagraphBlock", > "DESCENDANT")) > #if($velocityCount == 1) > #set ($blockParent = $ParagraphBlock.getParent()) > #set ($leadParagraph = $services.rendering.render($ParagraphBlock, > "xwiki/2.1")) > #if($blockParent.getParameter('class') == 'lead') >(%class="lead"%)((($leadParagraph))) > #else >$leadParagraph > #end > #end > #end > > The one issue I have left is the translation. > The $topicDefenitionsDocs are in the $context.language > > But the Blocks are in the default language? > How can I get the blocks in the $context.language In document API you have getTranslatedDocument() which return the right document from current locale point of view on which you can then call getXDOM(). > > Gerritjan Koekkoek > Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS > Visit our website > Facebook > email > > > > > > From: users on behalf of Thomas Mortagne > > Sent: 11 June 2015 13:51 > To: XWiki Users > Subject: Re: [xwiki-users] Get parts of a page... > > On Thu, Jun 11, 2015 at 12:58 PM, Gerritjan Koekkoek > wrote: >> A little progress, but what to do to inspect if paragraph has class lead to >> it and to display the paragraph remains unclear. >> >> #foreach($topicDefenitionDoc in $topicDefenitionDocs) >> #set($topicDefenitionDocument=$xwiki.getDocument($topicDefenitionDoc)) >> >> #set($topicDefenitionObject=$topicDefenitionDocument.getObject($classDefenitionName)) >> == >> $topicDefenitionDocument.display('topicTitle','view',$topicDefenitionObject) >> == >> >> $topicDefenitionDocument.display('topicDescription','view',$topicDefenitionObject) >> #foreach($ParagraphBlock in >> $topicDefenitionDocument.getDocument().getXDOM().getBlocks("class:ParagraphBlock", >> "DESCENDANT")) >> #if($velocityCount == 1) >> $ParagraphBlock.self >> #end >> $velocityCount >> #end >> #end >> #else >> >> Will give me a correct count of all html parts >> One of these, usually the first is enclosed by a >> I would like to display this text only >> $ParagraphBlock.self >> But it does only show: >> $ParagraphBlock.self > > There is no such method in Block so not sure what you expect "self" to > do. If you want to render a block you can use rendering service, see > http://extensions.xwiki.org/xwiki/bin/view/Extension/Rendering+Module. > >> >> as if method in this context is not valid >> >> Second I have no idea how to inspect the that holds the >> first >> >> My output currently looks as follows: >> >> Behavior >> Behavioral problems in people with CdLS are not inevitable. In fact, some >> people have no behavioral problems, while others are mild, have transient >> problems. Many problems are treatable. At the same time it is obviously the >> severity of behavioral problems in people who injure themselves or others >> deny. >> Many behavior problems are a reaction to something in the body or the >> environment and they are cyclical (they come and go). Behavioral changes >> often occur in early childhood and the teenage years. Like
Re: [xwiki-users] Get parts of a page...
I almost have it right I think: #foreach($topicDefenitionDoc in $topicDefenitionDocs) #set($topicDefenitionDocument=$xwiki.getDocument($topicDefenitionDoc)) #set($topicDefenitionObject=$topicDefenitionDocument.getObject($classDefenitionName)) == $topicDefenitionDocument.display('topicTitle','view',$topicDefenitionObject) == ##$topicDefenitionDocument.display('topicDescription','view',$topicDefenitionObject) #foreach($ParagraphBlock in $topicDefenitionDocument.getDocument().getXDOM().getBlocks("class:ParagraphBlock", "DESCENDANT")) #if($velocityCount == 1) #set ($blockParent = $ParagraphBlock.getParent()) #set ($leadParagraph = $services.rendering.render($ParagraphBlock, "xwiki/2.1")) #if($blockParent.getParameter('class') == 'lead') (%class="lead"%)((($leadParagraph))) #else $leadParagraph #end #end #end The one issue I have left is the translation. The $topicDefenitionsDocs are in the $context.language But the Blocks are in the default language? How can I get the blocks in the $context.language Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website Facebook email From: users on behalf of Thomas Mortagne Sent: 11 June 2015 13:51 To: XWiki Users Subject: Re: [xwiki-users] Get parts of a page... On Thu, Jun 11, 2015 at 12:58 PM, Gerritjan Koekkoek wrote: > A little progress, but what to do to inspect if paragraph has class lead to > it and to display the paragraph remains unclear. > > #foreach($topicDefenitionDoc in $topicDefenitionDocs) > #set($topicDefenitionDocument=$xwiki.getDocument($topicDefenitionDoc)) > > #set($topicDefenitionObject=$topicDefenitionDocument.getObject($classDefenitionName)) > == > $topicDefenitionDocument.display('topicTitle','view',$topicDefenitionObject) > == > > $topicDefenitionDocument.display('topicDescription','view',$topicDefenitionObject) > #foreach($ParagraphBlock in > $topicDefenitionDocument.getDocument().getXDOM().getBlocks("class:ParagraphBlock", > "DESCENDANT")) > #if($velocityCount == 1) > $ParagraphBlock.self > #end > $velocityCount > #end > #end > #else > > Will give me a correct count of all html parts > One of these, usually the first is enclosed by a > I would like to display this text only > $ParagraphBlock.self > But it does only show: > $ParagraphBlock.self There is no such method in Block so not sure what you expect "self" to do. If you want to render a block you can use rendering service, see http://extensions.xwiki.org/xwiki/bin/view/Extension/Rendering+Module. > > as if method in this context is not valid > > Second I have no idea how to inspect the that holds the > first > > My output currently looks as follows: > > Behavior > Behavioral problems in people with CdLS are not inevitable. In fact, some > people have no behavioral problems, while others are mild, have transient > problems. Many problems are treatable. At the same time it is obviously the > severity of behavioral problems in people who injure themselves or others > deny. > Many behavior problems are a reaction to something in the body or the > environment and they are cyclical (they come and go). Behavioral changes > often occur in early childhood and the teenage years. Like most people, > develop people with CdLS behavior for a certain reason, and it is important > to first address the underlying causes of the behavior. If the source of the > behavior is determined, one can try to recognize that resource and to avoid. > > If the behavior follows a pattern (such as it is always at the same time, > same place, or to a particular person) treatment will begin to investigate > whether the situation can be changed. When the problem is that the > environment does not provide sufficient structure or variation, that can be > addressed. Discovering the reasons for behavior is the most difficult part of > the treatment. Sometimes one can not eliminate the cause and one should look > for ways to control the behavior. This can vary from moment to rest in your > own room, distract the person to another activity to the use of protective > clothing. > > It remains important to always look at possible underlying medical problems. > Gastrointestinal problems, muscle pain, ear infections, dental pain and > epilepsy can cause irritability, self-injurious behavior or aggressive > behavior. Even people who can communi
Re: [xwiki-users] Get parts of a page...
From: users on behalf of Thomas Mortagne Sent: 11 June 2015 13:51 To: XWiki Users Subject: Re: [xwiki-users] Get parts of a page... On Thu, Jun 11, 2015 at 12:58 PM, Gerritjan Koekkoek wrote: > A little progress, but what to do to inspect if paragraph has class lead to > it and to display the paragraph remains unclear. > > #foreach($topicDefenitionDoc in $topicDefenitionDocs) > #set($topicDefenitionDocument=$xwiki.getDocument($topicDefenitionDoc)) > > #set($topicDefenitionObject=$topicDefenitionDocument.getObject($classDefenitionName)) > == > $topicDefenitionDocument.display('topicTitle','view',$topicDefenitionObject) > == > > $topicDefenitionDocument.display('topicDescription','view',$topicDefenitionObject) > #foreach($ParagraphBlock in > $topicDefenitionDocument.getDocument().getXDOM().getBlocks("class:ParagraphBlock", > "DESCENDANT")) > #if($velocityCount == 1) > $ParagraphBlock.self > #end > $velocityCount > #end > #end > #else > > Will give me a correct count of all html parts > One of these, usually the first is enclosed by a > I would like to display this text only > $ParagraphBlock.self > But it does only show: > $ParagraphBlock.self There is no such method in Block so not sure what you expect "self" to do. I read something in this page which reminds me of my days in XSLT... http://nexus.xwiki.org/nexus/service/local/repositories/releases/archive/org/xwiki/rendering/xwiki-rendering-api/6.4.4/xwiki-rendering-api-6.4.4-javadoc.jar/!/org/xwiki/rendering/block/Block.Axes.html Self is mentioned as last search option... If you want to render a block you can use rendering service, see http://extensions.xwiki.org/xwiki/bin/view/Extension/Rendering+Module. OK > > as if method in this context is not valid > > Second I have no idea how to inspect the that holds the > first Any Idea how to evaluate if paragraph is insight this div? > > My output currently looks as follows: > > Behavior > Behavioral problems in people with CdLS are not inevitable. In fact, some > people have no behavioral problems, while others are mild, have transient > problems. Many problems are treatable. At the same time it is obviously the > severity of behavioral problems in people who injure themselves or others > deny. > Many behavior problems are a reaction to something in the body or the > environment and they are cyclical (they come and go). Behavioral changes > often occur in early childhood and the teenage years. Like most people, > develop people with CdLS behavior for a certain reason, and it is important > to first address the underlying causes of the behavior. If the source of the > behavior is determined, one can try to recognize that resource and to avoid. > > If the behavior follows a pattern (such as it is always at the same time, > same place, or to a particular person) treatment will begin to investigate > whether the situation can be changed. When the problem is that the > environment does not provide sufficient structure or variation, that can be > addressed. Discovering the reasons for behavior is the most difficult part of > the treatment. Sometimes one can not eliminate the cause and one should look > for ways to control the behavior. This can vary from moment to rest in your > own room, distract the person to another activity to the use of protective > clothing. > > It remains important to always look at possible underlying medical problems. > Gastrointestinal problems, muscle pain, ear infections, dental pain and > epilepsy can cause irritability, self-injurious behavior or aggressive > behavior. Even people who can communicate well, sometimes can not recognize > the source of their discontent. Undetected disease (silent reflux) and tooth > decay / gum disease are the two most common causes of behavioral changes. > > > $ParagraphBlock.self > 1 > 2 > 3 > 4 > > Gerritjan Koekkoek > Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS > Visit our website > Facebook > email > > > > > > From: Gerritjan Koekkoek > Sent: 08 June 2015 18:45 > To: XWiki Users > Subject: Re: [xwiki-users] Get parts of a page... > > I'm not sure what cased the 503, maybe because I did: > #foreach($topicDefenitionDoc in $topicDefenitionDocs) >#set($topicDefenitionDocument=$xwiki.getDocument($topicDefenitionDoc)) > > #set($topicDefenitionObject=$topicDefenitionDocument.getObject($classDefenitionName)) >== > $topicDefenitionDocument.display('topicTi
Re: [xwiki-users] Get parts of a page...
A little progress, but what to do to inspect if paragraph has class lead to it and to display the paragraph remains unclear. #foreach($topicDefenitionDoc in $topicDefenitionDocs) #set($topicDefenitionDocument=$xwiki.getDocument($topicDefenitionDoc)) #set($topicDefenitionObject=$topicDefenitionDocument.getObject($classDefenitionName)) == $topicDefenitionDocument.display('topicTitle','view',$topicDefenitionObject) == $topicDefenitionDocument.display('topicDescription','view',$topicDefenitionObject) #foreach($ParagraphBlock in $topicDefenitionDocument.getDocument().getXDOM().getBlocks("class:ParagraphBlock", "DESCENDANT")) #if($velocityCount == 1) $ParagraphBlock.self #end $velocityCount #end #end #else Will give me a correct count of all html parts One of these, usually the first is enclosed by a I would like to display this text only $ParagraphBlock.self But it does only show: $ParagraphBlock.self as if method in this context is not valid Second I have no idea how to inspect the that holds the first My output currently looks as follows: Behavior Behavioral problems in people with CdLS are not inevitable. In fact, some people have no behavioral problems, while others are mild, have transient problems. Many problems are treatable. At the same time it is obviously the severity of behavioral problems in people who injure themselves or others deny. Many behavior problems are a reaction to something in the body or the environment and they are cyclical (they come and go). Behavioral changes often occur in early childhood and the teenage years. Like most people, develop people with CdLS behavior for a certain reason, and it is important to first address the underlying causes of the behavior. If the source of the behavior is determined, one can try to recognize that resource and to avoid. If the behavior follows a pattern (such as it is always at the same time, same place, or to a particular person) treatment will begin to investigate whether the situation can be changed. When the problem is that the environment does not provide sufficient structure or variation, that can be addressed. Discovering the reasons for behavior is the most difficult part of the treatment. Sometimes one can not eliminate the cause and one should look for ways to control the behavior. This can vary from moment to rest in your own room, distract the person to another activity to the use of protective clothing. It remains important to always look at possible underlying medical problems. Gastrointestinal problems, muscle pain, ear infections, dental pain and epilepsy can cause irritability, self-injurious behavior or aggressive behavior. Even people who can communicate well, sometimes can not recognize the source of their discontent. Undetected disease (silent reflux) and tooth decay / gum disease are the two most common causes of behavioral changes. $ParagraphBlock.self 1 2 3 4 Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website Facebook email ____ From: Gerritjan Koekkoek Sent: 08 June 2015 18:45 To: XWiki Users Subject: Re: [xwiki-users] Get parts of a page... I'm not sure what cased the 503, maybe because I did: #foreach($topicDefenitionDoc in $topicDefenitionDocs) #set($topicDefenitionDocument=$xwiki.getDocument($topicDefenitionDoc)) #set($topicDefenitionObject=$topicDefenitionDocument.getObject($classDefenitionName)) == $topicDefenitionDocument.display('topicTitle','view',$topicDefenitionObject) == #foreach($headerBlock in $topicDefenitionDocument.getXDOM().getBlocks("class:HeaderBlock", ""DESCENDANT")) $headerBlock -- to inspect what's inside #end #end I changed the inside of the loop to $velocityCount and indeed the numbers seemed to allign wel with number of headers inside the page I've now changed class:HeaderBlock into class:GroupBlock but now the $velocityCount equals 1 all the time wile my text is like: == Behavior == Behavioral problems in people with CdLS are not inevitable. In fact, some people have no behavioral problems, while others are mild, have transient problems. Many problems are treatable. At the same time it is obviously the severity of behavioral problems in people who injure themselves or others deny. Many behavior problems are a reaction to something in the body or the environment and they are cyclical (they come and go). Behavioral changes often occur in early childhood and the teenage years. Like most people, develop people with CdLS behavior for a certain reason, and it is important to first address the underlying causes of the behavior. If the source of the behavior is determined, one can try to recognize that resource and to
Re: [xwiki-users] Get parts of a page...
I'm not sure what cased the 503, maybe because I did: #foreach($topicDefenitionDoc in $topicDefenitionDocs) #set($topicDefenitionDocument=$xwiki.getDocument($topicDefenitionDoc)) #set($topicDefenitionObject=$topicDefenitionDocument.getObject($classDefenitionName)) == $topicDefenitionDocument.display('topicTitle','view',$topicDefenitionObject) == #foreach($headerBlock in $topicDefenitionDocument.getXDOM().getBlocks("class:HeaderBlock", ""DESCENDANT")) $headerBlock -- to inspect what's inside #end #end I changed the inside of the loop to $velocityCount and indeed the numbers seemed to allign wel with number of headers inside the page I've now changed class:HeaderBlock into class:GroupBlock but now the $velocityCount equals 1 all the time wile my text is like: == Behavior == Behavioral problems in people with CdLS are not inevitable. In fact, some people have no behavioral problems, while others are mild, have transient problems. Many problems are treatable. At the same time it is obviously the severity of behavioral problems in people who injure themselves or others deny. Many behavior problems are a reaction to something in the body or the environment and they are cyclical (they come and go). Behavioral changes often occur in early childhood and the teenage years. Like most people, develop people with CdLS behavior for a certain reason, and it is important to first address the underlying causes of the behavior. If the source of the behavior is determined, one can try to recognize that resource and to avoid. If the behavior follows a pattern (such as it is always at the same time, same place, or to a particular person) treatment will begin to investigate whether the situation can be changed. When the problem is that the environment does not provide sufficient structure or variation, that can be addressed. Discovering the reasons for behavior is the most difficult part of the treatment. Sometimes one can not eliminate the cause and one should look for ways to control the behavior. This can vary from moment to rest in your own room, distract the person to another activity to the use of protective clothing. It remains important to always look at possible underlying medical problems. Gastrointestinal problems, muscle pain, ear infections, dental pain and epilepsy can cause irritability, self-injurious behavior or aggressive behavior. Even people who can communicate well, sometimes can not recognize the source of their discontent. Undetected disease (silent reflux) and tooth decay / gum disease are the two most common causes of behavioral changes. I would have expected the velocity count to number to 4 )equal to number op tags in the text? but it counts only 1 Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website Facebook email From: users on behalf of Thomas Mortagne Sent: 08 June 2015 11:19 To: XWiki Users Subject: Re: [xwiki-users] Get parts of a page... On Mon, Jun 8, 2015 at 11:11 AM, Gerritjan Koekkoek wrote: > From: users on behalf of Thomas Mortagne > > Sent: 08 June 2015 11:00 > To: XWiki Users > Subject: Re: [xwiki-users] Get parts of a page... > > On Mon, Jun 8, 2015 at 10:52 AM, Gerritjan Koekkoek > wrote: >> From: users on behalf of Thomas Mortagne >> >> Sent: 08 June 2015 10:46 >> To: XWiki Users >> Subject: Re: [xwiki-users] Get parts of a page... >> >> On Mon, Jun 8, 2015 at 10:28 AM, Gerritjan Koekkoek >> wrote: >>> Hi, >>> >>> this indeed looks very useful... >>> We run XWiki version 6.4 > > Is this functionality very costly from a performance perspective? > The loop i'm running will give me approx 25 pages > Now I have added the loop through all the Headerblocks and the server crashed > (503 service not available) > Now retrying and the page load is very slow: Wating for many minutes now? Loading 25 pages is slow whatever you do with them, then they are in cache and it should be OK. I don't see how reading a XDOM could cause a crash, you should look at the log and see what this 503 really mean. > >>> >>> From: users on behalf of Thomas Mortagne >>> >>> Sent: 08 June 2015 10:17 >>> To: XWiki Users >>> Subject: Re: [xwiki-users] Get parts of a page... >>> >>> In your macro you could get the document and then use something like >>> what is described in >>> http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWiki61RC1#HAccesstoBlockMatchersfromvelocityscripts >>> to extract the GroupBlock you want (i.e. the one with a parameter >>> "
Re: [xwiki-users] Get parts of a page...
From: users on behalf of Thomas Mortagne Sent: 08 June 2015 11:00 To: XWiki Users Subject: Re: [xwiki-users] Get parts of a page... On Mon, Jun 8, 2015 at 10:52 AM, Gerritjan Koekkoek wrote: > From: users on behalf of Thomas Mortagne > > Sent: 08 June 2015 10:46 > To: XWiki Users > Subject: Re: [xwiki-users] Get parts of a page... > > On Mon, Jun 8, 2015 at 10:28 AM, Gerritjan Koekkoek > wrote: >> Hi, >> >> this indeed looks very useful... >> We run XWiki version 6.4 Is this functionality very costly from a performance perspective? The loop i'm running will give me approx 25 pages Now I have added the loop through all the Headerblocks and the server crashed (503 service not available) Now retrying and the page load is very slow: Wating for many minutes now? >> >> From: users on behalf of Thomas Mortagne >> >> Sent: 08 June 2015 10:17 >> To: XWiki Users >> Subject: Re: [xwiki-users] Get parts of a page... >> >> In your macro you could get the document and then use something like >> what is described in >> http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWiki61RC1#HAccesstoBlockMatchersfromvelocityscripts >> to extract the GroupBlock you want (i.e. the one with a parameter >> "class" equals to "lead" from what I understood). >> >> My script is: >> #foreach($topicDefenitionDoc in $topicDefenitionDocs) >> #set($topicDefenitionDocument=$xwiki.getDocument($topicDefenitionDoc)) >> >> #set($topicDefenitionObject=$topicDefenitionDocument.getObject($classDefenitionName)) >> == >> $topicDefenitionDocument.display('topicTitle','view',$topicDefenitionObject) >> == >> $topicDefenitionDocument.getXDOM().getBlocks("class:lead", >> "DESCENDANT") > I understand above line should be changed in: > #foreach($headerBlock in > $topicDefenitionDocument.getXDOM().getBlocks("class:HeaderBlock", > "DESCENDANT")) > But how do is then inspect if the block has the 'class="lead" ? Note that HeaderBlock is for headers and what you have in your example in your first mail is a GroupBlock. Now for the parameters I talked about see http://nexus.xwiki.org/nexus/service/local/repositories/releases/archive/org/xwiki/rendering/xwiki-rendering-api/6.4.4/xwiki-rendering-api-6.4.4-javadoc.jar/!/org/xwiki/rendering/block/Block.html#getParameter%28java.lang.String%29 When you have the block you can as for the value of "class" parameter using $headerBlock.getParameter('class') > ... > #end >> #end >> >> But the output I get is: >> == Behavior == >> $topicDefenitionDocument.getXDOM().getBlocks("class:lead", "DESCENDANT") >> == Early Intervention / Education == >> $topicDefenitionDocument.getXDOM().getBlocks("class:lead", "DESCENDANT") >> >> ... >> What am I missing? > > the "class" in $topicDefenitionDocument.getXDOM().getBlocks("class:lead", > "DESCENDANT") has nothing to do with css. This is the Java class of > the block you want to find so you are supposed to put GroupBlock there > as I suggested and then select the one in the list having the > parameter "class" equals to "lead". > >> I also tried: >> $topicDefenitionDocument..getDocument().getXDOM().getBlocks("class:lead", >> "DESCENDANT") >> Same result, as if methods/functions are not available? >> >> On Mon, Jun 8, 2015 at 9:31 AM, Gerritjan Koekkoek >> wrote: >>> I know wiki has a nice macro to select a part of a page based on headers. >>> >>> But headers can be changed and when you translate the page the page holding >>> the macro wil have a ugly error. >>> >>> >>> {{include reference="DocumentToInclude" section="HMySection"}} >>> >>> >>> How could I do it based on the following wiki syntax: >>> >>> >>> (%class="lead")((( >>> >>> Text to be included >>> >>> ))) >>> >>> Text to be excluded >>> >>> >>> 'Text to be included' and 'text to be excluded' can have any wiki-markup >>> >>> >>> I would like to create a macro that would look like >>> >>> {{myGetSectionMacro reference="DocumentToInclude" onlyLeadText="true"}} >>> >>> >>> I could get the whole page by >>> >>> {{myGetSectio
Re: [xwiki-users] Get parts of a page...
From: users on behalf of Thomas Mortagne Sent: 08 June 2015 10:46 To: XWiki Users Subject: Re: [xwiki-users] Get parts of a page... On Mon, Jun 8, 2015 at 10:28 AM, Gerritjan Koekkoek wrote: > Hi, > > this indeed looks very useful... > We run XWiki version 6.4 > > From: users on behalf of Thomas Mortagne > > Sent: 08 June 2015 10:17 > To: XWiki Users > Subject: Re: [xwiki-users] Get parts of a page... > > In your macro you could get the document and then use something like > what is described in > http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWiki61RC1#HAccesstoBlockMatchersfromvelocityscripts > to extract the GroupBlock you want (i.e. the one with a parameter > "class" equals to "lead" from what I understood). > > My script is: > #foreach($topicDefenitionDoc in $topicDefenitionDocs) > #set($topicDefenitionDocument=$xwiki.getDocument($topicDefenitionDoc)) > > #set($topicDefenitionObject=$topicDefenitionDocument.getObject($classDefenitionName)) > == > $topicDefenitionDocument.display('topicTitle','view',$topicDefenitionObject) > == > $topicDefenitionDocument.getXDOM().getBlocks("class:lead", > "DESCENDANT") I understand above line should be changed in: #foreach($headerBlock in $topicDefenitionDocument.getXDOM().getBlocks("class:HeaderBlock", "DESCENDANT")) But how do is then inspect if the block has the 'class="lead" ? ... #end > #end > > But the output I get is: > == Behavior == > $topicDefenitionDocument.getXDOM().getBlocks("class:lead", "DESCENDANT") > == Early Intervention / Education == > $topicDefenitionDocument.getXDOM().getBlocks("class:lead", "DESCENDANT") > > ... > What am I missing? the "class" in $topicDefenitionDocument.getXDOM().getBlocks("class:lead", "DESCENDANT") has nothing to do with css. This is the Java class of the block you want to find so you are supposed to put GroupBlock there as I suggested and then select the one in the list having the parameter "class" equals to "lead". > I also tried: > $topicDefenitionDocument..getDocument().getXDOM().getBlocks("class:lead", > "DESCENDANT") > Same result, as if methods/functions are not available? > > On Mon, Jun 8, 2015 at 9:31 AM, Gerritjan Koekkoek > wrote: >> I know wiki has a nice macro to select a part of a page based on headers. >> >> But headers can be changed and when you translate the page the page holding >> the macro wil have a ugly error. >> >> >> {{include reference="DocumentToInclude" section="HMySection"}} >> >> >> How could I do it based on the following wiki syntax: >> >> >> (%class="lead")((( >> >> Text to be included >> >> ))) >> >> Text to be excluded >> >> >> 'Text to be included' and 'text to be excluded' can have any wiki-markup >> >> >> I would like to create a macro that would look like >> >> {{myGetSectionMacro reference="DocumentToInclude" onlyLeadText="true"}} >> >> >> I could get the whole page by >> >> {{myGetSectionMacro reference="DocumentToInclude" onlyLeadText="false"}} >> >> >> I could get only 'Text to be excluded' by >> >> {{myGetSectionMacro reference="DocumentToInclude" onlyLeadText="false" >> onlyRestText="true"}} >> >> Any suggestion is welcome >> Note that the used Class is a bootstrap class that will add markup to the >> section that will show it as a INTRO text... >> >> >> Gerritjan Koekkoek >> Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS >> Visit our website<http://www.cdlsworld.org> >> Facebook<https://www.facebook.com/gerritjan.koekkoek> >> email >> >> >> >> ___ >> users mailing list >> users@xwiki.org >> http://lists.xwiki.org/mailman/listinfo/users > > > > -- > Thomas Mortagne > ___ > 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 -- Thomas Mortagne ___ 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] Get parts of a page...
Hi, this indeed looks very useful... We run XWiki version 6.4 From: users on behalf of Thomas Mortagne Sent: 08 June 2015 10:17 To: XWiki Users Subject: Re: [xwiki-users] Get parts of a page... In your macro you could get the document and then use something like what is described in http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWiki61RC1#HAccesstoBlockMatchersfromvelocityscripts to extract the GroupBlock you want (i.e. the one with a parameter "class" equals to "lead" from what I understood). My script is: #foreach($topicDefenitionDoc in $topicDefenitionDocs) #set($topicDefenitionDocument=$xwiki.getDocument($topicDefenitionDoc)) #set($topicDefenitionObject=$topicDefenitionDocument.getObject($classDefenitionName)) == $topicDefenitionDocument.display('topicTitle','view',$topicDefenitionObject) == $topicDefenitionDocument.getXDOM().getBlocks("class:lead", "DESCENDANT") #end But the output I get is: == Behavior == $topicDefenitionDocument.getXDOM().getBlocks("class:lead", "DESCENDANT") == Early Intervention / Education == $topicDefenitionDocument.getXDOM().getBlocks("class:lead", "DESCENDANT") ... What am I missing? I also tried: $topicDefenitionDocument..getDocument().getXDOM().getBlocks("class:lead", "DESCENDANT") Same result, as if methods/functions are not available? On Mon, Jun 8, 2015 at 9:31 AM, Gerritjan Koekkoek wrote: > I know wiki has a nice macro to select a part of a page based on headers. > > But headers can be changed and when you translate the page the page holding > the macro wil have a ugly error. > > > {{include reference="DocumentToInclude" section="HMySection"}} > > > How could I do it based on the following wiki syntax: > > > (%class="lead")((( > > Text to be included > > ))) > > Text to be excluded > > > 'Text to be included' and 'text to be excluded' can have any wiki-markup > > > I would like to create a macro that would look like > > {{myGetSectionMacro reference="DocumentToInclude" onlyLeadText="true"}} > > > I could get the whole page by > > {{myGetSectionMacro reference="DocumentToInclude" onlyLeadText="false"}} > > > I could get only 'Text to be excluded' by > > {{myGetSectionMacro reference="DocumentToInclude" onlyLeadText="false" > onlyRestText="true"}} > > Any suggestion is welcome > Note that the used Class is a bootstrap class that will add markup to the > section that will show it as a INTRO text... > > > Gerritjan Koekkoek > Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS > Visit our website<http://www.cdlsworld.org> > Facebook<https://www.facebook.com/gerritjan.koekkoek> > email > > > > ___ > users mailing list > users@xwiki.org > http://lists.xwiki.org/mailman/listinfo/users -- Thomas Mortagne ___ 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] Get parts of a page...
I know wiki has a nice macro to select a part of a page based on headers. But headers can be changed and when you translate the page the page holding the macro wil have a ugly error. {{include reference="DocumentToInclude" section="HMySection"}} How could I do it based on the following wiki syntax: (%class="lead")((( Text to be included ))) Text to be excluded 'Text to be included' and 'text to be excluded' can have any wiki-markup I would like to create a macro that would look like {{myGetSectionMacro reference="DocumentToInclude" onlyLeadText="true"}} I could get the whole page by {{myGetSectionMacro reference="DocumentToInclude" onlyLeadText="false"}} I could get only 'Text to be excluded' by {{myGetSectionMacro reference="DocumentToInclude" onlyLeadText="false" onlyRestText="true"}} Any suggestion is welcome Note that the used Class is a bootstrap class that will add markup to the section that will show it as a INTRO text... Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Container macro disables headers as anchors?
When we have headers of level 1 or 2 inside the container macro it looks they can not be used as "section" in the Include/Display macro? Or are we missing something? Our goal is to have columns in a wide display that responsive change to a single column when the display (tablets, smart-phones) does not have enough width Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Class with DB List multiselect
Hi, On Fri, Apr 3, 2015 at 9:25 PM, Gerritjan Koekkoek < gerritjankoekk...@gmail.com> wrote: >> I would like to create a form for a international audience (multi language) >> So I created a AppWithinMinutes app. >> I would like that my users can Multiselect from a list that is a selection >> of objects based on a class. >> >> So i created a class (with AppWithinMinutes: >> Class properties >> Short Text (shortText1: String) >> Long Text (longText1: TextArea) >> Long Text (longText2: TextArea) >> Database List (databaseList1: Database List) >> >> The databaseList1 has the following properties: >> DisplayType: checkbox >> Multiple Select: true >> XWiki Class Name: XWiki.UIExtensionClass >> Id Field Name: name () >> Value Field Name: name >> >> >> The first issue I get that I get all objects of the class. I hoped to add a >> selection by adding this query: >> from doc.object(XWiki.UIExtensionClass) as obj where >> lower(obj.extensionPointId) like '%cdlsworld.standardized.questionaires%' >> and ('wiki' = obj.scope) order by obj.name >> But how can I add this? >> >> ==Eduard replied >Why not use the HQL Query option for the DBList property? It's right next >to the Class Name option. > >Have a look at >http://dev.xwiki.org/xwiki/bin/view/Drafts/DatabaseListProperties and >http://www.xwiki.org/xwiki/bin/view/FAQ/HowToCreateAOneToManyRelationshipInXWiki >for more details. === That works, I used the xwql -> hql converter script-snippet to convert the xwql select doc.fullName as id ,doc.title as value from XWikiDocument as doc , BaseObject as obj , com.xpn.xwiki.objects.StringProperty as obj_extensionPointId1 , com.xpn.xwiki.objects.StringProperty as obj_scope2 , com.xpn.xwiki.objects.StringProperty as obj_name3 where ( lower ( obj_extensionPointId1.value ) like '%cdlsworld.standardized.questionaires%' and ( 'wiki' = obj_scope2.value ) ) and doc.fullName=obj.name and obj.className='XWiki.UIExtensionClass' and obj_extensionPointId1.id.id=obj.id and obj_extensionPointId1.id.name='extensionPointId' and obj_scope2.id.id=obj.id and obj_scope2.id.name='scope' and obj_name3.id.id=obj.id and obj_name3.id.name='name' order by obj_name3.value >> The second issue that I hoped to be able to use for the option to add the >> translated value >> $services.localization.get('$value') >> Eduard replied: == > What is $value? The document name returned by the above query? The value is now replaced by doc.title. The documents returned have a title in the following format: $services.localization.render('cdlsworld.standardized.questionaires.cdlsqweApplication') The issue is that in the form I do get the as doc.title the velocity script: $services.localization.render('cdlsworld.standardized.questionaires.cdlsqweApplication') in the doc itself this title is evaluated as: "Social and Physical abilities" and I had hoped this would be the displayed item in the select list >Thanks, >Eduard >> ___ >> 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
[xwiki-users] Class with DB List multiselect
I would like to create a form for a international audience (multi language) So I created a AppWithinMinutes app. I would like that my users can Multiselect from a list that is a selection of objects based on a class. So i created a class (with AppWithinMinutes: Class properties Short Text (shortText1: String) Long Text (longText1: TextArea) Long Text (longText2: TextArea) Database List (databaseList1: Database List) The databaseList1 has the following properties: DisplayType: checkbox Multiple Select: true XWiki Class Name: XWiki.UIExtensionClass Id Field Name: name () Value Field Name: name The first issue I get that I get all objects of the class. I hoped to add a selection by adding this query: from doc.object(XWiki.UIExtensionClass) as obj where lower(obj.extensionPointId) like '%cdlsworld.standardized.questionaires%' and ('wiki' = obj.scope) order by obj.name But how can I add this? The second issue that I hoped to be able to use for the option to add the translated value $services.localization.get('$value') ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] avatar en user-profile macro in .myxwiki.org
Hi, It looks like that we can not use the macro AVATAR in a wiki on this farm? {{useravatar username="" /}} Then I added the extension: {{userprofile username="XWiki.Admin" /}} But both give error: unknown user? Gerritjan ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] [myxwiki] new wiki request
I would like to use a temporary XWiki to prepare and announce a project for families around rare deceases. We (CdLSWorld) would be only one of minimal 7 participants of this project. Therefore i need a wiki without the cdlsworld.org logo and which does not require registration (Public Wiki) The owner will be me: GerritjanKoekkoek name of wiki: WaihonaPedia Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] SOLR and object search
On Mon, Nov 24, 2014 at 9:46 AM, Gerritjan Koekkoek wrote: Hi, I'm trying to understand the new SOLR search (i did not understand the old Lucene very well) My use-case is the following. We have a special FAQ application where the object has, amongst others, the following attributes: - Subject - Topic-group - Language - Question - Answer he default search returns page-title/name, but this is in our case a non-informational, generated by the system code. So instead of Page name we would like to show: Subject You have 3 options: (1) Use Velocity to output the value of the subject property in the FAQ title. See https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-blog/xwiki-platform-blog-ui/src/main/resources/Blog/BlogPostSheet.xml#L36 Gerritjan: Thanks this is helpful but see below (2) I doesn't make sense to have a separate String property to store the subject when you can store it in the document title. The designer of our FAQ has opted to store multiple objects of same class in one page. (because XWiki does not support "multiple locales (language-country)" on a object level. So the title must pick the subject name of the object of the current language-country combination. When we just display the subject we do not need to solve this challenge. (3) Customize the entire search page just to change the way the search results are displayed Yes I fear there is no way around this? As facets we would like to show Topic-group and Language, Default (on entering the page with search box) we would like to set the context-language as a search filter... So when reader is reading french the result only shows french FAQ (with a french subject title) if english only english. By checking and unchecking languages in the facets the user could extend or reduce the search. This is already the case with the default search. The context language is checked by default in the locale facet. See https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-ui/src/main/resources/Main/SolrSearchConfig.xml#L74 . It looks the context language is only looking at language attribute of page. We need to compare with attribute in object. I think it would be useful if some explanation is how the object-based facets can be defined. A challenge is the topic field, this is a list with translation key. So if user is french-language the list will show french topics, but if he/she check english as well in facets things get complicated. We have a business-rule that the english collection of FAQ's is the baseline, and most comprehensive. The other languages are only translations of the same. So another languages can not have a question not translated. So my question is: How to define the search http://extensions.xwiki.org/xwiki/bin/view/Extension/Solr+Search+Application#HForDevelopers http://design.xwiki.org/xwiki/bin/view/Design/SolrSchema http://extensions.xwiki.org/xwiki/bin/view/Extension/Solr+Search+Query+API http://lucene.apache.org/solr/ How to modify the output so page-title is no longer showing How to modify facets so only the two fields can be set See https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-faq/xwiki-platform-faq-ui/src/main/resources/FAQCode/FAQSearch.xml#L49 .This helps... Hope this helps, Marius ___ 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
[xwiki-users] SOLR and object search
Hi, I'm trying to understand the new SOLR search (i did not understand the old Lucene very well) My use-case is the following. We have a special FAQ application where the object has, amongst others, the following attributes: - Subject - Topic-group - Language - Question - Answer he default search returns page-title/name, but this is in our case a non-informational, generated by the system code. So instead of Page name we would like to show: Subject As facets we would like to show Topic-group and Language, Default (on entering the page with search box) we would like to set the context-language as a search filter... So when reader is reading french the result only shows french FAQ (with a french subject title) if english only english. By checking and unchecking languages in the facets the user could extend or reduce the search. A challenge is the topic field, this is a list with translation key. So if user is french-language the list will show french topics, but if he/she check english as well in facets things get complicated. We have a business-rule that the english collection of FAQ's is the baseline, and most comprehensive. The other languages are only translations of the same. So another languages can not have a question not translated. So my question is: How to define the search How to modify the output so page-title is no longer showing How to modify facets so only the two fields can be set ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] LESS & CSS in flamingo based site...
Hi, Thanks for clarification. Our site used multiple color themes, basically because we are a federation of organizations. We changed colorThemeInit.vm to do this. basicly it works, but when in a stylesheetextension: #template('colorThemeInit.vm') #disclaimer h3 {background-color: $theme.menuBackgroundColor;} We always get the color of the default site color theme and not the color theme that is loaded on the page? Any solution? Yes the LESS compiler is running on the server, except for the preview box of the Flamingo Theme Application. You should be able to put any valid LESS code in the "advanced" section of that application. For example, if you want to set a bootstrap variable that the application does not handle, you could add: @modal-content-bg: red; But you can also add new CSS classes, like: .myClass{ background-color: red; } and this class can use LESS functions and bootstrap mixins: .myClass{ background-color: darken(red, 10%); // LESS function .make-xs-column(12); // Bootstrap mixin } And the class will be added to the default style.css. I am updating http://extensions.xwiki.org/xwiki/bin/view/Extension/Flamingo+Theme+Application I hope this helps, 2014-10-27 16:01 GMT+01:00 Gerritjan Koekkoek : > Does the Less to CSS preprocessor in the Flamingo themes app run on the > server? > What documentation is available (or examples of what kind of Less code can > be entered in the Advanced Less box? > ___ > users mailing list > users@xwiki.org > http://lists.xwiki.org/mailman/listinfo/users > -- Guillaume Delhumeau (gdelhum...@xwiki.com) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Flaming Less to CSS processor
Does the Less to CSS preprocessor in the Flamingo themes app run on the server? What documentation is available (or examples of what kind of Less code can be entered in the Advanced Less box? ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Simple and Advanced user
Hi, We would like to create a Menu or Button within our skin that allows people to simply with between 'simple' and 'advanced'. Now our users have to navigate to profile-preferences, click on Edit and choose the drop down with two options. What would be the best way to do this? Gerritjan ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] d3js requires TopoJSON
To draw maps based on XWiki content d3js in combination with TopoJSON seems a good combination. But as d3js can be used by installing the extension d3js in xwiki there is no such extension for TopoJSON? What would be required to create a extension that works together with the frameworks in xwiki, or add the TopoJSON to the d3js extension? ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Custom display
Hello, I’ve made it… I’ve defined a class by AppWithinMinutes with a numeric property (of type INTEGER) In Custom Display field: {{include document="tryControls.rangeValueSheet" /}} {{velocity}} #set($range= [5,4,3,2,1]) #displayRange($range) {{/velocity}} Important to make sure once the xForm is saved is to use the right naming conventions for the radio button's In the sheet that is included the following code: {velocity}} #set($discard = $xwiki.ssx.use("tryControls.rangeValueSheet")) #macro(displayRange $range) {{html clean=false}} #if($value) #set($field = $object.getxWikiClass().get($name)) #set($controlName = $prefix + $name) #foreach($rangeValue in $range) #set( $countString = $rangeValue - 1 ) #set($controlID= "xwiki-form-" + $name + "-0-" + $countString) #if($type == 'edit') ## In EDIT mode the user selection can be changed #if($value == $rangeValue) #else #end #else ## In VIEW mode the user selection can not be changed ## set control disabled #if($value == $rangeValue) #else #end #end $rangeValue #end #else No Value known, macro not used in context of a class value #end {{/html}} #end {{/velocity}} Please review my naming… Op 26 jun. 2014, om 10:44 heeft Gerritjan Koekkoek het volgende geschreven: > Hi, > Thanks a lot Marius, i’ve made a lot of progress… > I now have a ‘Star rating’ based on a numeric field, type integer, min-value > 1 max value of 5 > In the custom display I have the following code: > {{velocity}} > #set($discard = $xwiki.ssx.use("tryControls.rangeValueSheet")) > {{html clean=false}} > >Score > > #if($type == 'edit') >#set($discard = $xwiki.jsfx.use("tryControls.rangeValueSheet")) >#if($value == 5) > checked="checked" /> >#else > >#end > 5 >#if($value == 4) > checked="checked" /> >#else > >#end > 4 >#if($value == 3) > checked="checked"/> >#else > >#end > 3 > #if($value == 2) > checked="checked"/> >#else > >#end > 2 >#if($value == 1) > checked="checked"/> >#else > >#end > 1 > #else >#if($value == 5) > checked="checked" /> >#else > >#end > 5 >#if($value == 4) > checked="checked" /> >#else > >#end > 4 >#if($value == 3) > checked="checked"/> >#else > >#end > 3 >#if($value == 2) > checked="checked"/> >#else > >#end > 2 >#if($value == 1) > checked="checked"/> >#else > >#end > 1 > #end > > > {{/html}} > {{/velocity}} > > I feel the code can be ‘shortened’ significantly? Suggestions on how? > > As you could see numeric value is displayed by radio button’s So if $value = > 3 the third button is Checked. > > To make it look like a star rating I added a CSS extension sheet: (from > http://lea.verou.me/2011/08/accessible-star-rating-widget-with-pure-css/) > .rating { >float:left; > } > > /* :not(:checked) is a filter, so that browsers that don’t support :checked > don’t > follow these rules. Every browser that supports :checked also supports > :not(), so > it doesn’t make the test unnecessarily selective */ > .rating:not(:checked) > input { >position:absolute; >top:-px; >clip:rect(0,0,0,0); > } > > .rating:not(:checked) > label { >float:right; >width:1em; >padding:0 .1em; >overflow:hidden; >white-space:nowrap; >cursor:pointer; >font-size:200%; >line-height:1.2; >color:#ddd; >text-shadow:1px 1px #bbb, 2px 2px #666, .1em .1em .2em rgba(0,0,0,.5); > } > > .rating:not(:checked) > label:before { >content: '★ '; > } > > .rating > input:checked ~ label { >color: #f70; >text-shadow:1px 1px #c60, 2px 2px #940, .1em .1em .2em rgba(0,0,0,.5); > } > > .rating:not(:checked) > label:hover, > .rating:not(:checked) > label:hover ~ label { >color: gold; >text-shadow:1px 1px goldenrod, 2px 2px #B57340, .1em .1em .2em > rgba(0,0,0,.5); > } > > .rating > input:checked + label:hover, > .rating > input:checked + label:hover ~ label, > .rating > input:checked ~ label:hover, > .rating > input:checked ~ label:hover ~ label, > .rating
Re: [xwiki-users] Custom display
Hi, Thanks a lot Marius, i’ve made a lot of progress… I now have a ‘Star rating’ based on a numeric field, type integer, min-value 1 max value of 5 In the custom display I have the following code: {{velocity}} #set($discard = $xwiki.ssx.use("tryControls.rangeValueSheet")) {{html clean=false}} Score #if($type == 'edit') #set($discard = $xwiki.jsfx.use("tryControls.rangeValueSheet")) #if($value == 5) #else #end 5 #if($value == 4) #else #end 4 #if($value == 3) #else #end 3 #if($value == 2) #else #end 2 #if($value == 1) #else #end 1 #else #if($value == 5) #else #end 5 #if($value == 4) #else #end 4 #if($value == 3) #else #end 3 #if($value == 2) #else #end 2 #if($value == 1) #else #end 1 #end {{/html}} {{/velocity}} I feel the code can be ‘shortened’ significantly? Suggestions on how? As you could see numeric value is displayed by radio button’s So if $value = 3 the third button is Checked. To make it look like a star rating I added a CSS extension sheet: (from http://lea.verou.me/2011/08/accessible-star-rating-widget-with-pure-css/) .rating { float:left; } /* :not(:checked) is a filter, so that browsers that don’t support :checked don’t follow these rules. Every browser that supports :checked also supports :not(), so it doesn’t make the test unnecessarily selective */ .rating:not(:checked) > input { position:absolute; top:-px; clip:rect(0,0,0,0); } .rating:not(:checked) > label { float:right; width:1em; padding:0 .1em; overflow:hidden; white-space:nowrap; cursor:pointer; font-size:200%; line-height:1.2; color:#ddd; text-shadow:1px 1px #bbb, 2px 2px #666, .1em .1em .2em rgba(0,0,0,.5); } .rating:not(:checked) > label:before { content: '★ '; } .rating > input:checked ~ label { color: #f70; text-shadow:1px 1px #c60, 2px 2px #940, .1em .1em .2em rgba(0,0,0,.5); } .rating:not(:checked) > label:hover, .rating:not(:checked) > label:hover ~ label { color: gold; text-shadow:1px 1px goldenrod, 2px 2px #B57340, .1em .1em .2em rgba(0,0,0,.5); } .rating > input:checked + label:hover, .rating > input:checked + label:hover ~ label, .rating > input:checked ~ label:hover, .rating > input:checked ~ label:hover ~ label, .rating > label:hover ~ input:checked ~ label { color: #ea0; text-shadow:1px 1px goldenrod, 2px 2px #B57340, .1em .1em .2em rgba(0,0,0,.5); } .rating > label:active { position:relative; top:2px; left:2px; } But my remaining problem is to SAVE the selected number? I have a record with a value of 4, so a 4-star rating is selected and displayed perfectly. If I select INLINE EDIT i’m able to SELECT 2 STARS (or any other), but as soon as I SAVE the 4 star rating is still there. How is this best done? Op 19 jun. 2014, om 09:24 heeft Marius Dumitru Florea het volgende geschreven: > On Tue, Jun 17, 2014 at 2:00 PM, Gerritjan Koekkoek > wrote: >> Hi >> Op 17 jun. 2014, om 07:59 heeft Marius Dumitru Florea >> het volgende geschreven: >> >>> On Mon, Jun 16, 2014 at 4:53 PM, Gerritjan Koekkoek >>> wrote: >>>> Hi, >>>> Yes, this surely helps but i fail to get it work as I hope it can. >>>> I have generated a app with App Within Minutes. >>>> >>>> In the sheet there is a construct like this: >>>> {{velocity}} >>>> {{html wiki="true"}} >>>> #set ($discard = $doc.use('TestStarRating.TestStarRatingClass')) >>>> #set ($discard = $services.localization.use('document', >>>> 'TestStarRating.TestStarRatingTranslations')) >>>> (% class="xform" %) >>>> ((( >>>> ; >>> for="TestStarRating.TestStarRatingClass_0_Rating">$escapetool.xml($doc.displayPrettyName('Rating', >>>> false, false)) >>>> : $doc.display('Rating') >>>> ))) >>>> {{/html}} >>>> {{/velocity}} >>>> >>>> :$doc.display(‘Rating’) is ‘smart’ as it knows when in ‘View’ and ‘Edit’ >>>> mode. >>>> >>>> If I would go to the class and modify Custom Display >>> >>>> How can I keep the ‘smartness’ of $doc.display? >>> >>> Have you really looked at the code of the existing custom displayers >>> found on extensions.xwiki.org ? i.e. did you download the source XAR >>> and imported it in your wiki to check the code? It doesn't seem so, >>
Re: [xwiki-users] Custom display
Hi Op 17 jun. 2014, om 07:59 heeft Marius Dumitru Florea het volgende geschreven: > On Mon, Jun 16, 2014 at 4:53 PM, Gerritjan Koekkoek > wrote: >> Hi, >> Yes, this surely helps but i fail to get it work as I hope it can. >> I have generated a app with App Within Minutes. >> >> In the sheet there is a construct like this: >> {{velocity}} >> {{html wiki="true"}} >> #set ($discard = $doc.use('TestStarRating.TestStarRatingClass')) >> #set ($discard = $services.localization.use('document', >> 'TestStarRating.TestStarRatingTranslations')) >> (% class="xform" %) >> ((( >> ; > for="TestStarRating.TestStarRatingClass_0_Rating">$escapetool.xml($doc.displayPrettyName('Rating', >> false, false)) >> : $doc.display('Rating') >> ))) >> {{/html}} >> {{/velocity}} >> >> :$doc.display(‘Rating’) is ‘smart’ as it knows when in ‘View’ and ‘Edit’ >> mode. >> >> If I would go to the class and modify Custom Display > >> How can I keep the ‘smartness’ of $doc.display? > > Have you really looked at the code of the existing custom displayers > found on extensions.xwiki.org ? i.e. did you download the source XAR > and imported it in your wiki to check the code? It doesn't seem so, > because you would have seen something like: > > #if ($type == 'edit’) Yes, have looked at it and this is what puzzles me… In the generated sheet code from app-within minutes there is no notion of this… I think basically my question is: If I keep $doc.display(‘rating’) in the sheet And build a IF then else for different behavior in View and Edit mode…will this work? Or do I need to replace in the sheet $doc.display(‘rating’) with something else. In the sheet I know I can get the ‘old’ value (if any) and display it since I have the context of $doc In the Class i’m not knowing to what context variable I should refer to present the old value? Does my question/struggle make sense? >> >> I have the feeling that a velocity script in the custom display does not >> have notion of $doc? Or can I use this context variable? >> >> The important change I want to achieve is change the ‘radio button’ >> behavior’ in a star-rating behavior. >> Important is that this should stay visible in Read-mode as the numeric >> result 3 is less informative as seeing three stars. >> >> I’m inspired by this code: >> http://codepen.io/lsirivong/pen/ekBxI >> >> It uses CSS to style radiobuttons as star rating (and a small javascript) >> But it requires radiobuttons to stay visible in view mode… >> >> >> Op 10 jun. 2014, om 14:33 heeft Marius Dumitru Florea >> het volgende geschreven: >> >>> I don't think there is a documentation unfortunately, but there are 3 >>> examples on >>> http://extensions.xwiki.org/xwiki/bin/view/Main/WebHome#|t=extensions&p=1&l=30&s=doc.creationDate&d=desc&name=custom+display >>> . >>> >>> Hope this helps, >>> Marius >>> >>> On Thu, Jun 5, 2014 at 11:06 AM, Gerritjan Koekkoek >>> wrote: >>>> Hi >>>> >>>> We are trying to develop questionnaires within xwiki. >>>> In order to get clear answers from people we prefer static lists above text >>>> fields which would be more difficult to analyze. >>>> >>>> As a approach we start with appWithinMinutes and add attributes of type >>>> static list >>>> >>>> Use case 1: >>>> When we want the user to select one of a limited set of options we typical >>>> use radio button as input control. >>>> >>>> In edit mode this works fine. >>>> But in collaborative mode this does not work very well for us. >>>> What we mean by collaborative mode? >>>> We have patients discussing the questionnaire with the expert. >>>> Over the internet they both look at the page which holds the questionnaire >>>> already completed by the patient... >>>> But since default XWiki is showing only the value selected discussions >>>> about why the patient chose the one option above the other are too >>>> difficult. >>>> We would like the radiobuttons view in edit mode, but disabled for >>>> modification; especially since in view mode changing the elected option... >>>> >>>> Would it be possible to modify the class and add something in the "Custom >>>> Display"? >>>> Is there a useful