Re: [xwiki-users] Get parts of a page...

2015-06-11 Thread Gerritjan Koekkoek
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 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 diffic

Re: [xwiki-users] Get parts of a page...

2015-06-11 Thread Thomas Mortagne
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 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 co

Re: [xwiki-users] Clustering of Xwiki

2015-06-11 Thread Thomas Mortagne
There is no system like this by default. You could probably empty all
the caches in some script every minutes but note that doing something
like this would cause big performances issues especially on document
loading. Emptying a cache every minutes is not very different from not
having cache at all.

On Thu, Jun 11, 2015 at 4:00 PM, Enste, Patrick  wrote:
> Great! Thanks :-)
>
> But I have another question:
> Is it possible to set this observation.remote.enabled to false and say that 
> every instance should update its cache.every minute? So that the 
> instances do not have to talk to each other, but have the same data after at 
> most 1 minute?
>
> Kind regards,
> Patrick
>
> -Original Message-
> From: users [mailto:users-boun...@xwiki.org] On Behalf Of Thomas Mortagne
> Sent: Thursday, June 11, 2015 3:55 PM
> To: XWiki Users
> Subject: Re: [xwiki-users] Clustering of Xwiki
>
> Exacly. Note that modification on document is only one kind of events that is 
> shared, by default you also have extension related events (so that all 
> instance install extensions installe or one of them) and any component can 
> introduce new remote events.
>
> On Thu, Jun 11, 2015 at 2:27 PM, Enste, Patrick  
> wrote:
>> So Jgroups does not send any files or changes to the other cluster members, 
>> but only a message that some files  or pages have been edited? So the files 
>> or pages get invalidated in the cache and the cluster members will update 
>> them by their own?
>>
>> Kind regards,
>> Patrick
>>
>>
>> -Original Message-
>> From: users [mailto:users-boun...@xwiki.org] On Behalf Of Thomas
>> Mortagne
>> Sent: Thursday, June 11, 2015 2:03 PM
>> To: XWiki Users
>> Subject: Re: [xwiki-users] Clustering of Xwiki
>>
>> On Thu, Jun 11, 2015 at 1:02 PM, Enste, Patrick  
>> wrote:
>>> Hey everybody,
>>>
>>> I found some information on clustering for Xwiki where I have to set the 
>>> observation.remote.enabled to true.
>>
>>> Per my understanding the cache would be synchronized between every instance 
>>> (via Jgroups).
>>
>> Not exactly, it's not so much about synchronizing cache. As the property 
>> suggest what happen is that some events like modified documents go trough 
>> the cluster using JGroups and they are injected in the local event manager 
>> of other members to let all listeners know a document has been modified and 
>> do whatever they want about it (invalidate some entry from a cache because 
>> it depend on the modified document, update some local solr/lucene index, 
>> etc.).
>>
>>>
>>> Now we want to use the following architecture:
>>>
>>> We have 2 datacenters. In each datacenter are 2 servers with a Xwiki 
>>> instance running (so 4 instances in 2 datacenters). As database we want to 
>>> use Oracle RAC.
>>>
>>> Is it possible to run these 4 instances on the Oracle RAC? Is it possible 
>>> to invalidate the cache of another instance if one instance has some write 
>>> action or something (so it generates a new cache on its own)?
>>
>> I don't really know Oracle RAC but if what you mean is that you have two 
>> groups of instance and each group have a different database as lon have you 
>> have some mecanisme that make sure those database are synchronized it should 
>> be ok too. You put everyone in the same cluster and documents related caches 
>> will be invalidated everywhere when you modifiy a document for example.
>>
>>>
>>> We would have 1 loadbalancer to manage the load between the two datacenters 
>>> and 1 loadbalancer in every datacenter to manage the load between the 2 
>>> instances. Every instance should show the same content...
>>>
>>>
>>> Kind regards,
>>> Patrick
>>>
>>>
>>> ___
>>> 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



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


Re: [xwiki-users] Get parts of a page...

2015-06-11 Thread Gerritjan Koekkoek
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 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
>
>
>
>
> 

Re: [xwiki-users] Clustering of Xwiki

2015-06-11 Thread Enste, Patrick
Great! Thanks :-)

But I have another question:
Is it possible to set this observation.remote.enabled to false and say that 
every instance should update its cache.every minute? So that the instances 
do not have to talk to each other, but have the same data after at most 1 
minute?

Kind regards,
Patrick

-Original Message-
From: users [mailto:users-boun...@xwiki.org] On Behalf Of Thomas Mortagne
Sent: Thursday, June 11, 2015 3:55 PM
To: XWiki Users
Subject: Re: [xwiki-users] Clustering of Xwiki

Exacly. Note that modification on document is only one kind of events that is 
shared, by default you also have extension related events (so that all instance 
install extensions installe or one of them) and any component can introduce new 
remote events.

