Re: [xwiki-users] Encoding bug in Document Tree Macro ?

2016-02-05 Thread Clemens Klein-Robbenhaar


On 02/05/2016 03:35 PM, Bruno wrote:
> 
> Hello,
> 
> I work in a French engineering school.
> I would like to install xwiki 7.4 for my team.
> 
> I encounter a problem whith accents :
> When I create a page whose title contains accents (or French special 
> characters), childs documents are not displayed in the *Document Tree macro*.
> However, it appears in the wiki Page Index, but not in the tree.
> 
> I followed unsuccessfully the documentation for administrators 'XWiki 
> Character Encoding Settings'.
> 
> Is there something I did wrong ? Is it a bug ?
> 

I cannot reproduce this behaviour. At first sight it looks to me like a problem 
with your setup.

Can you try to see if the page still shows up in the page index if you filter 
the page names with then accented character actually used in the page name (in 
the "Location" column)
If they vanish there, too, it is probably something with your setup.
In that case: what kind of servlet container did you use? If an apache / nginx 
etc running in front of it?
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Diff Module

2016-02-05 Thread Thomas Mortagne
DiffConfiguration does not have any impact on the default
implementation of DiffManager yet (it was introduced in case another
implementation allow some customisation).

On Fri, Feb 5, 2016 at 3:31 PM, Peter Huisman  wrote:
> Hi,
>
> On this page 
> (http://extensions.xwiki.org/xwiki/bin/view/Extension/Diff+Module) you 
> describe a Diff module for comparing items. Is there any description for the 
> DiffConfiguration which is required when called from Java?
>
> With kind regards,
>
> Peter
> ___
> 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] Translation problems

2016-02-05 Thread Mark Sack
What is the easiest/standar process for incorporating new translation
resource files from the translation site before the next release of the core
or an extension? So far I've been downloading the source for the extension,
adding in or replacing the translation resource file downloaded from the
translation site, rebuilding the extension and importing the xar file. For
the core resources, I replaced the resources file in the jar.



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Translation-problems-tp7597763p7597804.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] UIExtension Access document holding the UIExtension object

2016-02-05 Thread Gerritjan Koekkoek
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


Re: [xwiki-users] UIExtension Access document holding the UIExtension object

2016-02-05 Thread vinc...@massol.net



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’)

-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 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


Re: [xwiki-users] UIExtension Access document holding the UIExtension object

2016-02-05 Thread Gerritjan Koekkoek


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 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

Re: [xwiki-users] UIExtension Access document holding the UIExtension object

2016-02-05 Thread Gerritjan Koekkoek
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 = 
> > > $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();
> >
> > 

Re: [xwiki-users] UIExtension Access document holding the UIExtension object

2016-02-05 Thread vinc...@massol.net
 




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

-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 = 
> > > $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 = 

Re: [xwiki-users] UIExtension Access document holding the UIExtension object

2016-02-05 Thread Gerritjan Koekkoek


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] Syntax Highlighting extension

2016-02-05 Thread Sonic
I don't remember exactly how i did install the extension.
My wiki is XWiki Enterprise 7.1.4 and the extension version was 3.1

Now I deleted the extension in Extension Manager, but it was like nothing
happened. Just disappeared in Extension Manages' installed section.
I now installed 3.3 version(using import and .xar file) and it's not working
anyway. I must don't understand how xwiki works.

Type this in source code mode:
{{highlight language="php" style="monokai"}}
 Hello World'; ?> 
{{/highlight}}
or use macro -> Highlight(highlight.JS integration)

Check the page as user without "Administrator" and "Programming" rights.



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Syntax-Highlighting-extension-problem-tp7597773p7597792.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Translation problems

2016-02-05 Thread Mark Sack
The workaround you suggested didn't have any effect. To analyse the problem a
bit further (and verify that I was creating the translation page correctly),
I inserted a spelling error in the Translations page. The spelling error was
displayed as expected if I deployed the app to a path other than ROOT. But
in ROOT that translation page is still not used. Maybe this one is a
candidate for Ripley's Believe It or Not.

I did all of the new translations via the 
http://l10n.xwiki.org/xwiki/bin/view/L10N/
   site (logging in there and
making the edits on the forms). Then I downloaded the Application Resource
file. Do I still need to do a github pull request or send you the files?

I corrected one spelling error in the core resources before the 7.4 release
and noticed that the correction was automatically included in 7.4. I guess
the core is built using a different process than the extensions.

Regards
Mark



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Translation-problems-tp7597763p7597793.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] UIExtension Access document holding the UIExtension object

2016-02-05 Thread vinc...@massol.net
 




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
-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 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


[xwiki-users] Diff Module

2016-02-05 Thread Peter Huisman
Hi,

On this page (http://extensions.xwiki.org/xwiki/bin/view/Extension/Diff+Module) 
you describe a Diff module for comparing items. Is there any description for 
the DiffConfiguration which is required when called from Java?

With kind regards,

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


Re: [xwiki-users] Translation problems

2016-02-05 Thread Clemens Klein-Robbenhaar

> The workaround you suggested didn't have any effect. To analyse the problem a
> bit further (and verify that I was creating the translation page correctly),
> I inserted a spelling error in the Translations page. The spelling error was
> displayed as expected if I deployed the app to a path other than ROOT. But
> in ROOT that translation page is still not used. Maybe this one is a
> candidate for Ripley's Believe It or Not.
> 

This is really odd. Next time I need to exercise my admin skills I hope I am 
able to reproduce it with exactly your setup.
Just deploying as root-webapp is not enough (at least for me).

A tentative explanation is that the translated part (the "por página de") is 
directly rendered in the HTML of the wiki page,
while the untranslated parts ("Results ... out of ..." ) are inserted via 
JavaScript.

This means that:
  a) either the javascript code was not fetched with the right language (it 
should have a "?language=pt_BR" appended to it)
  b) it has been fetched, but as an old version, maybe before the server has 
been configured to use pt_BR; i.e. it is a caching issue


> I did all of the new translations via the 
> http://l10n.xwiki.org/xwiki/bin/view/L10N/
>    site (logging in there and
> making the edits on the forms). Then I downloaded the Application Resource
> file. Do I still need to do a github pull request or send you the files?
> 

No, that is the right place to add the translations, actually. I forgot to 
check they are already there,
and would have to upload them manually if you'd send a pull request. So you 
manage to do it the right way despite of my misleading advice ;)

The new translations should be updated with the next release of these 
extensions.
Thanks a lot for the contribution!

> I corrected one spelling error in the core resources before the 7.4 release
> and noticed that the correction was automatically included in 7.4. I guess
> the core is built using a different process than the extensions.

Yes, for the XWiki platform core syncing the translations from l10n into the 
code base on github
is part of the release process. (As via 
http://dev.xwiki.org/xwiki/bin/view/ReleasePlans/ReleasePlanHelp#HUpdateTranslations)
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Encoding bug in Document Tree Macro ?

2016-02-05 Thread Bruno


Hello,

I work in a French engineering school.
I would like to install xwiki 7.4 for my team.

I encounter a problem whith accents :
When I create a page whose title contains accents (or French special 
characters), childs documents are not displayed in the *Document Tree 
macro*.

However, it appears in the wiki Page Index, but not in the tree.

I followed unsuccessfully the documentation for administrators 'XWiki 
Character Encoding Settings'.


Is there something I did wrong ? Is it a bug ?

Thanks for your help,
Signature mails
_

Bruno Joffredo

Ecole Centrale de Nantes

Centre de Ressources Informatiques - Bur. D019

1 rue de la Noë

BP 92101

F-44321 Nantes cedex 3
_


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