On Thu, Jun 11, 2015 at 2:27 PM, Enste, Patrick  wrote:
> So Jgroups does not send any files or changes to the other cluster members, 
> but only a message that some files  or pages have been edited? So the files 
> or pages get invalidated in the cache and the cluster members will update 
> them by their own?
>
> Kind regards,
> Patrick
>
>
> -Original Message-
> From: users [mailto:users-boun...@xwiki.org] On Behalf Of Thomas 
> Mortagne
> Sent: Thursday, June 11, 2015 2:03 PM
> To: XWiki Users
> Subject: Re: [xwiki-users] Clustering of Xwiki
>
> On Thu, Jun 11, 2015 at 1:02 PM, Enste, Patrick  
> wrote:
>> Hey everybody,
>>
>> I found some information on clustering for Xwiki where I have to set the 
>> observation.remote.enabled to true.
>
>> Per my understanding the cache would be synchronized between every instance 
>> (via Jgroups).
>
> Not exactly, it's not so much about synchronizing cache. As the property 
> suggest what happen is that some events like modified documents go trough the 
> cluster using JGroups and they are injected in the local event manager of 
> other members to let all listeners know a document has been modified and do 
> whatever they want about it (invalidate some entry from a cache because it 
> depend on the modified document, update some local solr/lucene index, etc.).
>
>>
>> Now we want to use the following architecture:
>>
>> We have 2 datacenters. In each datacenter are 2 servers with a Xwiki 
>> instance running (so 4 instances in 2 datacenters). As database we want to 
>> use Oracle RAC.
>>
>> Is it possible to run these 4 instances on the Oracle RAC? Is it possible to 
>> invalidate the cache of another instance if one instance has some write 
>> action or something (so it generates a new cache on its own)?
>
> I don't really know Oracle RAC but if what you mean is that you have two 
> groups of instance and each group have a different database as lon have you 
> have some mecanisme that make sure those database are synchronized it should 
> be ok too. You put everyone in the same cluster and documents related caches 
> will be invalidated everywhere when you modifiy a document for example.
>
>>
>> We would have 1 loadbalancer to manage the load between the two datacenters 
>> and 1 loadbalancer in every datacenter to manage the load between the 2 
>> instances. Every instance should show the same content...
>>
>>
>> Kind regards,
>> Patrick
>>
>>
>> ___
>> 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] Clustering of Xwiki

2015-06-11 Thread Thomas Mortagne
Exacly. Note that modification on document is only one kind of events
that is shared, by default you also have extension related events (so
that all instance install extensions installe or one of them) and any
component can introduce new remote events.

On Thu, Jun 11, 2015 at 2:27 PM, Enste, Patrick  wrote:
> So Jgroups does not send any files or changes to the other cluster members, 
> but only a message that some files  or pages have been edited? So the files 
> or pages get invalidated in the cache and the cluster members will update 
> them by their own?
>
> Kind regards,
> Patrick
>
>
> -Original Message-
> From: users [mailto:users-boun...@xwiki.org] On Behalf Of Thomas Mortagne
> Sent: Thursday, June 11, 2015 2:03 PM
> To: XWiki Users
> Subject: Re: [xwiki-users] Clustering of Xwiki
>
> On Thu, Jun 11, 2015 at 1:02 PM, Enste, Patrick  
> wrote:
>> Hey everybody,
>>
>> I found some information on clustering for Xwiki where I have to set the 
>> observation.remote.enabled to true.
>
>> Per my understanding the cache would be synchronized between every instance 
>> (via Jgroups).
>
> Not exactly, it's not so much about synchronizing cache. As the property 
> suggest what happen is that some events like modified documents go trough the 
> cluster using JGroups and they are injected in the local event manager of 
> other members to let all listeners know a document has been modified and do 
> whatever they want about it (invalidate some entry from a cache because it 
> depend on the modified document, update some local solr/lucene index, etc.).
>
>>
>> Now we want to use the following architecture:
>>
>> We have 2 datacenters. In each datacenter are 2 servers with a Xwiki 
>> instance running (so 4 instances in 2 datacenters). As database we want to 
>> use Oracle RAC.
>>
>> Is it possible to run these 4 instances on the Oracle RAC? Is it possible to 
>> invalidate the cache of another instance if one instance has some write 
>> action or something (so it generates a new cache on its own)?
>
> I don't really know Oracle RAC but if what you mean is that you have two 
> groups of instance and each group have a different database as lon have you 
> have some mecanisme that make sure those database are synchronized it should 
> be ok too. You put everyone in the same cluster and documents related caches 
> will be invalidated everywhere when you modifiy a document for example.
>
>>
>> We would have 1 loadbalancer to manage the load between the two datacenters 
>> and 1 loadbalancer in every datacenter to manage the load between the 2 
>> instances. Every instance should show the same content...
>>
>>
>> Kind regards,
>> Patrick
>>
>>
>> ___
>> 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


Re: [xwiki-users] Clustering of Xwiki

2015-06-11 Thread Enste, Patrick
So Jgroups does not send any files or changes to the other cluster members, but 
only a message that some files  or pages have been edited? So the files or 
pages get invalidated in the cache and the cluster members will update them by 
their own?

Kind regards,
Patrick


-Original Message-
From: users [mailto:users-boun...@xwiki.org] On Behalf Of Thomas Mortagne
Sent: Thursday, June 11, 2015 2:03 PM
To: XWiki Users
Subject: Re: [xwiki-users] Clustering of Xwiki

On Thu, Jun 11, 2015 at 1:02 PM, Enste, Patrick  wrote:
> Hey everybody,
>
> I found some information on clustering for Xwiki where I have to set the 
> observation.remote.enabled to true.

> Per my understanding the cache would be synchronized between every instance 
> (via Jgroups).

Not exactly, it's not so much about synchronizing cache. As the property 
suggest what happen is that some events like modified documents go trough the 
cluster using JGroups and they are injected in the local event manager of other 
members to let all listeners know a document has been modified and do whatever 
they want about it (invalidate some entry from a cache because it depend on the 
modified document, update some local solr/lucene index, etc.).

>
> Now we want to use the following architecture:
>
> We have 2 datacenters. In each datacenter are 2 servers with a Xwiki instance 
> running (so 4 instances in 2 datacenters). As database we want to use Oracle 
> RAC.
>
> Is it possible to run these 4 instances on the Oracle RAC? Is it possible to 
> invalidate the cache of another instance if one instance has some write 
> action or something (so it generates a new cache on its own)?

I don't really know Oracle RAC but if what you mean is that you have two groups 
of instance and each group have a different database as lon have you have some 
mecanisme that make sure those database are synchronized it should be ok too. 
You put everyone in the same cluster and documents related caches will be 
invalidated everywhere when you modifiy a document for example.

>
> We would have 1 loadbalancer to manage the load between the two datacenters 
> and 1 loadbalancer in every datacenter to manage the load between the 2 
> instances. Every instance should show the same content...
>
>
> Kind regards,
> Patrick
>
>
> ___
> 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...

2015-06-11 Thread Gerritjan Koekkoek



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('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 t

Re: [xwiki-users] Clustering of Xwiki

2015-06-11 Thread Thomas Mortagne
On Thu, Jun 11, 2015 at 1:02 PM, Enste, Patrick  wrote:
> Hey everybody,
>
> I found some information on clustering for Xwiki where I have to set the 
> observation.remote.enabled to true.

> Per my understanding the cache would be synchronized between every instance 
> (via Jgroups).

Not exactly, it's not so much about synchronizing cache. As the
property suggest what happen is that some events like modified
documents go trough the cluster using JGroups and they are injected in
the local event manager of other members to let all listeners know a
document has been modified and do whatever they want about it
(invalidate some entry from a cache because it depend on the modified
document, update some local solr/lucene index, etc.).

>
> Now we want to use the following architecture:
>
> We have 2 datacenters. In each datacenter are 2 servers with a Xwiki instance 
> running (so 4 instances in 2 datacenters). As database we want to use Oracle 
> RAC.
>
> Is it possible to run these 4 instances on the Oracle RAC? Is it possible to 
> invalidate the cache of another instance if one instance has some write 
> action or something (so it generates a new cache on its own)?

I don't really know Oracle RAC but if what you mean is that you have
two groups of instance and each group have a different database as lon
have you have some mecanisme that make sure those database are
synchronized it should be ok too. You put everyone in the same cluster
and documents related caches will be invalidated everywhere when you
modifiy a document for example.

>
> We would have 1 loadbalancer to manage the load between the two datacenters 
> and 1 loadbalancer in every datacenter to manage the load between the 2 
> instances. Every instance should show the same content...
>
>
> Kind regards,
> Patrick
>
>
> ___
> 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


Re: [xwiki-users] Get parts of a page...

2015-06-11 Thread Thomas Mortagne
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 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 
> env

[xwiki-users] Clustering of Xwiki

2015-06-11 Thread Enste, Patrick
Hey everybody,

I found some information on clustering for Xwiki where I have to set the 
observation.remote.enabled to true. Per my understanding the cache would be 
synchronized between every instance (via Jgroups).

Now we want to use the following architecture:

We have 2 datacenters. In each datacenter are 2 servers with a Xwiki instance 
running (so 4 instances in 2 datacenters). As database we want to use Oracle 
RAC.

Is it possible to run these 4 instances on the Oracle RAC? Is it possible to 
invalidate the cache of another instance if one instance has some write action 
or something (so it generates a new cache on its own)?

We would have 1 loadbalancer to manage the load between the two datacenters and 
1 loadbalancer in every datacenter to manage the load between the 2 instances. 
Every instance should show the same content...


Kind regards,
Patrick


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


Re: [xwiki-users] Get parts of a page...

2015-06-11 Thread Gerritjan Koekkoek
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 avoid.

If the behavior follows a pattern (such as it is always at the same time, same 
place, or to a particular person) t