Re: [xwiki-users] Issue with Mocca Calendar finding fullcalendar.js

2015-06-04 Thread Jeremie BOUSQUET
@Thomas: also, issue you talk about is on 6.2 while I'm on xwiki 5.4.7 so
it could not be that.

In the end, I uninstalled the Mocca Calendar extension, then re-installed
it, and now ... it works perfectly :)
I checked, and the JS extensions (for fullcalendar and gcal js) were
completely missing from page Calendar.FullCalendar, before re-installation.
Probably something went wrong when I first installed it through EM, but I
didn't notice ...

Thanks,
Jeremie

2015-06-04 16:29 GMT+02:00 Thomas Mortagne :

> Forget that I tough it was fullcalendar that was requesting jquery that
> way.
>
> On Thu, Jun 4, 2015 at 4:26 PM, Thomas Mortagne
>  wrote:
> > Actually the issue you have is because of the change made in
> > http://jira.xwiki.org/browse/XWIKI-11094 which removed jquery from
> > /xwiki/resources/js/amd/jquery. This might actually be seen as an
> > important API breackage.
> >
> > On Thu, Jun 4, 2015 at 4:17 PM, Jeremie BOUSQUET
> >  wrote:
> >> 2015-06-04 11:34 GMT+02:00 Marius Dumitru Florea <
> >> mariusdumitru.flo...@xwiki.com>:
> >>
> >>> On Wed, Jun 3, 2015 at 1:05 PM, Jeremie BOUSQUET
> >>>  wrote:
> >>> > Hello dear xwiki-ers,
> >>> >
> >>> > (long time no see ;) )
> >>> >
> >>> > I installed the Mocca Calendar application [1] in my xwiki 5.4.7
> >>> instance,
> >>> > but when browsing to its home page, needed js file can't be loaded
> and so
> >>> > not much appears ...
> >>> >
> >>> > Error from FF console:
> >>> >
> >>> > GET http://r-wikiggs.gemalto.com/fullcalendar.js [HTTP/1.1 404 Not
> Found
> >>> > 9ms]
> >>> > Error: Script error for: fullcalendar
> >>> > http://requirejs.org/docs/errors.html#scripterror
> >>> >
> >>> > I understand that it probably comes from MoccaCalendar.Macro js
> >>> extension:
> >>> >
> >>> > require(['jquery', 'fullcalendar'], function(jQuery, fullCalendar) {
> >>> >
> >>> > ... but my knowledge of requireJS is more than poor so I'm not sure
> how
> >>> to
> >>> > fix this ... For sure URL used to reach fullcalendar.js is NOK.
> >>>
> >>> I'm not familiar with the Mocca Calendar application, but from the 404
> >>> URL you get in the Firefox console it seems you're missing the
> >>> Require.js configuration that specifies where the 'fullcalendar'
> >>> module is located. Require.js attempts to load the module from the
> >>> root of your webapp as a fallback and fails. See
> >>> http://requirejs.org/docs/api.html#config-paths .
> >>>
> >>
> >> Thanks Marius,
> >>
> >> I checked from page source and there is:
> >>
> >> require.config({
> >>   baseUrl: '/',
> >> paths: { 'jquery': "/xwiki/resources/js/amd/jquery" },
> >>   map: {
> >> '*': { 'jquery': 'jQueryNoConflict' },
> >> 'jQueryNoConflict': { 'jquery': 'jquery' }
> >>   }
> >> });
> >>
> >> I suppose this is a basic configuration of xwiki, I'm not sure where
> >> require conf can be altered ... (from velocity templates ?)
> >> Anyway, as I did not find fullcalendar.js, what I did is:
> >> - download fullcalendar-2.3.1.zip and unzip it to
> >> $TOMCAT_HOME/webapps/xwiki/resources/js/fullcalendar/
> >> - change js extension in MoccaCalendar.Macro with: "require(['jquery',
> >> '/xwiki/resources/js/fullcalendar/fullcalendar.js'], function(jQuery,
> >> fullCalendar) {"
> >>
> >> A calendar is now displayed (sometimes), but seems to be missing
> >> stylesheets completely, so it's not really usable ...
> >> I feel there must be something easier to do ;)
> >>
> >> BR,
> >> Jeremie
> >>
> >>
> >>> Hope this helps,
> >>> Marius
> >>>
> >>> >
> >>> > Thanks,
> >>> > BR,
> >>> > Jeremie
> >>> > ___
> >>> > 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
> >
> >
> >
> > --
> > Thomas Mortagne
>
>
>
> --
> 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] Issue with Mocca Calendar finding fullcalendar.js

2015-06-04 Thread Jeremie BOUSQUET
2015-06-04 11:34 GMT+02:00 Marius Dumitru Florea <
mariusdumitru.flo...@xwiki.com>:

> On Wed, Jun 3, 2015 at 1:05 PM, Jeremie BOUSQUET
>  wrote:
> > Hello dear xwiki-ers,
> >
> > (long time no see ;) )
> >
> > I installed the Mocca Calendar application [1] in my xwiki 5.4.7
> instance,
> > but when browsing to its home page, needed js file can't be loaded and so
> > not much appears ...
> >
> > Error from FF console:
> >
> > GET http://r-wikiggs.gemalto.com/fullcalendar.js [HTTP/1.1 404 Not Found
> > 9ms]
> > Error: Script error for: fullcalendar
> > http://requirejs.org/docs/errors.html#scripterror
> >
> > I understand that it probably comes from MoccaCalendar.Macro js
> extension:
> >
> > require(['jquery', 'fullcalendar'], function(jQuery, fullCalendar) {
> >
> > ... but my knowledge of requireJS is more than poor so I'm not sure how
> to
> > fix this ... For sure URL used to reach fullcalendar.js is NOK.
>
> I'm not familiar with the Mocca Calendar application, but from the 404
> URL you get in the Firefox console it seems you're missing the
> Require.js configuration that specifies where the 'fullcalendar'
> module is located. Require.js attempts to load the module from the
> root of your webapp as a fallback and fails. See
> http://requirejs.org/docs/api.html#config-paths .
>

Thanks Marius,

I checked from page source and there is:

require.config({
  baseUrl: '/',
paths: { 'jquery': "/xwiki/resources/js/amd/jquery" },
  map: {
'*': { 'jquery': 'jQueryNoConflict' },
'jQueryNoConflict': { 'jquery': 'jquery' }
  }
});

I suppose this is a basic configuration of xwiki, I'm not sure where
require conf can be altered ... (from velocity templates ?)
Anyway, as I did not find fullcalendar.js, what I did is:
- download fullcalendar-2.3.1.zip and unzip it to
$TOMCAT_HOME/webapps/xwiki/resources/js/fullcalendar/
- change js extension in MoccaCalendar.Macro with: "require(['jquery',
'/xwiki/resources/js/fullcalendar/fullcalendar.js'], function(jQuery,
fullCalendar) {"

A calendar is now displayed (sometimes), but seems to be missing
stylesheets completely, so it's not really usable ...
I feel there must be something easier to do ;)

BR,
Jeremie


> Hope this helps,
> Marius
>
> >
> > Thanks,
> > BR,
> > Jeremie
> > ___
> > 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] Issue with Mocca Calendar finding fullcalendar.js

2015-06-03 Thread Jeremie BOUSQUET
Hello dear xwiki-ers,

(long time no see ;) )

I installed the Mocca Calendar application [1] in my xwiki 5.4.7 instance,
but when browsing to its home page, needed js file can't be loaded and so
not much appears ...

Error from FF console:

GET http://r-wikiggs.gemalto.com/fullcalendar.js [HTTP/1.1 404 Not Found
9ms]
Error: Script error for: fullcalendar
http://requirejs.org/docs/errors.html#scripterror

I understand that it probably comes from MoccaCalendar.Macro js extension:

require(['jquery', 'fullcalendar'], function(jQuery, fullCalendar) {

... but my knowledge of requireJS is more than poor so I'm not sure how to
fix this ... For sure URL used to reach fullcalendar.js is NOK.

Thanks,
BR,
Jeremie
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Fw : Re: Fw : Re: Need doc about access object in a page (and use doc)

2015-02-09 Thread Jeremie BOUSQUET
Hi,

2015-02-09 15:37 GMT+01:00 Pascal BASTIEN :

> Thxs god! xwiki is a wonderfull world ... when we manage to do what we
> want (or we can understand javadoc) ... hum!
>

Note that javadoc may not be the better entry point to understand the xwiki
model, but you may find this page interesting ;)
http://platform.xwiki.org/xwiki/bin/view/DevGuide/DataModel



>
> More seriously, thxs a lot for your help (I pulled my hair during all this
> week-end).
> I wil probably add your nice code on this page:
> 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
> #set( $MyDoc = $xwiki.getDocument("MySpace.MyNiceDoc"))
> ## 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
>
> and
>
> #set($MyDoc = $xwiki.getDocument("MySpace.MyNiceDoc"))
> #set($class = $xwiki.getClass("MySpace.MyClass"))
> ## loop over all objects
> #foreach($obj in $MyDoc.getObjects("MySpace.MyClass"))
>   ## empty line is intentionally to create a new paragraph
>
>   Object number $velocityCount
>   #set($discard = $MyDoc.use($obj))
>   #foreach($prop in $class.properties) ## go through all properties
> * ${prop.prettyName} : $MyDoc.display($prop.getName())
>   #end
> #end
>
> Pascal B.
>
>
> --- En date de : Lun 9.2.15, Clemens Klein-Robbenhaar <
> c.robbenh...@espresto.com> a écrit :
>
> > De: Clemens Klein-Robbenhaar 
> > Objet: Re: [xwiki-users] Fw : Re: Need doc about access object in a page
> (and use doc)
> > À: users@xwiki.org
> > Date: Lundi 9 février 2015, 14h53
> > On 02/09/2015 02:12 PM,
> > Pascal BASTIEN wrote:
> > > This code
> > (probably false) doesn't work.
> > >
> > #set( $Class =
> > $xwiki.getClass("MySpace.MyClass"))
> > > #foreach($prop in $class.properties) ## go
> > through all properties
> > >  *
> > ${prop.prettyName} : $doc.display($prop.getName())
> > > #end
> >
> > It
> > works for me if I do something like:
> >
> > {{velocity}}
> > ## get the
> > document which has the object (only one here) - this is the
> > page where I can see things in the object editor
> > #set( $adminDoc =
> > $xwiki.getDocument("XWiki.Admin"))
> > ## get the document wich contains the class
> > definition: this page has entries in the class editor
> > #set( $class =
> > $xwiki.getClass("XWiki.XWikiUsers"))
> > #foreach($prop in $class.properties) ## go
> > through all properties
> >  * ${prop.prettyName}
> > : $adminDoc.display($prop.getName())
> > #end
> > {{/velocity}}
> >
> > This code should work for you 1:1 unless you
> > have deleted you "Admin" user. toapply for your
> > ise case you will have to adapt the name of the class and of
> > the document containing the objects
> >
> > Note that there is a difference between:
> >
> >  - the document _defining_ the
> > class - for users this is XWiki.XWikiUsers and you can see
> > it at
> >   http://localhost:8080/xwiki/bin/view/XWiki/XWikiUsers
> >and you can cnage it  in the
> > class editor:
> >   http://localhost:8080/xwiki/bin/edit/XWiki/XWikiUsers?editor=class
> >but this document is in itself a
> > user: the object eduitor is emprty:
> >
> > http://localhost:8080/xwiki/bin/edit/XWiki/XWikiUsers?editor=object
> >(not completely empty, but does
> > not contain XWiki.XWikiUsers objects)
> >
> >  - the "admin" User document is not a
> > class:
> >  http://localhost:8080/xwiki/bin/edit/XWiki/Admin?editor=class
> >but has a Users oject
> > attached:
> >  http://localhost:8080/xwiki/bin/edit/XWiki/Admin?editor=object
> >
> >
> > Anyway, if
> > you have more than one object on a page, you will have to
> > loop over them and use "$doc.use".
> >
> > the following works for me
> > (even though it is useless in this case, as is loops over
> > all users on a page, while there should be only one ...)
> >
> > {{velocity}}
> > #set($adminDoc =
> > $xwiki.getDocument("XWiki.Admin"))
> > #set($class =
> > $xwiki.getClass("XWiki.XWikiUsers"))
> > ## loop over all objects
> > #foreach($obj in
> > $adminDoc.getObjects("XWiki.XWikiUsers"))
> >   ## empty line is intentionally to create a
> > new paragraph
> >
> >   Object
> > number $velocityCount
> >   #set($discard =
> > $adminDoc.use($obj))
> >   #foreach($prop in
> > $class.properties) ## go through all properties
> > * ${prop.prettyName} :
> > $adminDoc.display($prop.getName())
> >
> > #end
> > #end
> >
> > {{/velocity}}
> >
> >
> > hth,
> >
> > clemens
> > ___
> > 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] Empty Document Title

2015-01-27 Thread Jeremie BOUSQUET
Hi,

2015-01-27 10:39 GMT+01:00 Matthias Wegner :

> Dear Jeremie,
>
> sorry for the distracting. The object is here not important. I only
> search for ALL documents which contain one object. From that document i
> want to read the title (if i get no value from the object). I tried now
> the queryModule with
>
> List foundReferences = new
> ArrayList();
>  try {
>  Query query = queryManager.createQuery("SELECT
> doc.space, doc.name FROM Document doc, doc.object(" + className + ") AS
> obj", Query.XWQL);
>  List queryResults = query.execute();
>  for (Object[] result : queryResults) {
>  foundReferences.add(new
> DocumentReference(context.getDatabase(), (String) result[0], (String)
> result[1]));
>  }
>  } catch (Exception e) {
>  e.printStackTrace();
>  }
>  if (foundReferences.size()>0) {
>  for (DocumentReference documentReference :
> foundReferences) {
>  XWikiDocument doc =
> context.getWiki().getDocument(documentReference, context);
>  System.out.println(doc.getTitle());
>  }
>  }
>
> That doens't help at all. I don't get the title from documents. Why is
> that? You have an idea? Should title = doc.getTitle(); not give back the
> title? It has nothing to do with the attachend object.
>
> PS: I created all the documents with "AppWithinAMinute". The documents
> show a title when i open the document in the browser, so why can i read
> the title with a query from java-side? If you have no idea, than it
> seems that it is a bug. Then i send an example-code which reproduce this
> to jira.
>

When you browse a page/document created with AppWithinMinutes, you see a
title, but please could you edit this page (in "wiki" edit mode), and check
if there is something in the "title" field at the top of the editor ?
There is a possibility that the "title" is automatically rendered by the
Sheet document generated by AppWithinMinutes, from a field in the object
(I'm not sure about this).


>
> Regards,
> Matthias
>
> Am 26.01.2015 um 10:23 schrieb jerem [via XWiki]:
> > Hi,
> >
> > You should be careful with Nabble (or such tools) formatting, that
> > generates syntax that is neither plain text nor html, and your code
> > samples
> > are then not displayed at all in regular email clients ...
> >
> > I put your samples back below:
> >
> > groovy:
> >
> >  String hql = "SELECT obj.name FROM BaseObject obj WHERE
> > obj.className='Space.SomeClass'";
> >  def results = xwiki.search(hql);
> >  for (int i = 0; i < results.size(); i++) {
> > if(!results.get(i).equals("Space.SomeClassTemplate")) {
> >Document doc = xwiki.getDocument(results.get(i));
> >Object obj = document.getObject("Space.SomeClass");
> >if (obj!=null) {
> >   Property property = obj.getProperty("title");
> >   if (property!=null) {
> >  title = property.getValue();
> >   } else {
> >  title = document.getTitle();
> >  }
> >  println(title)
> > }
> >  }
> >
> > java:
> >
> > String className = "Space.SomeClass";
> > String sql = "SELECT obj.name FROM BaseObject obj WHERE
> > obj.className='" +
> > className + "'";
> > List results = context.getWiki().search(sql, context);
> > if (results != null) {
> >for (Object object : results) {
> >  String docName = object.toString();
> >  XWikiDocument doc = context.getWiki().getDocument(docName, context);
> >  EntityReference entRef = doc.resolveClassReference(className);
> >  BaseObject baseObject = doc.getXObject(entRef);
> >  if (baseObject != null) {
> >   System.out.println(doc.getTitle()+ baseObject);
> >  }
> > }
> >
> > Note that you don't do the same thing regarding title in groovy and in
> > java, obj.getProperty("title") is not at all equivalent to
> > document.getTitle() ...
> > It's likely that your document has no title, and what "works" in
> > groovy is
> > to get a property "title" from an object of this doc. At least, I
> > don't see
> > any other reason for this empty title :)
> >
> > Side note, in java you could inject the QueryManager instead of using the
> > "search" api, as you only do a read-only query:
> >
> > @Inject
> > private QueryManager queryManager;
> >
> > See : http://extensions.xwiki.org/xwiki/bin/view/Extension/Query+Module
> >
> > Hope this helps,
> >
> > Jeremie
> >
> >
> > 2015-01-23 17:39 GMT+01:00 Matthias Wegner <[hidden email]
> > >:
> >
> > > Hi All,
> > >
> > > i have a working groovy script which is:
> > >
> > > I use a class and add an object to a document. Everytime a object is
> > > attached i look for it with the query and do something with the
> > objects.
> > > the
> > > strange thing

Re: [xwiki-users] Empty Document Title

2015-01-26 Thread Jeremie BOUSQUET
Hi,

You should be careful with Nabble (or such tools) formatting, that
generates syntax that is neither plain text nor html, and your code samples
are then not displayed at all in regular email clients ...

I put your samples back below:

groovy:

 String hql = "SELECT obj.name FROM BaseObject obj WHERE
obj.className='Space.SomeClass'";
 def results = xwiki.search(hql);
 for (int i = 0; i < results.size(); i++) {
if(!results.get(i).equals("Space.SomeClassTemplate")) {
   Document doc = xwiki.getDocument(results.get(i));
   Object obj = document.getObject("Space.SomeClass");
   if (obj!=null) {
  Property property = obj.getProperty("title");
  if (property!=null) {
 title = property.getValue();
  } else {
 title = document.getTitle();
 }
 println(title)
}
 }

java:

String className = "Space.SomeClass";
String sql = "SELECT obj.name FROM BaseObject obj WHERE obj.className='" +
className + "'";
List results = context.getWiki().search(sql, context);
if (results != null) {
   for (Object object : results) {
 String docName = object.toString();
 XWikiDocument doc = context.getWiki().getDocument(docName, context);
 EntityReference entRef = doc.resolveClassReference(className);
 BaseObject baseObject = doc.getXObject(entRef);
 if (baseObject != null) {
  System.out.println(doc.getTitle()+ baseObject);
 }
}

Note that you don't do the same thing regarding title in groovy and in
java, obj.getProperty("title") is not at all equivalent to
document.getTitle() ...
It's likely that your document has no title, and what "works" in groovy is
to get a property "title" from an object of this doc. At least, I don't see
any other reason for this empty title :)

Side note, in java you could inject the QueryManager instead of using the
"search" api, as you only do a read-only query:

@Inject
private QueryManager queryManager;

See : http://extensions.xwiki.org/xwiki/bin/view/Extension/Query+Module

Hope this helps,

Jeremie


2015-01-23 17:39 GMT+01:00 Matthias Wegner :

> Hi All,
>
> i have a working groovy script which is:
>
> I use a class and add an object to a document. Everytime a object is
> attached i look for it with the query and do something with the objects.
> the
> strange thing is that i try to port it to a service to java. where i get in
> groovy an title of the document it is NOT given in java.
> The java code of the service
>
> I didn't get it. Did i do something wrong? i never get a title of the
> document. I can read the document, the object of the document, but i did
> not
> get the title. I tried also to get translated documents because i use
> locals
> de and en. But even there i get the title back.
>
> You know why?
>
> Regards,
> Matthias
>
>
>
> --
> View this message in context:
> http://xwiki.475771.n2.nabble.com/Empty-Document-Title-tp7593748.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
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Create a new wiki on Oracle database autorisation

2015-01-06 Thread Jeremie BOUSQUET
Hello,

This is normal, see here [1]

New wiki creates a new schema.

BR,
Jeremie

[1] - http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Virtualization

2015-01-06 11:49 GMT+01:00 Antoine Berthelin :

> Hello,
>
> I have a question about "create a new wiki" feature on xwiki, regarding the
> code and after test, this feature create a schema.
> In Oracle, to create a schema, you have to create user.
> The problem is : "Oracle administrator don't allow xwiki user to create
> user/schema" in oracle database ...
> File :
>
> https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.javaline
> 308
>
> Hope it's a lack of understanding on my side ?
> What do you think, do you have a workaround ?
>
> Thanks for your help
> ___
> 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] extend contact list with thumbnails

2014-12-23 Thread Jeremie BOUSQUET
Hello,

In ldap configuration, you can also have some fields synchronized with
xwiki users profiles [1].

It doesn't work for pictures (I think), in my case I have a script that
gets pictures bytes from ldap, save this as a picture attachment in wiki
user profile and associates the pic as user avatar (field with same name in
user profile). I do this in cron for users with ldap infos, and without
avatar already.

Br,
Jeremie

[1] -
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Authentication#HGenericLDAPconfiguration

Le mar. 23 déc. 2014 12:29, Florian Kessler <
florian.kess...@kesslernetworks.de> a écrit :

> Hello all,
>
> what would be the best way to show pictures/thumbnails from an active
> directory in an xwiki site?
>
> So far, we are using groovy to contact an active directoy, extract user
> info, like name, mail, phone etc and return xwiki 2.0 syntax, see code below
> Now we would love to extend that contact list with photos stored in the
> active directory.
>
> Would that be possible? If so, how?
>
> Thanks in advance,
> Florian
>
> ---
>
>
> // KE1019746, März 13, fke
> // list contact data
> // to be included via includeInContext-Marco
> //
> // CAUTION: has to saved by user with programming rights
>
> // import lib for ldap access
> import org.apache.directory.groovyldap.*
>
> // ldap connection
> ldap = LDAP.newInstance('ldap://ad-server/', 'ldapbind', 'secret')
> ldapsearchParams = new Search()
> ldapsearchParams.base = 'OU=People,DC=domain,DC=de'
> ldapsearchParams.scope = SearchScope.SUB
>
> // for each letter in the alphabet
> //for ( letter in (('A'..'Z') + ('0'..'9')) ) {
> for ( letter in [ 'F' ] ) {
>
> ldapsearchParams.filter = 
> '(&(|(memberOf=CN=CN1-FIXME)(memberOf=CN=CN2-FIXME))(sn='
> + letter.toLowerCase() + '*))'
> // do the query
> resultsUnsorted = ldap.search(ldapsearchParams)
>
> // ldap output isn't sorted
> // http://www.openldap.org/lists/openldap-software/23/
> msg00058.html
> // 'A robust client should not rely on servers maintaining any
> // particular order over what are defined as unordered sequences.
> //
> // If your client wants to present the attributes and their values
> // in some order, it should order them itself.'
> //
> // results is an array of hashed maps:
> // groovy:000> println results.getClass()
> // class java.util.ArrayList
> // groovy:000> println results[3].getClass()
> // class java.util.HashMap
> //
> // sort the array depending on the value of the field 'cn'
> results = resultsUnsorted.sort { it.sn }
> println results
>
> // if results contains at least one cn, i.e. ldap search result isn't
> emtpy
> if ( results.isEmpty() == false) {
>
> println '' // xwiki markup stunt - new line necessary to not merge
> different letters to one xwiki table
> println '==' + letter // xwiki markup - header
>
> println '|=Name|=Funktion|=Tel|=Mobile|=Privat|=Fax'
>
> for (entry in results) {
> if ( ! ( entry.dn.toUpperCase() =~ 'DEAKTIVIERT' ) ) {
>
> print '|'
> if ( entry.sn ) {
> print entry.sn
> }
> if ( entry.givenname ) {
> print " "
> print entry.givenname
> }
> print '|'
> if ( entry.title ) {
> print entry.title
> }
>
> print '|'
> if ( entry.telephonenumber ) {
> print entry.telephonenumber
> }
> print '|'
> if ( entry.mobile ) {
> print entry.mobile
> }
> print '|'
> if ( entry.homephone ) {
> print entry.homephone
> }
> print '|'
> if ( entry.facsimiletelephonenumber ) {
> print entry.facsimiletelephonenumber
> }
> print '|'
> if ( entry.thumbnailphoto ) {
> byte [] picture = entry.thumbnailphoto
> //print entry.thumbnailphoto
> print picture
> }
> println '' // xwiki markup to 'close' table
> //} else {
> //println 'No Match for ' + entry.dn.toUpperCase()
> }
> } // end for-token-loop
> } // end results-isnt-Empty
>
> } // end for-letter-in-alphabet-loop
>
> ___
> 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] Changing Metdata of Attachment

2014-12-15 Thread Jeremie BOUSQUET
Hi,



2014-12-13 12:23 GMT+01:00 Matthias Wegner :
>
> Hi,
>
> i want to create a custom excel-file. For that i want to use a uploaded
> template and the give it some values. I write that to the attachment
> storage
> and want to hcange the metainfo. The file creation with the template works
> fine, but the metatdata-change is not shown in xwiki. How can i do that? My
> code is so far
>

It is not at all recommended to manipulate directly files from attachments
file storage ... [1].
I think you'd better use xwiki regular apis to do so (on "doc") ... [2]
By retrieving the inner attachment (Attachment#getAttachment, as an
XWikiAttachment), you should be able to update metadata if needed.

J.

[1] -
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Attachments#HDirectoryStructure
[2] - http://platform.xwiki.org/xwiki/bin/view/SRD/Navigation


>
> {{groovy}}
> import java.io.File;
> import java.io.FileOutputStream;
> import java.io.IOException;
> import java.util.Calendar;
> import org.jdom2.Document;
> import org.jdom2.Element;
> import org.jdom2.JDOMException;
> import org.jdom2.input.SAXBuilder;
> import org.jdom2.output.Format;
> import org.jdom2.output.XMLOutputter;
> import org.apache.poi.hssf.usermodel.HSSFCell;
> import org.apache.poi.hssf.usermodel.HSSFRow;
> import org.apache.poi.hssf.usermodel.HSSFSheet;
> import org.apache.poi.hssf.usermodel.HSSFWorkbook;
> import org.apache.poi.poifs.filesystem.POIFSFileSystem;
>
> ArrayList header = new ArrayList();
> ArrayList> table = new
> ArrayList>();
> String sheetName = "Data";
> String fileName = "empty.xls";
> String templateName = "template.xls";
> String templateSpace = "Main";
> String pageName = "ExcelTest";
> String xwikiPath = "/opt/xwiki/openskies_v6.3";
> String templatePath =
>
> xwikiPath+"/data/storage/xwiki/"+templateSpace+"/"+pageName+"/~this/attachments/"+templateName+"/"+templateName;
> String filenamePath =
>
> xwikiPath+"/data/storage/xwiki/"+templateSpace+"/"+pageName+"/~this/attachments/"+fileName+"/"+fileName;
>
> header.add("X")
> header.add("Y")
> header.add("Z")
>
> Hashtable tableRow = new Hashtable();
> tableRow.put("X", "Q");
> tableRow.put("Y", "W");
> tableRow.put("Z", "R");
> table.add(tableRow);
>
> tableRow = new Hashtable();
> tableRow.put("X", "E");
> tableRow.put("Y", "F");
> tableRow.put("Z", "G");
> table.add(tableRow);
>
> public String convert(Long value) {
>return value.toString();
> }
>
> try {
>HSSFWorkbook wb = null;
>HSSFSheet sheet = null;
>
>File templateFile = new File(templatePath);
>boolean templateExists = templateFile.exists();
>if (templateExists) {
>   POIFSFileSystem fs = new POIFSFileSystem(new
> FileInputStream(templateFile));
>   wb = new HSSFWorkbook(fs);
>   sheet = wb.getSheetAt(0);
>} else {
>   wb = new HSSFWorkbook();
>   sheet = wb.createSheet(sheetName);
>}
>
>HSSFRow headerRow = null;
>if (templateExists) {
>   headerRow = sheet.getRow(0);
>} else {
>   headerRow = sheet.createRow(0);
>}
>for (short i = 0; i < header.size(); i++) {
>   HSSFCell cell = null;
>   if (templateExists) {
>  cell = headerRow.getCell(i);
>   } else {
>  cell = headerRow.createCell(i);
>   }
>   cell.setCellValue(header.get(i));
>}
>
>for (int ii = 0; ii < table.size(); ii++) {
>   HSSFRow row = null;
>   if (templateExists) {
>  row = sheet.getRow(ii+1);
>   } else {
>  row = sheet.createRow(ii+1);
>   }
>   for (short i = 0; i < header.size(); i++) {
>  HSSFCell cell = null;
>  if (templateExists) {
> cell = row.getCell(i);
>  } else {
> cell = row.createCell(i);
>  }
>  String s = table.get(ii).get(header.get(i));
>  cell.setCellValue(s);
>   }
>}
>
>File excelOut = new File(filenamePath);
>FileOutputStream fileOut = new FileOutputStream(filenamePath);
>wb.write(fileOut);
>fileOut.close();
>
>   File meta = new
>
> File(xwikiPath+"/data/storage/xwiki/"+templateSpace+"/"+pageName+"/~this/attachments/"
> + fileName + "/~METADATA.xml");
>   Document metadata = new SAXBuilder().build(meta);
>
>   Element root = metadata.getRootElement();
>   for (Element child : root.getChildren()) {
>  if (child.getChildText("filename").equals(fileName)) {
> if (child.getChildText("version").equals("1.1")) {
>
> child.getChild("filesize").setText(convert(excelOut.length()));
>
>
> child.getChild("date").setText(convert(Calendar.getInstance().getTime().getTime()));
> }
>  }
>   }
>   XMLOutputter outputter = new XMLOutputter(Format.getPrettyFormat());
>   outputter.output(metadata, new FileOutputStream(meta));
>
> } catch (FileNotFoundException e) {
>e.printStackTrace();
> } catch (IOException e) {
>e.printStackTrace();
> } catch (JDOMException e) {
>e.printStackTrace();
> }
>
> {{/groovy}}
>
> [[Dow

Re: [xwiki-users] What would you like to see in the XWiki 7.x cycle?

2014-12-10 Thread Jeremie BOUSQUET
2014-12-10 15:34 GMT+01:00 Jeremie BOUSQUET :

>
>
> 2014-12-10 15:26 GMT+01:00 Marius Dumitru Florea <
> mariusdumitru.flo...@xwiki.com>:
>
>> On Wed, Dec 10, 2014 at 4:06 PM, Jeremie BOUSQUET
>>  wrote:
>> > Hi,
>> >
>> > Something I just met - as it's an "improvement" proposal I thought I
>> could
>> > propose it here, but I may just create a jira if you think it's
>> interesting:
>> > Would be great if there could be an option, in Attachments tab at pages
>> > bottom, to display attachments as a grid of thumbnails, instead of just
>> a
>> > list.
>> > The best would be to by default reach current Attachments view, when
>> > clicking on Attachments tab (because it shows fastly), then have a
>> little
>> > flag, button, or whatever, to choose a "thumbnail" view.
>> > This "thumbnail" view, could be the exact same kind of view as proposed
>> by
>> > Attachments Selector Macro [1].
>> > BTW it could be nice that this {{attachmentSelector/}} could be used as
>> (or
>> > could rely on another extension that) merely displays attachments,
>> without
>> > concept of saving the attachment name in a property in an XObject ...
>> >
>>
>> > Use-case sample: when you import a .doc document, all images are set as
>> > attachments with automatic naming. Without thumbnail, it's quite hard
>> then
>> > to retrieve a specific attachment without opening all of them one by
>> one.
>>
>> There is
>> http://extensions.xwiki.org/xwiki/bin/view/Extension/AttachmentGalleryMacro
>>
>
> Yes, but it's still a "one by one" browser, not a grid of thumbnails, and
> it's not built-in the Attachment tab by default ...
> If it existed it could even be added to the File Manager Application [2],
> currently proposing a Tree and a Live Table view, it could also offer a
> Grid view with thumbnails why not ...
>
> [2] -
> http://extensions.xwiki.org/xwiki/bin/view/Extension/File+Manager+Application
>

Generally speaking if you want, I could formulate as, "More widgets and
views, for displaying or managing standard xwiki features / objects".


>
>
>> .
>>
>> >
>> > BR,
>> > Jeremie
>> >
>> > [1] -
>> >
>> http://extensions.xwiki.org/xwiki/bin/view/Extension/Attachment+Selector+Macro
>> >
>> >
>> > 2014-12-10 9:46 GMT+01:00 vinc...@massol.net :
>> >
>> >> Hi Jason,
>> >>
>> >>
>> >> On 10 Dec 2014 at 05:11:40, Jason Clemons (jason.clem...@live.com
>> (mailto:
>> >> jason.clem...@live.com)) wrote:
>> >>
>> >> > I have say, upgrading makes me very nervous too..
>> >>
>> >> Have you ever tried using the Distribution Wizard?
>> >>
>> >> > so, I'd definitely vote for anything that changes or enhances that
>> >> process. So far, I'm terrified to even try an upgrade (currently on
>> 5.4)
>> >> since my wiki is production and we've done a fair bit of customized
>> >> solutions to unique problems (likely not in a "supported" way maybe) .
>> >>
>> >> Well, first nobody should ever upgrade a wiki in production directly!
>> You
>> >> should make backups and do the upgrade on a staging server and then
>> only
>> >> move the instance to production.
>> >>
>> >> > My fear is that some piece of code or settings will get overwritten
>> >> which will break stuff and I won't know where to look to fix them. 😃
>> >> >
>> >> > A wizard would be awesome to take the guess work out of it.
>> >>
>> >> err… The Distribution Wizard …. is a... wizard ;)
>> >>
>> >> You should give it a try! We do have some ideas in jira to make it even
>> >> better but it’s already quite good in its current state.
>> >>
>> >> > As is, I've read some of the tutorials out there regarding upgrades
>> >> several times but I'm not really able to determine the prescribed steps
>> >> using those.
>> >>
>> >> What tutorial? Could you give me the links?
>> >>
>> >> > I think at the end of the day I'm going to end up exporting my
>> solutions
>> >> as XAR's and then try importing them into an upgraded Xwiki environment
>> >> too, si

Re: [xwiki-users] What would you like to see in the XWiki 7.x cycle?

2014-12-10 Thread Jeremie BOUSQUET
2014-12-10 15:26 GMT+01:00 Marius Dumitru Florea <
mariusdumitru.flo...@xwiki.com>:

> On Wed, Dec 10, 2014 at 4:06 PM, Jeremie BOUSQUET
>  wrote:
> > Hi,
> >
> > Something I just met - as it's an "improvement" proposal I thought I
> could
> > propose it here, but I may just create a jira if you think it's
> interesting:
> > Would be great if there could be an option, in Attachments tab at pages
> > bottom, to display attachments as a grid of thumbnails, instead of just a
> > list.
> > The best would be to by default reach current Attachments view, when
> > clicking on Attachments tab (because it shows fastly), then have a little
> > flag, button, or whatever, to choose a "thumbnail" view.
> > This "thumbnail" view, could be the exact same kind of view as proposed
> by
> > Attachments Selector Macro [1].
> > BTW it could be nice that this {{attachmentSelector/}} could be used as
> (or
> > could rely on another extension that) merely displays attachments,
> without
> > concept of saving the attachment name in a property in an XObject ...
> >
>
> > Use-case sample: when you import a .doc document, all images are set as
> > attachments with automatic naming. Without thumbnail, it's quite hard
> then
> > to retrieve a specific attachment without opening all of them one by one.
>
> There is
> http://extensions.xwiki.org/xwiki/bin/view/Extension/AttachmentGalleryMacro
>

Yes, but it's still a "one by one" browser, not a grid of thumbnails, and
it's not built-in the Attachment tab by default ...
If it existed it could even be added to the File Manager Application [2],
currently proposing a Tree and a Live Table view, it could also offer a
Grid view with thumbnails why not ...

[2] -
http://extensions.xwiki.org/xwiki/bin/view/Extension/File+Manager+Application


> .
>
> >
> > BR,
> > Jeremie
> >
> > [1] -
> >
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Attachment+Selector+Macro
> >
> >
> > 2014-12-10 9:46 GMT+01:00 vinc...@massol.net :
> >
> >> Hi Jason,
> >>
> >>
> >> On 10 Dec 2014 at 05:11:40, Jason Clemons (jason.clem...@live.com
> (mailto:
> >> jason.clem...@live.com)) wrote:
> >>
> >> > I have say, upgrading makes me very nervous too..
> >>
> >> Have you ever tried using the Distribution Wizard?
> >>
> >> > so, I'd definitely vote for anything that changes or enhances that
> >> process. So far, I'm terrified to even try an upgrade (currently on 5.4)
> >> since my wiki is production and we've done a fair bit of customized
> >> solutions to unique problems (likely not in a "supported" way maybe) .
> >>
> >> Well, first nobody should ever upgrade a wiki in production directly!
> You
> >> should make backups and do the upgrade on a staging server and then only
> >> move the instance to production.
> >>
> >> > My fear is that some piece of code or settings will get overwritten
> >> which will break stuff and I won't know where to look to fix them. 😃
> >> >
> >> > A wizard would be awesome to take the guess work out of it.
> >>
> >> err… The Distribution Wizard …. is a... wizard ;)
> >>
> >> You should give it a try! We do have some ideas in jira to make it even
> >> better but it’s already quite good in its current state.
> >>
> >> > As is, I've read some of the tutorials out there regarding upgrades
> >> several times but I'm not really able to determine the prescribed steps
> >> using those.
> >>
> >> What tutorial? Could you give me the links?
> >>
> >> > I think at the end of the day I'm going to end up exporting my
> solutions
> >> as XAR's and then try importing them into an upgraded Xwiki environment
> >> too, since it seems easier to me.
> >>
> >> The DW is generally a better solution to upgrades.
> >>
> >> Thanks
> >> -Vincent
> >>
> >> > > On Dec 9, 2014, at 2:58 PM, Jeremie BOUSQUET wrote:
> >> > >
> >> > > Le 9 déc. 2014 22:37, "Thomas Mortagne" a écrit
> >> > > :
> >> > >>
> >> > >> On Tue, Dec 9, 2014 at 10:28 PM, Guillaume Lerouge
> >> > > wrote:
> >> > >>> Hi,
> >> > >>>
> >> > >>> On Tue, Dec 9, 2014 at 10:23 PM, Thomas Mortagne <
> >> &

Re: [xwiki-users] What would you like to see in the XWiki 7.x cycle?

2014-12-10 Thread Jeremie BOUSQUET
Hi,

Something I just met - as it's an "improvement" proposal I thought I could
propose it here, but I may just create a jira if you think it's interesting:
Would be great if there could be an option, in Attachments tab at pages
bottom, to display attachments as a grid of thumbnails, instead of just a
list.
The best would be to by default reach current Attachments view, when
clicking on Attachments tab (because it shows fastly), then have a little
flag, button, or whatever, to choose a "thumbnail" view.
This "thumbnail" view, could be the exact same kind of view as proposed by
Attachments Selector Macro [1].
BTW it could be nice that this {{attachmentSelector/}} could be used as (or
could rely on another extension that) merely displays attachments, without
concept of saving the attachment name in a property in an XObject ...

Use-case sample: when you import a .doc document, all images are set as
attachments with automatic naming. Without thumbnail, it's quite hard then
to retrieve a specific attachment without opening all of them one by one.

BR,
Jeremie

[1] -
http://extensions.xwiki.org/xwiki/bin/view/Extension/Attachment+Selector+Macro


2014-12-10 9:46 GMT+01:00 vinc...@massol.net :

> Hi Jason,
>
>
> On 10 Dec 2014 at 05:11:40, Jason Clemons (jason.clem...@live.com(mailto:
> jason.clem...@live.com)) wrote:
>
> > I have say, upgrading makes me very nervous too..
>
> Have you ever tried using the Distribution Wizard?
>
> > so, I'd definitely vote for anything that changes or enhances that
> process. So far, I'm terrified to even try an upgrade (currently on 5.4)
> since my wiki is production and we've done a fair bit of customized
> solutions to unique problems (likely not in a "supported" way maybe) .
>
> Well, first nobody should ever upgrade a wiki in production directly! You
> should make backups and do the upgrade on a staging server and then only
> move the instance to production.
>
> > My fear is that some piece of code or settings will get overwritten
> which will break stuff and I won't know where to look to fix them. 😃
> >
> > A wizard would be awesome to take the guess work out of it.
>
> err… The Distribution Wizard …. is a... wizard ;)
>
> You should give it a try! We do have some ideas in jira to make it even
> better but it’s already quite good in its current state.
>
> > As is, I've read some of the tutorials out there regarding upgrades
> several times but I'm not really able to determine the prescribed steps
> using those.
>
> What tutorial? Could you give me the links?
>
> > I think at the end of the day I'm going to end up exporting my solutions
> as XAR's and then try importing them into an upgraded Xwiki environment
> too, since it seems easier to me.
>
> The DW is generally a better solution to upgrades.
>
> Thanks
> -Vincent
>
> > > On Dec 9, 2014, at 2:58 PM, Jeremie BOUSQUET wrote:
> > >
> > > Le 9 déc. 2014 22:37, "Thomas Mortagne" a écrit
> > > :
> > >>
> > >> On Tue, Dec 9, 2014 at 10:28 PM, Guillaume Lerouge
> > > wrote:
> > >>> Hi,
> > >>>
> > >>> On Tue, Dec 9, 2014 at 10:23 PM, Thomas Mortagne <
> > > thomas.morta...@xwiki.com>
> > >>> wrote:
> > >>>
> > >>>> On Tue, Dec 9, 2014 at 9:57 PM, Harald Ommang > >>
> > >>>> wrote:
> > >>>>> Hi!
> > >>>>>
> > >>>>> In one way, I very much appreciate the relatively high frequency of
> > >>>> updates done by the XWIKI crew. You are doing a great job, making
> sure
> > > that
> > >>>> XWIKI is alive and kicking and always improving.
> > >>>>>
> > >>>>> The downside to this, is all the work needed to be done when
> > > upgrading.
> > >>>> So, I don't do that very often. The basic part of
> > > installation/migration
> > >>>> works very well, but when it comes to content, the upgrade
> procedure is
> > >>>> messy, as I see it. It is a hassle to have to pick and choose
> between
> > >>>> various parts when importing and exported XAR.
> > >>>>>
> > >>>>> I would very much suggest planning for a future where the parts
> that
> > > are
> > >>>> XWIKI software are clearly separated from the parts where customers
> > >>>> typically do modifications. Especially items like users and groups.
> It
> > >>>> should be p

Re: [xwiki-users] What would you like to see in the XWiki 7.x cycle?

2014-12-09 Thread Jeremie BOUSQUET
Le 9 déc. 2014 22:37, "Thomas Mortagne"  a écrit
:
>
> On Tue, Dec 9, 2014 at 10:28 PM, Guillaume Lerouge 
wrote:
> > Hi,
> >
> > On Tue, Dec 9, 2014 at 10:23 PM, Thomas Mortagne <
thomas.morta...@xwiki.com>
> > wrote:
> >
> >> On Tue, Dec 9, 2014 at 9:57 PM, Harald Ommang 
> >> wrote:
> >> > Hi!
> >> >
> >> > In one way, I very much appreciate the relatively high frequency of
> >> updates done by the XWIKI crew. You are doing a great job, making sure
that
> >> XWIKI is alive and kicking and always improving.
> >> >
> >> > The downside to this, is all the work needed to be done when
upgrading.
> >> So, I don't do that very often. The basic part of
installation/migration
> >> works very well, but when it comes to content, the upgrade procedure is
> >> messy, as I see it. It is a hassle to have to pick and choose between
> >> various parts when importing and exported XAR.
> >> >
> >> > I would very much suggest planning for a future where the parts that
are
> >> XWIKI software are clearly separated from the parts where customers
> >> typically do modifications. Especially items like users and groups. It
> >> should be possible to have a more separated export/import so that you
GET
> >> new versions of e.g. the admin pages, while still KEEPING your setup of
> >> users, groups, etc., without having to click on a million of
checkboxes in
> >> the import.
> >>
> >> I don't really understand this comment, doing export/import is really
> >> not the standard way of doing an upgrade. In typical upgrade you
> >> backup everything if you want to be safe (or better you have automated
> >> backups and you don't really need to do it when you upgrade), upgrade
> >> the WAR part (if you use the Debian package then it's just about doing
> >> apt-get upgrade or install with a specific version), restart, XWiki
> >> upgrade the database shema automatically if needed and then you get
> >> the Distribution Wizard which download and upgrade the wiki pages with
> >> 3 ways merge. Most of the time you don't have anything to do.
> >>
> >
> > Sure, but to benefit from all those nice Distribution Wizard features,
> > Harald would first need to... upgrade to the latest version ;-)
>
> Distribution Wizard has been introduced in 4.2 so not really the
> latest version. And even before that export/import everything never
> really been standard upgrade process either.

Sure, but you usually did reverse way : import new xwiki ui xar (and
remember to uncheck standard pages customized, or have them overwritten).
And yes, it was sometimes a hassle, and compared to that distribution
wizard is really really great :)

>
> >
> > Guillaume
> > ___
> > 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] What would you like to see in the XWiki 7.x cycle?

2014-12-09 Thread Jeremie BOUSQUET
Hi,

2014-12-09 9:00 GMT+01:00 Hamster :

> jerem wrote
> > - they usually consider that readability of titles and sub-titles
> > (headings) inside wiki pages is not very good, difficult to differentiate
> > them
>
> Why don't you use a "Style Sheet Extension" and completely define how each
> Header should look like?
>

For the same reason you talked about numbered headings, because ideally I'd
propose to have titles better by default :)
BTW there's an extension to get numbered headings:
http://extensions.xwiki.org/xwiki/bin/view/Extension/Numbered+Headings


>
> http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Skins
> http://platform.xwiki.org/xwiki/bin/view/DevGuide/SkinExtensionsTutorial
>
>
>
> --
> View this message in context:
> http://xwiki.475771.n2.nabble.com/What-would-you-like-to-see-in-the-XWiki-7-x-cycle-tp7593349p7593388.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
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] What would you like to see in the XWiki 7.x cycle?

2014-12-08 Thread Jeremie BOUSQUET
Hi,

I'd add some stuff, based on feedbacks from my (advanced) users:

- they usually consider that readability of titles and sub-titles
(headings) inside wiki pages is not very good, difficult to differentiate
them
- when they create new pages (by putting [[new page>>newpage]]), once new
page created, they find difficult to add links to this same new page from
other pages (have to remember the name). It seems they didn't know about
the corresponding feature in wysiwyg editor ...
- a smarter TOC macro, that would optionally include in TOC, content from
child pages (child meaning here, linked from current page). The macro would
in this case, update headings levels of included (linked) pages, so their
min level correspond to current TOC level + 1 (not sure I'm clear ... but
let's say that it would generate a coherent TOC, without having to renumber
child pages headings)

Not very new: some people have difficulties really understanding concepts
of Space, page, how to name them, what happens when they enter a new page
name, etc ... I added "Space Hierarchy" panel, but they seem even more
confused :)

(feedbacks based on 5.x)

BR,
Jeremie


2014-12-05 18:19 GMT+01:00 Marius Dumitru Florea <
mariusdumitru.flo...@xwiki.com>:

> On Fri, Dec 5, 2014 at 2:34 PM, Daniel Lundh  wrote:
> > Hello.
> >
> > New XWiki user here.
> >
> > First, a big thanks, we are enjoying XWiki. :)
> >
> > We have a fairly common use case, using the wiki for documenting servers
> > and systems, trying to build an SKMS ala ITIL.
> >
> > What i'd like to see is better formatting of text being cut & pasted from
> > (mainly) Word.
> > The single biggest issue I have heard complaints about is formatting.
> > We are moving away from a Lotus Domino environment and here too the
> > formatting is mangled (this may have everything to do with Domino and
> > nothing with XWiki however) when doing copy/paste.
> >
> > I'd like tables to work like they do in Excel. When I press the tab key I
> > want to move to the next field.
> > I want to be able to size the table with my mouse in real-time.
> > I want the columns to be plainly visible, not just the rows.
> >
> > I want numbered lists to be a core feature.
> >
>
> > Making text different colors and/or fonts should work like in a regular
> > word processor, with a menu item in the WYSIWYG editor.
>
> This is already possible.
>
> http://platform.xwiki.org/xwiki/bin/view/Features/WysiwygEditor#HQuickReference
> . You need to enable it from the WYSIWYG editor section in the wiki
> administration. It's not very straightforward but this
>
> http://platform.xwiki.org/xwiki/bin/view/AdminGuide/WysiwygEditor#HPluginsandFeatures
> can help.
>
> The rest is very good feedback.
>
> Thanks,
> Marius
>
> >
> > That's from the top of my head, anyway.
> >
> > Have a great weekend.
> >
> > Regards,
> > Daniel
> >
> >
> >
> > On Fri, Dec 5, 2014 at 1:17 PM, vinc...@massol.net 
> > wrote:
> >
> >> Dear XWiki users,
> >>
> >> We’re getting close to the end of the XWiki 6.x cycle (6.4 is planned
> for
> >> the end of December) and in January we’ll start developing the XWiki 7.x
> >> cycle (which will last the whole 2015 year), starting with XWiki 7.0.
> >>
> >> Thus it’s time for the XWiki devs to start defining the global roadmap
> for
> >> XWiki 7.x.
> >>
> >> As XWiki users, I’d like to know if you have some needs for XWiki 7.x.
> >> What would you be interested in seeing in XWiki 7.x?
> >>
> >> I’d like to start some proposal on the xwiki devs list (for the XWiki
> 7.x
> >> cycle) around end of December so it would be nice if you could shoot
> your
> >> suggestion ideas fast so that we can take them into account in the
> >> discussion! :)
> >>
> >> Thanks a lot for your help and I hope you’re enjoying using XWiki!
> >>
> >> -Vincent Massol
> >> XWiki Committer
> >>
> >>
> >> ___
> >> users mailing list
> >> users@xwiki.org
> >> http://lists.xwiki.org/mailman/listinfo/users
> >>
> >
> >
> >
> > --
> >
> > Regards/Mvh
> > Daniel Lundh
> > ___
> > 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] What would you like to see in the XWiki 7.x cycle?

2014-12-05 Thread Jeremie BOUSQUET
Hello,

First I like previous feedbacks (on wysiwig, tables, etc).

Then some random "ideas" of things I'd love to see in xwiki:
- flavors ! ;-)
- EDM ! I agree some extensions already go in this way, and it's better to
have this as extension(s) and not in core, but maybe a default EDM oriented
flavor could be very interesting for enterprises
- more "inline" editing of some very standard pieces of the UI (editing a
panel, editing the custom menu from Menu extension, customizing xwiki top
menu, customizing page menu/actions, etc). Like an online editor of all
content except page content ? Would be so nice to have a little pencil icon
appear on hovering of a panel title ... :-)
- better wysiwyg edition of some specific macros (include, etc), I suppose
you see what I refer to
- more easy customization of pdf export (possibility to choose a template
at time of export and not only through url param, from a list, have some
app to customize header/footer without having to customize skin prefs,
manage a catalog of templates, etc)
- have a way to assign a "label" to a set of pages revisions (ie, similar
to a tag in mercurial, but on wiki pages). Then I could, for example,
export a xar, but based on a specific "label". Or export a multi-page pdf,
based on a label. (pretty useful, or even essential, for EDM flavor)

More in terms of "extensions", so I'm not sure it fits here, but :
- an extension to manage trainings (catalog, members, schedule)
- managing distribution-lists (Exchange) - note that I might contribute
something for this, if I can ...
- roundtrip with DITA (import/wysiwyg-annotations-comments/export) (DITA is
Darwin Information Typing Architecture)

- move back to java 6 ! (no, that's a joke, sorry :D )

Note: these are my own "needs" (say, wishes) as wiki admin, I'll try to ask
some users to get their feedbacks,

Br,
Jeremie




2014-12-05 15:13 GMT+01:00 Pascal BASTIEN :

> Hello,
>
> You invited us Vincent, then here my proposals.
>
> +10 to thanks Xwiki task force team (especially to support my harassment)
>
> WYSIWYG based on FckEditor better to work on tables IMO
> +1: "I want the columns to be plainly visible, not just the rows"
> especially when we edit a table
>
> Add tab "Source" on WYSIWYG editor in Blog and FAQ
>
> Add anchor lists on the page (a macros?) to add an link to an anchor
> #HAnchorTitle) and update anchor link when anchor target is renamed
> (difficult) & detect link with anchor when a page is renamed.
> Use pure CSS for xwiki menu (without JS)
>
> Last but not least: forbidden Vincent to awake devs at 2 hours in the
> morning on IRC xwiki chanel to chatting about an obscure xwiki code... ;-)
>
> Thxs for all.
> Pascal BASTIEN
>
>
>   De : Daniel Lundh 
>  À : XWiki Users 
>  Envoyé le : Vendredi 5 décembre 2014 13h34
>  Objet : Re: [xwiki-users] What would you like to see in the XWiki 7.x
> cycle?
>
> Hello.
>
> New XWiki user here.
>
> First, a big thanks, we are enjoying XWiki. :)
>
> We have a fairly common use case, using the wiki for documenting servers
> and systems, trying to build an SKMS ala ITIL.
>
> What i'd like to see is better formatting of text being cut & pasted from
> (mainly) Word.
> The single biggest issue I have heard complaints about is formatting.
> We are moving away from a Lotus Domino environment and here too the
> formatting is mangled (this may have everything to do with Domino and
> nothing with XWiki however) when doing copy/paste.
>
> I'd like tables to work like they do in Excel. When I press the tab key I
> want to move to the next field.
> I want to be able to size the table with my mouse in real-time.
> I want the columns to be plainly visible, not just the rows.
>
> I want numbered lists to be a core feature.
>
> Making text different colors and/or fonts should work like in a regular
> word processor, with a menu item in the WYSIWYG editor.
>
> That's from the top of my head, anyway.
>
> Have a great weekend.
>
> Regards,
> Daniel
>
>
>
> On Fri, Dec 5, 2014 at 1:17 PM, vinc...@massol.net 
> wrote:
>
> > Dear XWiki users,
> >
> > We’re getting close to the end of the XWiki 6.x cycle (6.4 is planned for
> > the end of December) and in January we’ll start developing the XWiki 7.x
> > cycle (which will last the whole 2015 year), starting with XWiki 7.0.
> >
> > Thus it’s time for the XWiki devs to start defining the global roadmap
> for
> > XWiki 7.x.
> >
> > As XWiki users, I’d like to know if you have some needs for XWiki 7.x.
> > What would you be interested in seeing in XWiki 7.x?
> >
> > I’d like to start some proposal on the xwiki devs list (for the XWiki 7.x
> > cycle) around end of December so it would be nice if you could shoot your
> > suggestion ideas fast so that we can take them into account in the
> > discussion! :)
> >
> > Thanks a lot for your help and I hope you’re enjoying using XWiki!
> >
> > -Vincent Massol
> > XWiki Committer
> >
> >
> > ___
> > users mailing list
> > users@xwiki

Re: [xwiki-users] documentation

2014-12-04 Thread Jeremie BOUSQUET
Hello,

Everything can be found from here :
http://platform.xwiki.org/xwiki/bin/view/SRD/Navigation

Click on "$doc", left side

Br,
Jeremie

Le jeu. 4 déc. 2014 17:10, Jason Clemons  a écrit :

>
>
> Hello all,
>
> is there documentation I can refer to that lists all the properties of
> "doc".
>
> I find most of the stuff I need in HQL or Velocity or whatever are
> attributes of a document, but I'd like to see all possible attributes and
> their meaning somewhere if it exists.
> ___
> 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] Upgrade 0.9.840 version to Latest version.

2014-11-12 Thread Jeremie BOUSQUET
Hi,

2014-11-12 14:33 GMT+01:00 Manjunath Kashyap :

> Hi Vincent,
>
> Thanks for the reply and all the links. Yes as you *said *the current wiki
> is very very old.
> These are the links which i went through for the upgrade process.
> As depicted in the documentation(links), the Xwiki pages needs to be
> exported into a XRAR format to re-import them into the latest version.
> I would like to mention that the current version of our wiki(0.9.840) does
> not support the export option for XRAR format.
>

I think xar import/export was added in 1.0, but you should be able to
migrate from 0.9.840 to 1.0 then use xar format to reach targeted version.
See also
http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWiki10 and
other release notes.



> Is professional help the only way to get our wiki upgraded to latest
> version? (not feasible approach)
> Please suggest if there are ways other than getting professional help.
>

If I may bring my own experience, I wouldn't say that it's not feasible - I
did it - but I did it over several years (well 9 in fact), usually having 1
year behind each major version stabilization.
Feasible, but really not easy, given the gap ! ;-) It could easily be quite
time consuming ...

Whatever you decide, backuping your current database is an absolute must-do
before any move ! (and checking that you can restore this backup is almost
as important)


>
> Thanks,
> Kashyap.
>
> On Sun, Nov 9, 2014 at 3:00 PM, vinc...@massol.net 
> wrote:
>
> > Hi Kashyap,
> >
> >
> > On 7 Nov 2014 at 11:16:41, Manjunath Kashyap (
> mail2manjukash...@gmail.com
> > (mailto:mail2manjukash...@gmail.com)) wrote:
> >
> > > Hi All,
> > >
> > > We are currently using the 0.9.840 version of Xwiki. We are planning to
> > > upgrade the wiki to the latest version so as to include all the new
> > > features provided by xwiki.
> >
> > That’s a nice challenge since 0.9.840 dates back to July 2005 (i.e. 9
> > years ago) ;)
> >
> > > I searched almost everywhere for a good resource for upgrading the
> wiki,
> > > but in vain.
> >
> > I don’t know what you searched but it’s very very simple to find an
> > upgrade doc (either in google on or on xwiki.org). I just typed “xwiki
> > upgrade” on google and got
> > http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Upgrade
> >
> > I’ve just added a new section in that doc for you since I believe you
> > shouldn’t go through and upgrade in your case and instead go through
> > import/export:
> >
> >
> http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Upgrade#HAlternative:ExportandReimport
> >
> > > Can someone guide me on this to accomplish this task?
> > > This is a very significant step in expanding our business with the
> xwiki
> > > team.
> >
> > Also note that since it’s not an easy step you could ask for professional
> > support from experts. There are some companies offering that listed here:
> > http://www.xwiki.org/xwiki/bin/view/Main/Support#HProfessionalSupport
> >
> > Thanks
> > -Vincent
> >
> > > Thanks,
> > > Kashyap.
> >
> >
> ___
> 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] icons not displaying on Main.WebHome

2014-11-04 Thread Jeremie BOUSQUET
Hello,

Normally it should be "[[image:icon:accept]]" not "[image.icon.accept]"

Regards,
Jeremie

2014-11-04 17:07 GMT+01:00 Adrien Moi :

> Hello,
>
> I just installed XWiki on my computer to make a small Wiki for myself and
> I was unable to display icons on the page Main.WebHome Icons work fine
> on the other pages, but when I write [image.icon.accept] in the editor, the
> text icon.accept appears on the page instead of the icon Is that normal?
>
> Cheers
>
> Adrien
>
> ___
> 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 6, Java 7 and Red-Hat

2014-10-31 Thread Jeremie BOUSQUET
Dear community,

I tried to migrate a test xwiki instance to 6.x on my red-hat linux server,
and encountered a (fatal) issue: as it requires java 7, in turn, it
requires RHEL >= 5.5 (and I'm on an old RHEL 4.6) due to glibc (thank you,
java...).
Upgrading red-hat on this server is not an option for now, even if it's way
too old I agree, so I hope I'll be able to do this upgrade one day ... :/

But my point is, do you think interesting to add this information in
installation guide somewhere ? [1]
Maybe there's a better place, or maybe it's not needed at all I don't
know... There's already info about java 7 obviously, I'm talking about
specific impact for red-hat.

WDYT ?

Best regards,
Jeremie


[1] - http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Installation
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Git plugin ?

2014-10-23 Thread Jeremie BOUSQUET
In fact, when you export an xwiki page (to export a .xar file, or to put
this page under source control, etc), it is represented as an .xml file.
This file contains the markup (in any syntax chosen for the page), and some
other information, like author, dates, other xwiki stuff possibly
(xobjects, xclass etc) that may not interest you at first.
Concept is that you can then re-import this xml file in any xwiki instance,
and it will create the exact same page you exported. Usually we put a
number of those files in a .xar file, allowing to import or export a bunch
of pages at once.

What propose the SVN and the Github apps, are ways to synchronize your wiki
pages, from your running xwiki instance on one side, and a github or svn
repo on the other side (under the form of those .xml files).
As far as I know, this synchronization is not automatic:
- when you click "commit", it will push changes from the running xwiki
instance to source control - if you set a CI server watching modifications
of source control, you can rebuild upon a change in markup in a page
- when you click "update", it will pull changes from source control into
running xwiki instance - if you refresh a page for which .xml was changed
and pulled, html of course is refreshed.

I don't know much more as I never used those apps, so please extension
creators correct me if I'm wrong :)

About editing directly those exported .xml files : it is possible but not
recommended as format is not so readable, some parts are binary, and others
are xml-encoded (so if you forget to xml-encode your modifications, you
generate pages impossible to import back in xwiki).

Hope this helps,
Jeremie



2014-10-23 15:21 GMT+02:00 Yves Moisan :

> Hi Paul,
>
> I thought the markup files (XWiki pages == markup files ?) alone were
> versioned -- at least that's how I figured the SVN Application plugin
> worked.  I was thinking something along the lines of what ReadTheDocs
> offers for GitHub users, that is automatic build of the documentation upon
> a change in markup )in taht case markdown or reStructuredText), only in the
> case of XWiki I thought just updating the source underneath would
> automagically render in HTML upon page refresh, sort of.
>
> I realize I need to understand a bit more on how XWiki works.
>
> Thanx for your input,
>
> Yves
>
>  Yves,
>>
>> this is related strongly to the layout of source code for XWiki pages.
>> It has been discussed over and over but has not come to a final agreement.
>> I still feel it is not sane to edit the XML files of the xar exports. But
>> that is what most people still do, in that they export it (without looking)
>> into the source trees, and import it.
>>
>> I still find we need to devise some best practice there.
>>
>> paul
>>
>
> ___
> 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] Git plugin ?

2014-10-23 Thread Jeremie BOUSQUET
Hi,

Not exactly what you want, but did you have a look at the Github App [1] ?
It seems similar to the SVN App.

BR,
Jeremie

[1] -
http://extensions.xwiki.org/xwiki/bin/view/Extension/XWiki+Application+-+GitHub+App

2014-10-22 21:32 GMT+02:00 Yves Moisan :

> Hi All,
>
> I am new to XWiki and I was wondering if some users use XWiki as a
> documentation engine for software projects in general.  The case I have in
> mind is that we want to provide our software documentation to our customers
> as XWiki pages.  I'm quite fond of Sphinx (http://sphinx-doc.org/) and I
> very much like the idea of being able to set up a bunch of files (in the
> case os Sphinx reStructuredText text files) and have them versioned in the
> revision control system we use for our code.  I thought I could set up a
> similar file structure with XWiki 2.1 text files and have them versioned as
> a function of language and (our) software version.
>
> So the question : does anyone know of a Git plugin akin to the existing
> SVN Application (http://extensions.xwiki.org/xwiki/bin/view/Extension/SVN+
> Application) ?  I tried setting up the SVN plugin yesterday by testing on
> a local SVN and I didn't succeed.  I figured the reason is that we have
> Enterprise XWiki 5.2 and the plugin mentions it's been tested with version
> 6.0.1 but before I try harder I'd prefer if there would be a Git plugin
> since we're transitioning over to Git.
>
> Also, I know the idea of keeping versions separate from XWiki's own
> versioning story seems odd, but I still find a justification for a revision
> control system level versioning.  The rationale behind the development of
> the SVN Application rings a bell to me : "Allows concurrent development on
> multiple servers and simplifies publishing XWiki applications".
>
> TIA,
>
> Yves Moisan
>
> P.S. I scanned the mailing list archives up to Dec 2012 and din't find
> anything.
> ___
> 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] Static list value vs. display

2014-10-09 Thread Jeremie BOUSQUET
Hi,

There are a number of ways to workaround this behaviour, but it all depends
on what you want to achieve specifically ?
For example you could leave all the choices (raw values/labels) in the
xwiki class, but remove some from display in edit mode using a custom
displayer.
Or manage to show the missing labels (not anymore in the class) with a
custom displayer.

BR,
Jeremie

2014-10-09 3:38 GMT+02:00 Jason Clemons :

> hmmm...I assumed that anything spawned as an instance of the base class
> would have their own copy of the properties that persisted.
>
> Your explanation certainly helps, but it seems that this approach means
> that changes to the base class will influence all of its iterations, making
> business logic changes very difficult to implement.
>
> Thanks for taking the time to respond.
>
>
>
> > On Oct 8, 2014, at 3:14 PM, Eduard Moraru  wrote:
> >
> > Hi,
> >
> > Objects only store the selected value when the value is set, not the
> > value's label. The class is in charge of storing the list of possible
> > values and their labels.
> >
> > The field displayer displays the currently stored value inside the object
> > using the current list of available value labels from the class. If the
> > currently stored value in an object is no longer in the list of values of
> > the class, the raw value is displayed instead of a value label.
> >
> > Changes on the class impact the display of all the objects of that class.
> > Yo can safely change a value's label in the class and all objects will
> > display that value with the new label, but if you remove the value from a
> > class, objects will no longer *know* how to display your (now) unknown
> > value.
> >
> > Hope that clarifies things.
> >
> > Thanks,
> > Eduard
> >
> > On Tue, Oct 7, 2014 at 6:37 PM, Jason Clemons 
> > wrote:
> >
> >> Hello all,
> >>
> >> I'm not sure if I'm doing something wrong or not, but I have an issue
> with
> >> my static lists.  I set the "value" as follows:
> >>
> >> 1-choice 1|2-choice 2|3-choice 3
> >>
> >> when I view my form I see the choices as follows:
> >>
> >> choice 1
> >> choice 2
> >> choice 3
> >>
> >> which is what I expect, however...if I change the value before the dash
> or
> >> remove the
> >> selection all together from the class all items which have that
> selection
> >> get the "hidden" value.
> >>
> >> For instance, if a page was created using "choice 1", and the selection
> of
> >> "choice 1" exists in the class, then viewing the page will indeed show
> >> "choice 1".  However, if I remove  "choice 1" or change it to
> "selection 1"
> >> for instance, then all instances previously using that selection will
> then
> >> display "1".
> >>
> >> is there any way to prevent previously created pages from changes when
> the
> >> class changes?
> >> ___
> >> 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] 2 lists = 3 differents sorts on xwiki 6.2.1 and improve blog

2014-10-06 Thread Jeremie BOUSQUET
(Note that a not-so-complex solution could be to first render blog post
content in plain text, and cut the result to display a summary...)

2014-10-06 18:18 GMT+02:00 Jeremie BOUSQUET :

> Hi,
>
> Problem is if blog content contains more than plain text (ie, html macros,
> groovy macros, multiple columns, etc ...), cutting 5 first lines may
> generate content impossible to render. Also, nothing says that cutting 5
> lines would generate 5 lines in rendered text.
> I had the same issue but in my case the "cut" content was pure HTML, and
> was displayed in the scope of an iframe, so at least it would not break the
> rest of the page or generate exceptions. But it's a heavy solution for
> blogs IMHO.
> I suppose there are multiple ways to cut a part of this content in a clean
> and generic way, but it doesn't seem very easy.
> That being said, I suppose your code works most of the times if your blog
> posts are mainly plain text or limited to very basic wiki syntax.
>
> BR,
> Jeremie
>
>
> 2014-10-06 17:37 GMT+02:00 Pascal BASTIEN :
>
>> I cut at end of line (and remove empty line)
>>
>> I replaced your piece of comment "#* Disabled until the content can be
>> cleanly cut." in #macro(getEntryContent  of  Blog.BlogCode doc
>> by this one
>>
>> #if($onlyExtract)
>>  #set($result = '')
>>  #set($resultArray =
>> $entryObj.getProperty('content').value.split('\s*\n\s*',10))
>>  #foreach ($value in $resultArray)
>>  #if( $velocityCount > 5 )
>>#break
>>  #end
>>#set($result = "$result
>> $value")
>>  #end
>>#set($result = "${result}
>> [[...>>${entryDoc}||title='$services.localization.render('xe.blog.code.readpost')']]")
>> #end
>>
>>
>>
>>
>>
>> 
>>  De : "vinc...@massol.net" 
>> À : XWiki Users 
>> Envoyé le : Lundi 6 octobre 2014 17h16
>> Objet : Re: [xwiki-users] 2 lists = 3 differents sorts on xwiki 6.2.1 and
>> improve blog
>>
>>
>>
>>
>> On 6 Oct 2014 at 16:40:26, Pascal BASTIEN (pbasnews-xw...@yahoo.fr
>> (mailto:pbasnews-xw...@yahoo.fr)) wrote:
>>
>> > Hello,
>> > On my space Webhome I have 2 lists with the same sort (modification
>> date):
>> >
>> > {{spaceindex space="$doc.space" sort="modificationDate"/}}
>> >
>> > and
>> >
>> > {{activity spaces="$!aSpace" rss=true /}}
>> >
>> > I edited one doc with minorEdit and I obtain 3 differents sort.
>> >
>> > I can understand why spaceindex sort is different than "activity
>> spaces" but why "activity spaces" sort is different than Main.WebRss?)
>> >
>> >
>> > Here some screenshots:
>> > http://snag.gy/l6iQt.jpg
>> > http://snag.gy/JwMVu.jpg
>> >
>> >
>> > NB: I modified BlocCode to display 5 first lines of content blog post
>> on Blog.WebHome if the blog post have an empty summary, do you interested?
>>
>> We used to have this and removed it since it causes too many problems.
>> How can you ensure you’re cutting at some place that doesn’t cause a
>> problem when rendered?
>>
>> Thanks
>> -Vincent
>>
>>
>> ___
>> 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] 2 lists = 3 differents sorts on xwiki 6.2.1 and improve blog

2014-10-06 Thread Jeremie BOUSQUET
Hi,

Problem is if blog content contains more than plain text (ie, html macros,
groovy macros, multiple columns, etc ...), cutting 5 first lines may
generate content impossible to render. Also, nothing says that cutting 5
lines would generate 5 lines in rendered text.
I had the same issue but in my case the "cut" content was pure HTML, and
was displayed in the scope of an iframe, so at least it would not break the
rest of the page or generate exceptions. But it's a heavy solution for
blogs IMHO.
I suppose there are multiple ways to cut a part of this content in a clean
and generic way, but it doesn't seem very easy.
That being said, I suppose your code works most of the times if your blog
posts are mainly plain text or limited to very basic wiki syntax.

BR,
Jeremie


2014-10-06 17:37 GMT+02:00 Pascal BASTIEN :

> I cut at end of line (and remove empty line)
>
> I replaced your piece of comment "#* Disabled until the content can be
> cleanly cut." in #macro(getEntryContent  of  Blog.BlogCode doc
> by this one
>
> #if($onlyExtract)
>  #set($result = '')
>  #set($resultArray =
> $entryObj.getProperty('content').value.split('\s*\n\s*',10))
>  #foreach ($value in $resultArray)
>  #if( $velocityCount > 5 )
>#break
>  #end
>#set($result = "$result
> $value")
>  #end
>#set($result = "${result}
> [[...>>${entryDoc}||title='$services.localization.render('xe.blog.code.readpost')']]")
> #end
>
>
>
>
>
> 
>  De : "vinc...@massol.net" 
> À : XWiki Users 
> Envoyé le : Lundi 6 octobre 2014 17h16
> Objet : Re: [xwiki-users] 2 lists = 3 differents sorts on xwiki 6.2.1 and
> improve blog
>
>
>
>
> On 6 Oct 2014 at 16:40:26, Pascal BASTIEN (pbasnews-xw...@yahoo.fr(mailto:
> pbasnews-xw...@yahoo.fr)) wrote:
>
> > Hello,
> > On my space Webhome I have 2 lists with the same sort (modification
> date):
> >
> > {{spaceindex space="$doc.space" sort="modificationDate"/}}
> >
> > and
> >
> > {{activity spaces="$!aSpace" rss=true /}}
> >
> > I edited one doc with minorEdit and I obtain 3 differents sort.
> >
> > I can understand why spaceindex sort is different than "activity spaces"
> but why "activity spaces" sort is different than Main.WebRss?)
> >
> >
> > Here some screenshots:
> > http://snag.gy/l6iQt.jpg
> > http://snag.gy/JwMVu.jpg
> >
> >
> > NB: I modified BlocCode to display 5 first lines of content blog post on
> Blog.WebHome if the blog post have an empty summary, do you interested?
>
> We used to have this and removed it since it causes too many problems. How
> can you ensure you’re cutting at some place that doesn’t cause a problem
> when rendered?
>
> Thanks
> -Vincent
>
>
> ___
> 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] [Discussion] What trees would you like to see in the XWiki garden?

2014-09-30 Thread Jeremie BOUSQUET
Hi,

As I started investigating on Hierarchy Macro and Dynamic Hierarchy Macro
(after reading this thread), I have some feedbacks that I didn't find in
the list of JIRA issues. They mostly relate to trying to display a tree of
a whole wiki structure:
- "excludes": it would be nice to allow patterns here. Usually I don't want
to filter out a space (though it can be useful), or a list of pages full
names, but I want to exclude "*.WebPreferences" for example. Maybe with
issue of not showing hidden documents, the need for this is not important.
- "onlyroots": maybe something similar to the {{toc/}} macro param "depth"
would be even more useful (and you would set "depth=1" for an equivalent to
"onlyroots")
- "displayvalue": really only nice-to-have, but instead of choosing a value
one could like to specify a pattern, for example "${displayTitle}
(${fullName})"
- if you choose "displayvalue=displayTitle", and a document has an empty
title, it shows an empty entry. Could be nice to fall back to doc.fullName
for example in this case. Same for "displayvalue=title" I suppose.
- "defaultparent": if it's highly recommended to set a value when tree is
editable, I would either set a default value (like "Main.WebHome"), either
refuse to drop documents at root if not set (or display a warning "you are
about to create an orphan")
- the Dynamic hierarchy macro scales better than the Hierarchy macro, but
still there's an issue if there are too many entries at one level, which in
my case prevents really using it at wiki scope or as a "space panel" as I
have several spaces with many documents. If it's in a panel and you land on
one of those spaces, the panel will never show up, and it will eat many
resources server-side to not display anything at the end. Would be nice to
introduce something similar to the solr facets, ie if there are too many
items at a level load the first 10, and clicking on "..." loads next 10,
etc (or have a configurable "maxitemsperlevel" param instead of 10).

If you feel some JIRAs would be interesting out of these, tell me and I can
create them,

BR,
Jeremie


2014-09-25 15:56 GMT+02:00 Dmitry Bakbardin :

>
> Hi, Marius!
> I would add also
> wiki > space > page > [anchor in a page]
> in the WYSIWYG editor.
> + one more vote for:
> 1. wiki > space > page > [translations | attachments | objects |
> classProperties] > object > objectProperties
> 2. parent page > child page
> I'm almost happy with this macro:
> http://extensions.xwiki.org/xwiki/bin/view/Extension/HierarchyMacro
> It has very important feature: EDITABLE tree - one can change order of
> pages in the tree and page's parent by moving it "up or down".
> I'm using it now as a "TOC" of space. This macro has few critical bugs,
> e.g.  http://jira.xwiki.org/browse/HIERARCHYM-5
> Also I'd be completely happy to have an option "Blacklisted pages list" in
> each and every tree/macro.
>
>
> Kind regards,
>
> Dmitry
>
>
> Thu, 25 Sep 2014 16:04:57 +0300 от Marius Dumitru Florea <
> mariusdumitru.flo...@xwiki.com>:
> >Hi guys,
> >
> >There are a couple of places in XWiki where we use trees to display
> >structured / hierarchical data. Are trees a good solution for data
> >visualization in those cases? Can those trees be improved? Are there
> >other places in XWiki where you would like to see a tree?
> >
> >Let me review some of the trees we currently have:
> >
> >1. Document Index Tree
> >
> >wiki > space > page > [attachments | page]
> >
> >This tree is also used in the WYSIWYG editor when you create a link to
> >a wiki page or to an attachment. It shows the spaces on the first
> >level and then under each space the parent-child hierarchy of
> >documents from that space. If a document has attachments then a
> >special child node is added. The tree can also display wikis on the
> >first level and then spaces on the second.
> >
> >So it mixes two hierarchies: wiki > space > page > attachment and
> >parent > child. This can be confusing. For instance Blog.WebHome has
> >Main.WebHome as parent, but you don't see Blog.WebHome under the
> >Main.WebHome node in the tree because it is in a different space.
> >
> >2. XAR Import
> >
> >space > page
> >
> >This is a very simple tree with only two levels. I don't have any
> >problem with it. Would be cool if it would show more information, like
> >attachments or objects, but it's a bit more complex to get this kind
> >of data from the XAR without reading the documents first.
> >
> >3. Dynamic Hierarchy Macro (
> >
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Dynamic+Hierarchy+Macro
> >)
> >
> >parent page > child page
> >
> >Unlike the Document Index Tree, this tree uses only the parent-child
> >hierarchy. You don't see the spaces but at least you get the full
> >parent-child hierarchy. This time Blog.WebHome is a child of the
> >Main.WebHome node.
> >
> >I'm not sure it's better than the Document Index Tree, at least not on
> >the default XWiki documents, maybe because the document titles and the
> >wa

Re: [xwiki-users] About question mark and FAQ

2014-09-26 Thread Jeremie BOUSQUET
Hi,

I didn't find how to put a non-breaking space (by the way why not " "
?) in the title, at least I know how to insert a (breaking) space before
the '?' :

${doc.title.replaceAll("(.*[^ ])[?]$", "$1 ?")}



BR,
Jeremie

2014-09-26 16:08 GMT+02:00 Pascal BASTIEN :

> Yes it doesn't work because my html code is not intepreted.
> JS seem too heavy for a tiny space. (but big boss) :-)
>
>
> Thank you.
>
>
>
> 
>  De : Leonardo Kodato 
> À : Pascal BASTIEN ; XWiki Users  >
> Envoyé le : Vendredi 26 septembre 2014 16h03
> Objet : Re: [xwiki-users] About question mark and FAQ
>
>
>
> Hi Pascal.
>
> Have you tried to edit the FAQCode.FAQSheet title and insert a
> non-breaking space right before "?"?
>
>
> I don't think it would be possible using CSS, but maybe using
> Javascript(I'm not a javascript expert).
>
>
> Regards,
>
> Leonardo.
>
>
>
> 2014-09-26 9:11 GMT-03:00 Pascal BASTIEN :
>
>
>
> Hello,
> >
> >(My french boss) noticed than a space character missing between question
> mark and text in FAQ application...
> >
> >Rather to modify the code, do you think there is a  way to fix it with
> CSS?
> >
> >Note: I wanted fix it on Xwiki then I looking for typographical rules
> about that but I didn't found an authoritative source... :-/
> >
> >
> http://english.stackexchange.com/questions/14003/any-authoritative-source-on-british-rules-on-space-before-question-mark
> >
> >
> http://www.sdbcompany.com/index.php?option=com_content&view=article&id=59&Itemid=53
> => "Question mark (?): General rule: non-breaking space before the question
> mark and space after."
> >
> >http://en.wikipedia.org/wiki/Question_mark#Stylistic_variants => "French
> usage must include a non-breaking space before the question mark (for
> example, "Que voulez-vous boire ?"), whereas in the English language
> orthography no space is allowed in front of the question mark (e.g. "What
> do you drink?")"
> >
> >
> >Pascal B.
> >___
> >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] Contribution pain points

2014-09-02 Thread Jeremie BOUSQUET
2014-09-02 17:01 GMT+02:00 Pascal BASTIEN :

> << Add  support to EM>>
> ...
>
> (EM: Extension manager I suppose)
> scm ? (╯_╰”)
>

Software Configuration Management, so in this case github for example ;-)


>
> Thanks you (and sorry for the noise :-/)
>
>
>
>
> 
>  De : Thomas Mortagne 
> À : XWiki Users 
> Envoyé le : Lundi 1 septembre 2014 16h50
> Objet : [xwiki-users] Contribution pain points
>
>
> Hi xwikiers,
>
> I started a page on
> http://dev.xwiki.org/xwiki/bin/view/Community/ContributingPainPoints
> to list ideas to make easier or encourage contributions to XWiki
> ecosystem.
>
> Feel create to add stuff there !
>
> The goal is to review it from time to time, there is already not very
> complicated stuff in there that can themself be done as contributions
> :)
>
> Thanks,
> --
> 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
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Are there a way to deactivate document versioning for all document in a particular space?

2014-09-02 Thread Jeremie BOUSQUET
Hello,

See in scripting guide [1] on how to display/hide some sections of the
page, including history.

That doesn't deactivate document versioning though, it would simply remove
the history tab from your sheet so users would not be able to restore older
versions.

To completely deactivate versioning see [2]

BR,
Jeremie

[1] -
http://platform.xwiki.org/xwiki/bin/view/DevGuide/Scripting#HControllingWhichSectionstoDisplay
[2] -
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Configuration#HDocumentversioning


2014-09-02 16:40 GMT+02:00 Pascal BASTIEN :

> Hello,
> Are there a way to deactivate document versioning for all document in a
> particular space?
>
> I'm writing a piece of Xwiki application: I indicate  my
> XWiki.ClassSheetBinding and in my sheet document I wanted to forbidden
> users to use revision tools in new entries/document (I want to prevent the
> user to restore an older version).
>
>
>
> Thxs
>
> Pascal B
> ___
> 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] Contribution pain points

2014-09-02 Thread Jeremie BOUSQUET
Hi,

I don't know if it's still an issue - that's why I didn't add it to your
page, but "make xwiki build work (easily) under windows environments" is
something that could help also.
I remember at a time, paths too long were making the build fail, for one of
the xwiki top projects.

But maybe since then it was solved - or there's an easy workaround.

I don't know if many of us are under windows environments, but at least
it's my case ;)

On another side, adding  support to EM and extension importer would be
really great.
It's sometimes painful to retrieve where are located the sources of a
specific module listed in EM.

BR,
Jeremie


2014-09-01 16:50 GMT+02:00 Thomas Mortagne :

> Hi xwikiers,
>
> I started a page on
> http://dev.xwiki.org/xwiki/bin/view/Community/ContributingPainPoints
> to list ideas to make easier or encourage contributions to XWiki
> ecosystem.
>
> Feel create to add stuff there !
>
> The goal is to review it from time to time, there is already not very
> complicated stuff in there that can themself be done as contributions
> :)
>
> Thanks,
> --
> 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] Pärse groovy with jars

2014-08-27 Thread Jeremie BOUSQUET
Hi Thomas,

Le 27 août 2014 10:43, "Thomas Mortagne"  a
écrit :
>
> And you really don't want to install those jars as extensions ?
>

What I'm not fond of, is that they would be added to the classloader
globally though their use will be very limited. Also those are not
currently available in a maven repo because of licensing, and I'd have to
manage this in my own repo.
But, why not.

>
> The jars parameter of the script macro is not really nice for
> performance as it create a new classloader and reload those jar each
> time you execute the macro.
>
> An alternative is to use Groovy @Grab feature, see
> http://groovy.codehaus.org/Grape.

Yes I thought about it also.
I'll see how I 'll manage this, thanks everyone !

>
> On Sat, Aug 16, 2014 at 10:42 PM, vinc...@massol.net 
wrote:
> >
> >
> >
> >
> > On 16 Aug 2014 at 22:31:24, Jeremie BOUSQUET (jeremie.bousq...@gmail.com
(mailto:jeremie.bousq...@gmail.com)) wrote:
> >
> >>
> >> Hi Vincent,
> >> Le 16 août 2014 21:42, "vinc...@massol.net(mailto:vinc...@massol.net)"
a écrit :
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > On 5 Aug 2014 at 15:48:27, Jeremie BOUSQUET (
jeremie.bousq...@gmail.com(mailto:jeremie.bousq...@gmail.com)(mailto:
jeremie.bousq...@gmail.com)) wrote:
> >> >
> >> > > Hello XWiki Community,
> >> > >
> >> > > Got some issue with executing groovy in a page ...
> >> > >
> >> > > I have a page with a groovy class, that needs some jars
dependencies.
> >> > > The following "works":
> >> > >
> >> > > {{groovy jars="attach:toto.jar,..."}}
> >> > >
> >> > > import ...
> >> > >
> >> > > public class MyClass {
> >> > > ...
> >> > > }
> >> > >
> >> > > def myobj = new MyClass()
> >> > > // do something with myobj ...
> >> > > {{/groovy}}
> >> > >
> >> > > Then I'd like to execute this code from another page.
> >> > > So I removed the {{groovy}} macro tags and the isolated code at
the end,
> >> > > leaving only the class declaration and imports.
> >> > > From the other page I use the following version of
parseGroovyFromPage:
> >> > >
http://maven.xwiki.org/site/docs/xwiki-javadoc-4.1.x/com/xpn/xwiki/api/XWiki.html#parseGroovyFromPage(java.lang.String,%20java.lang.String)
> >> >
> >> > Why not keep the {{groovy}} macro and instead use {{include
reference=“…”/}} from the calling page? Using parseGroovyFromPage is the
old way of doing it.
> >>
> >>
> >> Right, but in a scheduler job I can only put groovy, not wiki syntax,
isn't it ?
> >
> > Indeed, something we really need to fix… You could still render a page
using $doc.getRenderedContent() from a scheduler job and use wiki syntax
2.x in that page ;)
> >
> > Thanks
> > -Vincent
> >
> >> > Thanks
> >> > -Vincent
> >> >
> >> > > I provide it with the name of the page containing my groovy class,
twice
> >> > > (once for the script and once for the jars).
> >> > > It results in a page loading infinitely until it time-outs ...
From the
> >> > > logs it seems my class never gets executed.
> >> > >
> >> > > Any idea ?
> >> > >
> >> > > Note: I think it's a "crappy" method, and I plan to put this as a
java
> >> > > component, but in a "proof of concept" stage the groovy script is
very
> >> > > useful.
> >> > >
> >> > > Thanks,
> >> > > Jeremie
> >>
> >>
> >>
> >>
> >
> >
> > ___
> > 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] Write to logger using Velocity

2014-08-26 Thread Jeremie BOUSQUET
Yes, quoting Vincent Massol above : "Since XWiki 6.1" ;-)
See also here:
http://extensions.xwiki.org/xwiki/bin/view/Extension/Logging+Module#HGetaLoggerfromscript

So for < 6.1, I think there must be a solution but right now I don't know
...


2014-08-26 17:25 GMT+02:00 Jason Clemons :

> This is something new to 6.1?  I'm not on 6.1 yet, maybe that's why?
>
> > On Aug 26, 2014, at 8:21 AM, "Jeremie BOUSQUET" <
> jeremie.bousq...@gmail.com> wrote:
> >
> > 2014-08-26 17:08 GMT+02:00 Jason Clemons :
> >
> >> So sorry, but one more question..since I'm new to Xwiki, and all of it's
> >> underlying architecture (I'm a .net guy) I'm sure this is something that
> >> I'm doing wrong, but I figured I'd ask.
> >>
> >> When I copy and paste the code you provided below into a page (in the
> >> "source" section)  the page and the script section renders without
> error on
> >> the page, but the output literally says "$logger.info("foobar")" on the
> >> page.
> >>
> >> I would expect no visible output, but to see a log entry, am I missing
> >> something?
> >
> > Same for me, that's why it's bad to provide samples without actually
> > testing them :)
> >
> > In fact I don't see any "getLogger" method in $services.logging, which
> you
> > can check in the Scripting Reference page [1].
> >
> > Double-checking myself, it's normal in my case as Vincent it was added in
> > 6.1, and I'm not in 6.1, so nothing abnormal here ...
> >
> > In your case if you are on 6.1 and it doesn't work, I would suspect that
> > maybe you copy-pasted this code into a page in wysiwyg editor instead of
> > wiki editor.
> > If you have wysiwyg by default and you're not an advanced user, you can
> > choose insert / macro, choose the "velocity" macro, and enter the content
> > between {{velocity}} in the macro content.
> > Or you can switch to advanced user and/or wiki editor (sorry, miss time
> to
> > find the urls in xwiki.org ;-) )
> >
> >
> > [1] - http://platform.xwiki.org/xwiki/bin/view/SRD/Navigation
> >
> >
> >
> >>
> >>>> On Aug 26, 2014, at 7:39 AM, "Jason Clemons" 
> >>> wrote:
> >>>
> >>> That's why I said "forgive my ignorance" in my previous email :)
> >>>
> >>> I was thrown off by defining the "informative name".  Is that a
> >> persistent value once defined? Or is just something that gets added to
> the
> >> log entry?
> >>>
> >>>> On Aug 25, 2014, at 11:28 PM, "Jeremie BOUSQUET" <
> >> jeremie.bousq...@gmail.com> wrote:
> >>>>
> >>>> Hello,
> >>>>
> >>>> {{velocity}}
> >>>> #set($logger = $services.logging.getLogger("My script"))
> >>>>
> >>>> $logger.info("foobar")
> >>>>
> >>>> {{/velocity}}
> >>>>
> >>>>
> >>>> This is exactly what is on the page linked by Vincent, just with a
> more
> >>>> similar "look" to your own sample.
> >>>> "My script" is just an informative name of the logger you create. You
> >> could
> >>>> use $doc.name for instance.
> >>>>
> >>>> It's not much more complex, and it's really more clean than
> >>>> System.out.println ;-)
> >>>>
> >>>> BR,
> >>>> Jeremie
> >>>>
> >>>>
> >>>> 2014-08-25 19:33 GMT+02:00 Jason Clemons :
> >>>>
> >>>>> Thanks again for taking time to respond, forgive my ignorance..I
> still
> >>>>> don't really "get it" could you possibly show me an example of the
> >> syntax
> >>>>> for writing to the logs from within my Velocity code?  In groovy I
> can
> >>>>> simply write:
> >>>>>
> >>>>> {{groovy}}
> >>>>> System.out.println("foobar")
> >>>>> {{/groovy}}
> >>>>>
> >>>>> I'm just having an issue figuring out the velocity equivalent...
> >>>>>
> >>>>>
> >>>>>>> On Aug 25, 2014, at 9:56 AM, "vinc...@massol.net" <
> >> vinc...@mass

Re: [xwiki-users] Write to logger using Velocity

2014-08-26 Thread Jeremie BOUSQUET
2014-08-26 17:08 GMT+02:00 Jason Clemons :

> So sorry, but one more question..since I'm new to Xwiki, and all of it's
> underlying architecture (I'm a .net guy) I'm sure this is something that
> I'm doing wrong, but I figured I'd ask.
>
> When I copy and paste the code you provided below into a page (in the
> "source" section)  the page and the script section renders without error on
> the page, but the output literally says "$logger.info("foobar")" on the
> page.
>
> I would expect no visible output, but to see a log entry, am I missing
> something?
>

Same for me, that's why it's bad to provide samples without actually
testing them :)

In fact I don't see any "getLogger" method in $services.logging, which you
can check in the Scripting Reference page [1].

Double-checking myself, it's normal in my case as Vincent it was added in
6.1, and I'm not in 6.1, so nothing abnormal here ...

In your case if you are on 6.1 and it doesn't work, I would suspect that
maybe you copy-pasted this code into a page in wysiwyg editor instead of
wiki editor.
If you have wysiwyg by default and you're not an advanced user, you can
choose insert / macro, choose the "velocity" macro, and enter the content
between {{velocity}} in the macro content.
Or you can switch to advanced user and/or wiki editor (sorry, miss time to
find the urls in xwiki.org ;-) )


[1] - http://platform.xwiki.org/xwiki/bin/view/SRD/Navigation



>
> > On Aug 26, 2014, at 7:39 AM, "Jason Clemons" 
> wrote:
> >
> > That's why I said "forgive my ignorance" in my previous email :)
> >
> > I was thrown off by defining the "informative name".  Is that a
> persistent value once defined? Or is just something that gets added to the
> log entry?
> >
> >> On Aug 25, 2014, at 11:28 PM, "Jeremie BOUSQUET" <
> jeremie.bousq...@gmail.com> wrote:
> >>
> >> Hello,
> >>
> >> {{velocity}}
> >> #set($logger = $services.logging.getLogger("My script"))
> >>
> >> $logger.info("foobar")
> >>
> >> {{/velocity}}
> >>
> >>
> >> This is exactly what is on the page linked by Vincent, just with a more
> >> similar "look" to your own sample.
> >> "My script" is just an informative name of the logger you create. You
> could
> >> use $doc.name for instance.
> >>
> >> It's not much more complex, and it's really more clean than
> >> System.out.println ;-)
> >>
> >> BR,
> >> Jeremie
> >>
> >>
> >> 2014-08-25 19:33 GMT+02:00 Jason Clemons :
> >>
> >>> Thanks again for taking time to respond, forgive my ignorance..I still
> >>> don't really "get it" could you possibly show me an example of the
> syntax
> >>> for writing to the logs from within my Velocity code?  In groovy I can
> >>> simply write:
> >>>
> >>> {{groovy}}
> >>> System.out.println("foobar")
> >>> {{/groovy}}
> >>>
> >>> I'm just having an issue figuring out the velocity equivalent...
> >>>
> >>>
> >>>>> On Aug 25, 2014, at 9:56 AM, "vinc...@massol.net" <
> vinc...@massol.net>
> >>>> wrote:
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>> On 25 Aug 2014 at 18:26:28, Jason Clemons (jason.clem...@live.com
> >>> (mailto:jason.clem...@live.com)) wrote:
> >>>>>
> >>>>> Thanks for the response Vincent, I did see this article, but I'm
> having
> >>> trouble figuring out how to implement it. Ultimately, I just want the
> >>> equivalent of "Console.Log('foobar');" for some debugging code. I don't
> >>> want to setup a full blown logging architecture or anything heavy for
> my
> >>> wiki. Is there some simple example on the link you provided that I'm
> not
> >>> interpreting correctly?
> >>>>
> >>>> If you’re inside XWiki then you already have logging configured!
> There’s
> >>> nothing to do except use it as show in the link I gave. Which is
> exactly
> >>> the equivalent of "Console.Log('foobar');”.
> >>>>
> >>>> Thanks
> >>>> -Vincent
> >>>>
> >>>>>> On Aug 25, 2014, at 9:18 AM, "vinc.

Re: [xwiki-users] Write to logger using Velocity

2014-08-26 Thread Jeremie BOUSQUET
2014-08-26 16:39 GMT+02:00 Jason Clemons :

> That's why I said "forgive my ignorance" in my previous email :)
>
> I was thrown off by defining the "informative name".  Is that a persistent
> value once defined? Or is just something that gets added to the log entry?
>

That's something that may get added to the log entries, but I didn't check
so I'm not sure it's done by default ...


>
> > On Aug 25, 2014, at 11:28 PM, "Jeremie BOUSQUET" <
> jeremie.bousq...@gmail.com> wrote:
> >
> > Hello,
> >
> > {{velocity}}
> > #set($logger = $services.logging.getLogger("My script"))
> >
> > $logger.info("foobar")
> >
> > {{/velocity}}
> >
> >
> > This is exactly what is on the page linked by Vincent, just with a more
> > similar "look" to your own sample.
> > "My script" is just an informative name of the logger you create. You
> could
> > use $doc.name for instance.
> >
> > It's not much more complex, and it's really more clean than
> > System.out.println ;-)
> >
> > BR,
> > Jeremie
> >
> >
> > 2014-08-25 19:33 GMT+02:00 Jason Clemons :
> >
> >> Thanks again for taking time to respond, forgive my ignorance..I still
> >> don't really "get it" could you possibly show me an example of the
> syntax
> >> for writing to the logs from within my Velocity code?  In groovy I can
> >> simply write:
> >>
> >> {{groovy}}
> >> System.out.println("foobar")
> >> {{/groovy}}
> >>
> >> I'm just having an issue figuring out the velocity equivalent...
> >>
> >>
> >>>> On Aug 25, 2014, at 9:56 AM, "vinc...@massol.net"  >
> >>> wrote:
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>> On 25 Aug 2014 at 18:26:28, Jason Clemons (jason.clem...@live.com
> >> (mailto:jason.clem...@live.com)) wrote:
> >>>>
> >>>> Thanks for the response Vincent, I did see this article, but I'm
> having
> >> trouble figuring out how to implement it. Ultimately, I just want the
> >> equivalent of "Console.Log('foobar');" for some debugging code. I don't
> >> want to setup a full blown logging architecture or anything heavy for my
> >> wiki. Is there some simple example on the link you provided that I'm not
> >> interpreting correctly?
> >>>
> >>> If you’re inside XWiki then you already have logging configured!
> There’s
> >> nothing to do except use it as show in the link I gave. Which is exactly
> >> the equivalent of "Console.Log('foobar');”.
> >>>
> >>> Thanks
> >>> -Vincent
> >>>
> >>>>> On Aug 25, 2014, at 9:18 AM, "vinc...@massol.net" wrote:
> >>>>>
> >>>>>
> >>>>>> On 25 Aug 2014 at 18:02:12, Jason Clemons (jason.clem...@live.com
> >> (mailto:jason.clem...@live.com)) wrote:
> >>>>>>
> >>>>>> Hello, can someone please give me an example of how to write to a
> log
> >> using Velocity code?
> >>>>>>
> >>>>>> I'd really like to write a text file, but at this point any logging
> >> would be tremendously helpful, thanks
> >>>>>
> >>>>> Since XWiki 6.1:
> >>
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Logging+Module#HScripting
> >>>>>
> >>>>> Thanks
> >>>>> -Vincent
> >>> ___
> >>> 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
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Write to logger using Velocity

2014-08-25 Thread Jeremie BOUSQUET
Hello,

{{velocity}}
#set($logger = $services.logging.getLogger("My script"))

$logger.info("foobar")

{{/velocity}}


This is exactly what is on the page linked by Vincent, just with a more
similar "look" to your own sample.
"My script" is just an informative name of the logger you create. You could
use $doc.name for instance.

It's not much more complex, and it's really more clean than
System.out.println ;-)

BR,
Jeremie


2014-08-25 19:33 GMT+02:00 Jason Clemons :

> Thanks again for taking time to respond, forgive my ignorance..I still
> don't really "get it" could you possibly show me an example of the syntax
> for writing to the logs from within my Velocity code?  In groovy I can
> simply write:
>
> {{groovy}}
> System.out.println("foobar")
> {{/groovy}}
>
> I'm just having an issue figuring out the velocity equivalent...
>
>
> > On Aug 25, 2014, at 9:56 AM, "vinc...@massol.net" 
> wrote:
> >
> >
> >
> >
> >
> >> On 25 Aug 2014 at 18:26:28, Jason Clemons (jason.clem...@live.com
> (mailto:jason.clem...@live.com)) wrote:
> >>
> >> Thanks for the response Vincent, I did see this article, but I'm having
> trouble figuring out how to implement it. Ultimately, I just want the
> equivalent of "Console.Log('foobar');" for some debugging code. I don't
> want to setup a full blown logging architecture or anything heavy for my
> wiki. Is there some simple example on the link you provided that I'm not
> interpreting correctly?
> >
> > If you’re inside XWiki then you already have logging configured! There’s
> nothing to do except use it as show in the link I gave. Which is exactly
> the equivalent of "Console.Log('foobar');”.
> >
> > Thanks
> > -Vincent
> >
> >>> On Aug 25, 2014, at 9:18 AM, "vinc...@massol.net" wrote:
> >>>
> >>>
>  On 25 Aug 2014 at 18:02:12, Jason Clemons (jason.clem...@live.com
> (mailto:jason.clem...@live.com)) wrote:
> 
>  Hello, can someone please give me an example of how to write to a log
> using Velocity code?
> 
>  I'd really like to write a text file, but at this point any logging
> would be tremendously helpful, thanks
> >>>
> >>> Since XWiki 6.1:
> >>>
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Logging+Module#HScripting
> >>>
> >>> Thanks
> >>> -Vincent
> > ___
> > 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] $xwiki.getDocument don't work with dot ?

2014-08-19 Thread Jeremie BOUSQUET
Hello,

If you're in a component and your objective is to get a DocumentReference,
you could use the DocumentReferenceResolver instead:

 import org.xwiki.model.reference.DocumentReferenceResolver;

 // ...

 @Inject
 private DocumentReferenceResolver docResolver;

For the dots issue, I didn't test but I think you can escape those that
should not count, like:

$xwiki.getDocument("MySpace.My\.Dot")

By default it would consider the last '.' dot as the space/page separator.

BR,
Jeremie




2014-08-19 15:06 GMT+02:00 Pascal BASTIEN :

> Hello,
>
> I try to obtain  DocumentReference from space name and page name with
> getDocument(String space, String fullname)
> Parameters:
> space - Space to use in case no space is defined in the provided
> fullname
> fullname - the full name or relative name of the document to load
>
> but is doesn't work with dot in document name...
>
> My example:
> document $xwiki.getDocument("MySpace",'My.Dot').getDocumentReference()
> return xwiki:My.Dot rather than xwiki:MySpace.My\.Dot
> and
> document
> $xwiki.getDocument("MySpace",'MySpace.My.Dot').getDocumentReference()
> return xwiki:MySpace\.My.Dot :-/
>
>
> Any idea how I can obtain DocumentReference?
> (use a regexp seem to be heavy way :-) )
>
>
> Thxs
> ___
> 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] Pärse groovy with jars

2014-08-16 Thread Jeremie BOUSQUET
Hi Vincent,
Le 16 août 2014 21:42, "vinc...@massol.net"  a écrit :
>
>
>
>
>
> On 5 Aug 2014 at 15:48:27, Jeremie BOUSQUET (jeremie.bousq...@gmail.com
(mailto:jeremie.bousq...@gmail.com)) wrote:
>
> > Hello XWiki Community,
> >
> > Got some issue with executing groovy in a page ...
> >
> > I have a page with a groovy class, that needs some jars dependencies.
> > The following "works":
> >
> > {{groovy jars="attach:toto.jar,..."}}
> >
> > import ...
> >
> > public class MyClass {
> > ...
> > }
> >
> > def myobj = new MyClass()
> > // do something with myobj ...
> > {{/groovy}}
> >
> > Then I'd like to execute this code from another page.
> > So I removed the {{groovy}} macro tags and the isolated code at the end,
> > leaving only the class declaration and imports.
> > From the other page I use the following version of parseGroovyFromPage:
> >
http://maven.xwiki.org/site/docs/xwiki-javadoc-4.1.x/com/xpn/xwiki/api/XWiki.html#parseGroovyFromPage(java.lang.String,%20java.lang.String)
>
> Why not keep the {{groovy}} macro and instead use {{include
reference=“…”/}} from the calling page? Using parseGroovyFromPage is the
old way of doing it.

Right, but in a scheduler job I can only put groovy, not wiki syntax, isn't
it ?

>
> Thanks
> -Vincent
>
> > I provide it with the name of the page containing my groovy class, twice
> > (once for the script and once for the jars).
> > It results in a page loading infinitely until it time-outs ... From the
> > logs it seems my class never gets executed.
> >
> > Any idea ?
> >
> > Note: I think it's a "crappy" method, and I plan to put this as a java
> > component, but in a "proof of concept" stage the groovy script is very
> > useful.
> >
> > Thanks,
> > Jeremie
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Wiki page seems to have two parents?

2014-08-12 Thread Jeremie BOUSQUET
Hi,


2014-08-12 14:28 GMT+02:00 Hamster :

> Hi Marius,
>
> Thanks for your reply.
>
> Even if I set the page parent to something else, that change is not saved,
> and the page then refers to itself as its parent.
>
> And what about the "permanent delete" issue? If I delete a page, you will
> get a page saying that the page has been moved to the recyclebin. That page
> offer two options, (1) restore or (2) remove. If I select option 2, the
> page
> should be removed permanently, but instead a new blank page is created.
>

Normally in this case, you stay on the same page url, so on a page that
does not exist anymore.
So you should normally be proposed with a page saying "The requested
document could not be found. You can edit this page
 to create it"
This is not a blank page, until you click on "edit this page" then save it.
If there really is a blank page created after you removed it, then it is
weird ...


>
> Any insight into this matter is appreciated, as I have no clue what is
> going
> on!
>
> Thanks.
>
>
>
> --
> View this message in context:
> http://xwiki.475771.n2.nabble.com/Wiki-page-seems-to-have-two-parents-tp7591348p7591639.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
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Pärse groovy with jars

2014-08-05 Thread Jeremie BOUSQUET
Hello XWiki Community,

Got some issue with executing groovy in a page ...

I have a page with a groovy class, that needs some jars dependencies.
The following "works":

{{groovy jars="attach:toto.jar,..."}}

import ...

public class MyClass {
...
}

def myobj = new MyClass()
// do something with myobj ...
{{/groovy}}

Then I'd like to execute this code from another page.
So I removed the {{groovy}} macro tags and the isolated code at the end,
leaving only the class declaration and imports.
>From the other page I use the following version of parseGroovyFromPage:
http://maven.xwiki.org/site/docs/xwiki-javadoc-4.1.x/com/xpn/xwiki/api/XWiki.html#parseGroovyFromPage(java.lang.String,%20java.lang.String)

I provide it with the name of the page containing my groovy class, twice
(once for the script and once for the jars).
It results in a page loading infinitely until it time-outs ... From the
logs it seems my class never gets executed.

Any idea ?

Note: I think it's a "crappy" method, and I plan to put this as a java
component, but in a "proof of concept" stage the groovy script is very
useful.

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


Re: [xwiki-users] How to check $xcontext.get(xxxx) is empty?

2014-08-01 Thread Jeremie BOUSQUET
By the way, realizing something, if your objective is to call a macro from
velocity to "reinitialize a sandbox", with passing parameters, why don't
you just make it a velocity macro ???

In your SandboxTemplate.ReinitSandboxMacro :

#macro (reinitSandbox $source $target $doCleanup)
 ## ... your macro code ...
#end

And in your scheduler script:

{{include reference="SandboxTemplate.ReinitSandboxMacro"/}}

...

#reinitSandbox "space1" "space2" "true"

You could even make it a wiki macro [1] ...

[1] - http://platform.xwiki.org/xwiki/bin/view/DevGuide/WikiMacroTutorial



2014-08-01 16:30 GMT+02:00 Jeremie BOUSQUET :

>
>
>
> 2014-08-01 16:26 GMT+02:00 Jeremie BOUSQUET :
>
> Hi,
>>
>>
>> 2014-08-01 15:42 GMT+02:00 Pascal BASTIEN :
>>
>> Yes, my scheduler can contain:  xcontext.put("DoCleanup", "true")
>>>
>>>
>>> xwiki.getDocument("SandboxTemplate.ReinitSandboxMacro").getRenderedContent()
>>> or this
>>>   xcontext.put("source", "SpaceTemplate")
>>>   xcontext.put("DoCleanup", "true")
>>>
>>> xwiki.getDocument("SandboxTemplate.ReinitSandboxMacro").getRenderedContent()
>>>
>>> or
>>>   xcontext.put("source", "SpaceTemplate")
>>>   xcontext.put("target", "SpaceToDeleteAndOverwrite")
>>>   xcontext.put("DoCleanup", "true")
>>>
>>> xwiki.getDocument("SandboxTemplate.ReinitSandboxMacro").getRenderedContent()
>>>
>>>
>> I would maybe try to replace the "...getRenderedContent()" by an include
>> macro [1] like:
>>
>> {{include reference="SandboxTemplate.ReinitSandboxMacro"/}}
>>
>> include macro renders the document in same context as container document.
>>
>> [1] - http://extensions.xwiki.org/xwiki/bin/view/Extension/Include+Macro
>>
>>
>>>
>>> And my SandboxTemplate.ReinitSandboxMacro contain this velocity scipt:
>>>
>>> #if ($request.get('source') != $null)
>>>
>>
>> If from outside you use "$xcontext.put", you can't expect it to be
>> available from "$request.get" ;-)
>>  You should use "$xcontext.get" here instead.
>>
>>
>>>   #set ($Source = "$request.get('source')")
>>> #else
>>>   #set ($Source =  "SandboxTemplate")
>>> #end
>>>
>>> #if ($request.get('target') != $null)
>>>   #set ($Target = "$request.get('target')")
>>> #else
>>>  #set ($Target =  "Sandbox")
>>> #end
>>>
>>> #if ($request.confirm == 'true' || $xcontext.get("docleanup") == 'true')
>>>
>>>
>> From where would come this "confirm" request param ?
>> From a scheduler job there will not be such request parameter ... unless
>> you don't talk about the xwiki Scheduler ? [2]
>>
>> [2] -
>> http://extensions.xwiki.org/xwiki/bin/view/Extension/Scheduler+Application
>>
>>
>>>
>>> =>My script is launch
>>>
>>> This test doesn't work
>>> #if (xcontext.get("source") != $null)
>>>
>>
>> Anyway you miss the '$' here --> "$xcontext.get("source") ..."
>> Personnally I usually prefer to write:
>>
>> #if ("$!xcontext.get('source')" != "")
>>
>> ... but it's a matter of taste...
>>
>
> Sorry, not only a matter of taste, that way you check at once if property
> is null OR empty string. Depends on what you need of course.
>
>
>>
>>
>>>   #set ($Source = "xcontext.get("source")")
>>> #else
>>>   #set ($Source =  "SandboxTemplate")
>>> #end
>>>
>>>
>>> To resume: I'm looking for a test to know if a xcontext.get("parameter")
>>> exist or not (in a velocity script)
>>>
>>>
>>>
>>>
>>> 
>>>  De : Thomas Mortagne 
>>> À : Pascal BASTIEN ; XWiki Users <
>>> users@xwiki.org>
>>> Envoyé le : Vendredi 1 août 2014 15h28
>>> Objet : Re: [xwiki-users] How to check $xcontext.get() is empty?
>>>
>>>
>>> It's not very clear how exactly are you executing this wiki content
>>

Re: [xwiki-users] How to check $xcontext.get(xxxx) is empty?

2014-08-01 Thread Jeremie BOUSQUET
2014-08-01 16:26 GMT+02:00 Jeremie BOUSQUET :

> Hi,
>
>
> 2014-08-01 15:42 GMT+02:00 Pascal BASTIEN :
>
> Yes, my scheduler can contain:  xcontext.put("DoCleanup", "true")
>>
>>
>> xwiki.getDocument("SandboxTemplate.ReinitSandboxMacro").getRenderedContent()
>> or this
>>   xcontext.put("source", "SpaceTemplate")
>>   xcontext.put("DoCleanup", "true")
>>
>> xwiki.getDocument("SandboxTemplate.ReinitSandboxMacro").getRenderedContent()
>>
>> or
>>   xcontext.put("source", "SpaceTemplate")
>>   xcontext.put("target", "SpaceToDeleteAndOverwrite")
>>   xcontext.put("DoCleanup", "true")
>>
>> xwiki.getDocument("SandboxTemplate.ReinitSandboxMacro").getRenderedContent()
>>
>>
> I would maybe try to replace the "...getRenderedContent()" by an include
> macro [1] like:
>
> {{include reference="SandboxTemplate.ReinitSandboxMacro"/}}
>
> include macro renders the document in same context as container document.
>
> [1] - http://extensions.xwiki.org/xwiki/bin/view/Extension/Include+Macro
>
>
>>
>> And my SandboxTemplate.ReinitSandboxMacro contain this velocity scipt:
>>
>> #if ($request.get('source') != $null)
>>
>
> If from outside you use "$xcontext.put", you can't expect it to be
> available from "$request.get" ;-)
> You should use "$xcontext.get" here instead.
>
>
>>   #set ($Source = "$request.get('source')")
>> #else
>>   #set ($Source =  "SandboxTemplate")
>> #end
>>
>> #if ($request.get('target') != $null)
>>   #set ($Target = "$request.get('target')")
>> #else
>>  #set ($Target =  "Sandbox")
>> #end
>>
>> #if ($request.confirm == 'true' || $xcontext.get("docleanup") == 'true')
>>
>>
> From where would come this "confirm" request param ?
> From a scheduler job there will not be such request parameter ... unless
> you don't talk about the xwiki Scheduler ? [2]
>
> [2] -
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Scheduler+Application
>
>
>>
>> =>My script is launch
>>
>> This test doesn't work
>> #if (xcontext.get("source") != $null)
>>
>
> Anyway you miss the '$' here --> "$xcontext.get("source") ..."
> Personnally I usually prefer to write:
>
> #if ("$!xcontext.get('source')" != "")
>
> ... but it's a matter of taste...
>

Sorry, not only a matter of taste, that way you check at once if property
is null OR empty string. Depends on what you need of course.


>
>
>>   #set ($Source = "xcontext.get("source")")
>> #else
>>   #set ($Source =  "SandboxTemplate")
>> #end
>>
>>
>> To resume: I'm looking for a test to know if a xcontext.get("parameter")
>> exist or not (in a velocity script)
>>
>>
>>
>>
>> 
>>  De : Thomas Mortagne 
>> À : Pascal BASTIEN ; XWiki Users <
>> users@xwiki.org>
>> Envoyé le : Vendredi 1 août 2014 15h28
>> Objet : Re: [xwiki-users] How to check $xcontext.get() is empty?
>>
>>
>> It's not very clear how exactly are you executing this wiki content
>> with Velocity in it ? Document#getRenderedContent call from Groovy ?
>>
>>
>> On Fri, Aug 1, 2014 at 3:16 PM, Pascal BASTIEN 
>> wrote:
>> > Hello,
>> >
>> > I have "some" difficulty with my groovy/velocity code:
>> > I manage to pass some parameter between my scheduler/groovy script to
>> my velocity code of my page but I need to check in my velocity code if my
>> parameter exist (or not).
>> >
>> http://maven.xwiki.org/site/docs/xwiki-javadoc-4.1.x/com/xpn/xwiki/api/Context.html#get%28java.lang.String%29
>> >
>> > By exemple, this code doesn't work:
>> > {{velocity}}
>> > #if ( $xcontext.get("DoCleanup")!=$null)
>> >   "DoCleanup" parameter doesn't exist
>> > #else
>> >   DoCleanup parameter from groovy code is $xcontext.get("DoCleanup")
>> > #end
>> > {{/velocity}}
>> >
>> >
>> http://maven.xwiki.org/site/docs/xwiki-javadoc-4.1.x/com/xpn/xwiki/api/Context.html#get%28java.lang.String%29
>> return null if user have PR :-(
>> >
>> > In fact, in my velocity code I need to detect who's launch the velocity
>> script: groovy code of scheduler or manually launch by the page containing
>> velocity code.
>> >
>> > Any idea how can I do?
>> > Thxs.
>> >
>> > Pascal B.
>> > ___
>> > 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] How to check $xcontext.get(xxxx) is empty?

2014-08-01 Thread Jeremie BOUSQUET
Hi,


2014-08-01 15:42 GMT+02:00 Pascal BASTIEN :

> Yes, my scheduler can contain:  xcontext.put("DoCleanup", "true")
>
>
> xwiki.getDocument("SandboxTemplate.ReinitSandboxMacro").getRenderedContent()
> or this
>   xcontext.put("source", "SpaceTemplate")
>   xcontext.put("DoCleanup", "true")
>
> xwiki.getDocument("SandboxTemplate.ReinitSandboxMacro").getRenderedContent()
>
> or
>   xcontext.put("source", "SpaceTemplate")
>   xcontext.put("target", "SpaceToDeleteAndOverwrite")
>   xcontext.put("DoCleanup", "true")
>
> xwiki.getDocument("SandboxTemplate.ReinitSandboxMacro").getRenderedContent()
>
>
I would maybe try to replace the "...getRenderedContent()" by an include
macro [1] like:

{{include reference="SandboxTemplate.ReinitSandboxMacro"/}}

include macro renders the document in same context as container document.

[1] - http://extensions.xwiki.org/xwiki/bin/view/Extension/Include+Macro


>
> And my SandboxTemplate.ReinitSandboxMacro contain this velocity scipt:
>
> #if ($request.get('source') != $null)
>

If from outside you use "$xcontext.put", you can't expect it to be
available from "$request.get" ;-)
You should use "$xcontext.get" here instead.


>   #set ($Source = "$request.get('source')")
> #else
>   #set ($Source =  "SandboxTemplate")
> #end
>
> #if ($request.get('target') != $null)
>   #set ($Target = "$request.get('target')")
> #else
>  #set ($Target =  "Sandbox")
> #end
>
> #if ($request.confirm == 'true' || $xcontext.get("docleanup") == 'true')
>
>
From where would come this "confirm" request param ?
From a scheduler job there will not be such request parameter ... unless
you don't talk about the xwiki Scheduler ? [2]

[2] -
http://extensions.xwiki.org/xwiki/bin/view/Extension/Scheduler+Application


>
> =>My script is launch
>
> This test doesn't work
> #if (xcontext.get("source") != $null)
>

Anyway you miss the '$' here --> "$xcontext.get("source") ..."
Personnally I usually prefer to write:

#if ("$!xcontext.get('source')" != "")

... but it's a matter of taste...


>   #set ($Source = "xcontext.get("source")")
> #else
>   #set ($Source =  "SandboxTemplate")
> #end
>
>
> To resume: I'm looking for a test to know if a xcontext.get("parameter")
> exist or not (in a velocity script)
>
>
>
>
> 
>  De : Thomas Mortagne 
> À : Pascal BASTIEN ; XWiki Users  >
> Envoyé le : Vendredi 1 août 2014 15h28
> Objet : Re: [xwiki-users] How to check $xcontext.get() is empty?
>
>
> It's not very clear how exactly are you executing this wiki content
> with Velocity in it ? Document#getRenderedContent call from Groovy ?
>
>
> On Fri, Aug 1, 2014 at 3:16 PM, Pascal BASTIEN 
> wrote:
> > Hello,
> >
> > I have "some" difficulty with my groovy/velocity code:
> > I manage to pass some parameter between my scheduler/groovy script to my
> velocity code of my page but I need to check in my velocity code if my
> parameter exist (or not).
> >
> http://maven.xwiki.org/site/docs/xwiki-javadoc-4.1.x/com/xpn/xwiki/api/Context.html#get%28java.lang.String%29
> >
> > By exemple, this code doesn't work:
> > {{velocity}}
> > #if ( $xcontext.get("DoCleanup")!=$null)
> >   "DoCleanup" parameter doesn't exist
> > #else
> >   DoCleanup parameter from groovy code is $xcontext.get("DoCleanup")
> > #end
> > {{/velocity}}
> >
> >
> http://maven.xwiki.org/site/docs/xwiki-javadoc-4.1.x/com/xpn/xwiki/api/Context.html#get%28java.lang.String%29
> return null if user have PR :-(
> >
> > In fact, in my velocity code I need to detect who's launch the velocity
> script: groovy code of scheduler or manually launch by the page containing
> velocity code.
> >
> > Any idea how can I do?
> > Thxs.
> >
> > Pascal B.
> > ___
> > 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] Refine searches by tag / Advanced search by tag

2014-07-30 Thread Jeremie BOUSQUET
Http://yourhost:port/xwiki/bin/view/Main/SolrSearchConfig

... Something around that ;-)
Le 30 juil. 2014 17:46, "Fabien Munoz"  a écrit :

> Yes I can see in the page that 'Solr Search UI can be found in
> Main.SolrSearchConfig' but I don't know where to find this
> Main.SolrSearchConfig page...
> Could you give me more details please ?
>
> Thanks in advance
>
>
> 2014-07-30 17:29 GMT+02:00 Jeremie BOUSQUET :
>
> > Hi,
> >
> > As defined here [1], you have to go to page Main.SolrSearchConfig.
> > Then you must edit it in "wiki" mode, and look after the 'facetFields'
> > configuration parameter.
> >
> > Side note: it might be nice to have a link to this page from the "Search"
> > admin section maybe, wdyt ?
> >
> > BR,
> > Jeremie
> >
> > [1] -
> >
> >
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Solr+Search+Application#HSearchUIConfiguration
> >
> >
> > 2014-07-30 16:58 GMT+02:00 Fabien Munoz :
> >
> > > Where can I configure the Solr Search UI to add a new facet for tags?
> > > I can see the kind of changes I have to make to add tags, but I don't
> > know
> > > where to implement them...
> > >
> >
> > > Thanks in advance,
> > >
> > >
> > > 2014-07-21 11:34 GMT+02:00 vinc...@massol.net :
> > >
> > > >
> > > >
> > > >
> > > >
> > > > On 21 Jul 2014 at 11:15:42, Marius Dumitru Florea (
> > > > mariusdumitru.flo...@xwiki.com(mailto:mariusdumitru.flo...@xwiki.com
> ))
> > > > wrote:
> > > >
> > > > > On Fri, Jul 18, 2014 at 10:30 PM, vinc...@massol.net wrote:
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On 18 Jul 2014 at 19:31:50, Jeremie BOUSQUET (
> > > > jeremie.bousq...@gmail.com(mailto:jeremie.bousq...@gmail.com))
> wrote:
> > > > > >
> > > > > >> 2014-07-18 18:01 GMT+02:00 Marius Dumitru Florea <
> > > > > >> mariusdumitru.flo...@xwiki.com>:
> > > > > >>
> > > > > >> > On Fri, Jul 18, 2014 at 5:29 PM, Jeremie BOUSQUET
> > > > > >> > wrote:
> > > > > >> > > Hello,
> > > > > >> > >
> > > > > >> > > I tried the sample show in [1], changing it to the
> following:
> > > > > >> > >
> > > > > >> > > #set ($queryStatement = 'property.XWiki.TagClass.tags:')
> > > > > >> > > #set ($query = $services.query.createQuery($queryStatement,
> > > > 'solr'))
> > > > > >> > > #set ($discard = $query.setLimit(10).setOffset(0))
> > > > > >> > > #set ($discard = $query.bindValue('sort', "score desc"))
> > > > > >> > > #set ($discard = $query.bindValue('fq', '{!q.op=AND}
> > > type:DOCUMENT
> > > > > >> > > locales:(en OR fr) hidden:false'))
> > > > > >> > > #set ($searchResponses = $query.execute()[0])
> > > > > >> > > $searchResponses
> > > > > >> > >
> > > > > >> > > I replaced "" by the name of a tag existing on some pages,
> > but I
> > > > > >> > > could never obtain search results with this sample ... And I
> > > > don't know
> > > > > >> > > what should be put in search field in UI to obtain something
> > > > equivalent.
> > > > > >> >
> > > > > >> > This works for me:
> > > > > >> >
> > > > > >> > property.XWiki.TagClass.tags:Development
> > > > > >> >
> > > > > >> > And the above code works too if I replace "" with
> > > > > >> > "Development". Of course, I've tagged a few documents with
> > > > > >> > Development.
> > > > > >> >
> > > > > >> > >
> > > > > >> > > There's also XWIKI-9413 [2] that seems to relate, but to be
> > > > honest, I'm a
> > > > > >> > > bit lost with how to use solr search and how it integrates
> > with
> > > > 

Re: [xwiki-users] Refine searches by tag / Advanced search by tag

2014-07-30 Thread Jeremie BOUSQUET
Hi,

As defined here [1], you have to go to page Main.SolrSearchConfig.
Then you must edit it in "wiki" mode, and look after the 'facetFields'
configuration parameter.

Side note: it might be nice to have a link to this page from the "Search"
admin section maybe, wdyt ?

BR,
Jeremie

[1] -
http://extensions.xwiki.org/xwiki/bin/view/Extension/Solr+Search+Application#HSearchUIConfiguration


2014-07-30 16:58 GMT+02:00 Fabien Munoz :

> Where can I configure the Solr Search UI to add a new facet for tags?
> I can see the kind of changes I have to make to add tags, but I don't know
> where to implement them...
>

> Thanks in advance,
>
>
> 2014-07-21 11:34 GMT+02:00 vinc...@massol.net :
>
> >
> >
> >
> >
> > On 21 Jul 2014 at 11:15:42, Marius Dumitru Florea (
> > mariusdumitru.flo...@xwiki.com(mailto:mariusdumitru.flo...@xwiki.com))
> > wrote:
> >
> > > On Fri, Jul 18, 2014 at 10:30 PM, vinc...@massol.net wrote:
> > > >
> > > >
> > > >
> > > >
> > > > On 18 Jul 2014 at 19:31:50, Jeremie BOUSQUET (
> > jeremie.bousq...@gmail.com(mailto:jeremie.bousq...@gmail.com)) wrote:
> > > >
> > > >> 2014-07-18 18:01 GMT+02:00 Marius Dumitru Florea <
> > > >> mariusdumitru.flo...@xwiki.com>:
> > > >>
> > > >> > On Fri, Jul 18, 2014 at 5:29 PM, Jeremie BOUSQUET
> > > >> > wrote:
> > > >> > > Hello,
> > > >> > >
> > > >> > > I tried the sample show in [1], changing it to the following:
> > > >> > >
> > > >> > > #set ($queryStatement = 'property.XWiki.TagClass.tags:')
> > > >> > > #set ($query = $services.query.createQuery($queryStatement,
> > 'solr'))
> > > >> > > #set ($discard = $query.setLimit(10).setOffset(0))
> > > >> > > #set ($discard = $query.bindValue('sort', "score desc"))
> > > >> > > #set ($discard = $query.bindValue('fq', '{!q.op=AND}
> type:DOCUMENT
> > > >> > > locales:(en OR fr) hidden:false'))
> > > >> > > #set ($searchResponses = $query.execute()[0])
> > > >> > > $searchResponses
> > > >> > >
> > > >> > > I replaced "" by the name of a tag existing on some pages, but I
> > > >> > > could never obtain search results with this sample ... And I
> > don't know
> > > >> > > what should be put in search field in UI to obtain something
> > equivalent.
> > > >> >
> > > >> > This works for me:
> > > >> >
> > > >> > property.XWiki.TagClass.tags:Development
> > > >> >
> > > >> > And the above code works too if I replace "" with
> > > >> > "Development". Of course, I've tagged a few documents with
> > > >> > Development.
> > > >> >
> > > >> > >
> > > >> > > There's also XWIKI-9413 [2] that seems to relate, but to be
> > honest, I'm a
> > > >> > > bit lost with how to use solr search and how it integrates with
> > xwiki,
> > > >> > so I
> > > >> > > won't be of much help I'm afraid ... :/ But I'm interested in
> the
> > answer
> > > >> > :)
> > > >> >
> > > >> > Besides what Jeremie has mentioned, there is also
> > > >> >
> > > >> >
> >
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Solr+Search+Application#HFacetingonObjectProperties
> > > >> > . You can configure the Solr Search UI to add a new facet for
> tags.
> > > >> > I've just added
> > > >> >
> > > >> > property.XWiki.TagClass.tags_string
> > > >> >
> > > >> > and it simply worked!
> > > >> >
> > > >>
> > > >> Worked for me too, that's really nice, thanks !
> > > >
> > >
> > > > And I’ve now documented this example at
> > > >
> >
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Solr+Search+Application#HFacetingonObjectProperties
> > >
> > > There was an example above for publishDate property of
> > > Blog.BlogPostClass but it wasn't very 

Re: [xwiki-users] about password and LDAP

2014-07-30 Thread Jeremie BOUSQUET
Hi,


2014-07-30 13:57 GMT+02:00 Clemens Klein-Robbenhaar <
c.robbenh...@espresto.com>:

>
> I do not know about the internals of the LDAP-stuff, but at least I know
> where the password is stroed in the DB :)
>
> > Hello,
> >
> > I have some questions (today :-) )
> >
> > - I wondered where is stored local users password?  More precisely in
> which table? I see that users are in xwikidoc table:
> http://platform.xwiki.org/xwiki/bin/view/DevGuide/DatabaseSchema (but not
> the password)
> > Note, I don't want reinitialize password (I know how to do it with
> superuser)
> >
>
> The password is a (string-valued) attribute of an object of class
> "XWikiUsers", which is attached to the profile page.
> you can see this if you look at any user profile in the object editor.
>
> In mySQLyou can see the stored passwords might look like:
>
>   select * from xwikiobjects join xwikistrings on xwikiobjects.XWO_ID =
> xwikistrings.XWS_ID where XWO_CLASSNAME='XWiki.XWikiUsers' and
> xwikistrings.XWS_NAME='password';
>
> Unless something is utterly wrong with your installation the passwords
> should be stored as SHA-hashes or the like.
>
> Note: In the DB schema the table xwikiproperties also appears between the
> xwikiobjects and the xwikistrings, but I have to admit I did not need it
> for the query.
> Maybe I did something wrong, in that case please someone correct me :)
>

If I'm right, xwikiproperties table mainly gives you the type of a specific
object field (like, StringProperty etc). If you already know it, you don't
need this table and you can directly query the needed xwiki table.


>
> HTH,
> Clemens
>
> > - If I use LDAP authentication, a copy of  user ldap password is stored
> in the database?
> >
> > - With ldap authentication, I filter members by ldap statics groups
> >
> > #-# Only members of the following group can authenticate.
> > xwiki.authentication.ldap.user_group=dn=_agents_,,dc=fr
> > _agents_ contain a static list of memberUID with name.surname
> >
> > I active log for ldap and I saw that for the first connexion by a ldap
> user, cache creation take 1mn
> > Apparently xwiki try to retrieve the dn for each member of the static
> group for generate his cache (~5 queries by member)
> > Of course, I increased xwiki.authentication.ldap.groupcache_expiration
> value
> >
> > Are there a way to refresh the ldap cache by cron or scheduled script?
> >
> > Thxs.
> >
> > Pascal B
> > ___
> > 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] Refine searches by tag / Advanced search by tag

2014-07-18 Thread Jeremie BOUSQUET
2014-07-18 18:01 GMT+02:00 Marius Dumitru Florea <
mariusdumitru.flo...@xwiki.com>:

> On Fri, Jul 18, 2014 at 5:29 PM, Jeremie BOUSQUET
>  wrote:
> > Hello,
> >
> > I tried the sample show in [1], changing it to the following:
> >
> > #set ($queryStatement = 'property.XWiki.TagClass.tags:')
> > #set ($query = $services.query.createQuery($queryStatement, 'solr'))
> > #set ($discard = $query.setLimit(10).setOffset(0))
> > #set ($discard = $query.bindValue('sort', "score desc"))
> > #set ($discard = $query.bindValue('fq', '{!q.op=AND} type:DOCUMENT
> > locales:(en OR fr) hidden:false'))
> > #set ($searchResponses = $query.execute()[0])
> > $searchResponses
> >
> > I replaced "" by the name of a tag existing on some pages, but I
> > could never obtain search results with this sample ... And I don't know
> > what should be put in search field in UI to obtain something equivalent.
>
> This works for me:
>
> property.XWiki.TagClass.tags:Development
>
> And the above code works too if I replace "" with
> "Development". Of course, I've tagged a few documents with
> Development.
>
> >
> > There's also XWIKI-9413 [2] that seems to relate, but to be honest, I'm a
> > bit lost with how to use solr search and how it integrates with xwiki,
> so I
> > won't be of much help I'm afraid ... :/ But I'm interested in the answer
> :)
>
> Besides what Jeremie has mentioned, there is also
>
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Solr+Search+Application#HFacetingonObjectProperties
> . You can configure the Solr Search UI to add a new facet for tags.
> I've just added
>
> property.XWiki.TagClass.tags_string
>
> and it simply worked!
>

Worked for me too, that's really nice, thanks !


>
> Hope this helps,
> Marius
>
> >
> > [1] -
> >
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Solr+Search+Query+API
> > [2] - http://jira.xwiki.org/browse/XWIKI-9413
> >
> >
> >
> > 2014-07-18 14:20 GMT+02:00 Fabien Munoz :
> >
> >> Hello,
> >>
> >> I would like to be able to refine searches in xwiki enterprise by tags
> as I
> >> already can by Spaces or wikis. How can I do that?
> >>
> >> Is there any way to do the same directly into the search input?
> Something
> >> like 'install  tag:linux' would search for the word 'install', on into
> >> pages tagged 'linux'.
> >>
> >> Thanks in advance,
> >> ___
> >> 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] Refine searches by tag / Advanced search by tag

2014-07-18 Thread Jeremie BOUSQUET
Hello,

I tried the sample show in [1], changing it to the following:

#set ($queryStatement = 'property.XWiki.TagClass.tags:')
#set ($query = $services.query.createQuery($queryStatement, 'solr'))
#set ($discard = $query.setLimit(10).setOffset(0))
#set ($discard = $query.bindValue('sort', "score desc"))
#set ($discard = $query.bindValue('fq', '{!q.op=AND} type:DOCUMENT
locales:(en OR fr) hidden:false'))
#set ($searchResponses = $query.execute()[0])
$searchResponses

I replaced "" by the name of a tag existing on some pages, but I
could never obtain search results with this sample ... And I don't know
what should be put in search field in UI to obtain something equivalent.

There's also XWIKI-9413 [2] that seems to relate, but to be honest, I'm a
bit lost with how to use solr search and how it integrates with xwiki, so I
won't be of much help I'm afraid ... :/ But I'm interested in the answer :)

[1] -
http://extensions.xwiki.org/xwiki/bin/view/Extension/Solr+Search+Query+API
[2] - http://jira.xwiki.org/browse/XWIKI-9413



2014-07-18 14:20 GMT+02:00 Fabien Munoz :

> Hello,
>
> I would like to be able to refine searches in xwiki enterprise by tags as I
> already can by Spaces or wikis. How can I do that?
>
> Is there any way to do the same directly into the search input? Something
> like 'install  tag:linux' would search for the word 'install', on into
> pages tagged 'linux'.
>
> Thanks in advance,
> ___
> 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] Help with Database List

2014-07-17 Thread Jeremie BOUSQUET
2014-07-17 17:21 GMT+02:00 Jason Clemons :

> Does this make each list item essentially it's own page?
>

With App Within Minutes by default yes.
It's also sort of default way of doing with xwiki (ie 1 object = 1 page).

But it's possible to create all objects for all list items, in a unique
page. It has to be managed in the page used to create those objects.
Have to check maybe, if it still "works" with the Database List Field, but
I know for sure that it works for DB Tree list fields so it should be ok.


>
> > On Jul 17, 2014, at 12:34 AM, "Jeremie BOUSQUET" <
> jeremie.bousq...@gmail.com> wrote:
> >
> > Hello,
> >
> > You could check this page about database lists [1].
> >
> > The steps could be:
> > - create a specific class, for objects that will hold possible values for
> > your list (manually, or with app within minutes). You don't much care
> about
> > the livetable, you mainly need a form for users to create new values. You
> > can either define only one field in this Class (the values to show in the
> > list), or 2 fields (one for the key, one for the value). Remember the
> name
> > of the class and fields created.
> > - in the Database List field you want to populate, apply [1], and enter
> the
> > name of the class you created above, and the field(s) defining the values
> > (and the keys if needed).
> >
> > The Hibernate Query field is here if you want to do more advanced
> > selections of the keys/values.
> > You can even define a "tree" structure for the values to show in the
> list,
> > but that's another topic ! ;-)
> >
> > Note that if you don't need strict validation of user inputs, and to
> > propose a predefined list of values, you could also just use the
> "suggest"
> > feature in your field (and make it a simple string field instead of db
> > list).
> >
> > Hope this helps,
> > Jeremie
> >
> > [1] -
> >
> http://dev.xwiki.org/xwiki/bin/view/Drafts/DatabaseListProperties#HUsingtheClassName2BId2FValuefields
> >
> >
> > 2014-07-17 9:14 GMT+02:00 Jason Clemons :
> >
> >> Now that I read my post, it dawns on me that I don't really need to use
> >> "LiveTables" if that's too much of a hassle, populating the Database
> List
> >> based on a table in the backend DB would work just as well, has anyone
> done
> >> this, or have any pointers?
> >>
> >> Ultimately, I just need to devise a strategy to allow my user community
> to
> >> add/delete and edit the values that show up in my list without cracking
> >> into code or the class editor.  And I don't want them to call me either
> :)
> >>
> >>>> On Jul 15, 2014, at 8:48 AM, "Jason Clemons" 
> >>> wrote:
> >>>
> >>>
> >>>> Hello again all,
> >>>>
> >>>> I’m trying not to ask every little question here, but I’m pretty well
> >> stuck.  I’ve created an App Within Minutes app and added a “Database
> List”
> >> but I’m not sure how to populate the list.  I’ve read tons (mostly of
> which
> >> I don’t understand) about HQL and LiveTable, but since I’m so new I
> can’t
> >> really figure out how to get this going.  I’d like to have a “LiveTable”
> >> (form) somewhere that my users enter and maintain data which then
> populates
> >> the “Database List” on my app.  I’ve Googled a bunch but I can’t seem to
> >> find a good example of this.  In my mind I want to do the following:
> >>>>
> >>>> 1.Create a LiveTable somewhere
> >>>> 2.   Link the Database List to the LiveTable I created.
> >>>>
> >>>> Any help is greatly appreciated,
> >>>>
> >>>> Jason M Clemons
> >>>> Network Operations - Service Delivery Lead Analyst
> >>>> 602-766-1844
> >>>>
> >>>> American Express made the following annotations
> >>>>
> >>>> "This message and any attachments are solely for the intended
> recipient
> >> and may contain confidential or privileged information. If you are not
> the
> >> intended recipient, any disclosure, copying, use, or distribution of the
> >> information included in this message and any attachments is prohibited.
> If
> >> you have received this communication in error, please notify us by reply
> >> e-mail and immediately and permanently delete this message and any
> >>

Re: [xwiki-users] Help with Database List

2014-07-17 Thread Jeremie BOUSQUET
Hello,

You could check this page about database lists [1].

The steps could be:
- create a specific class, for objects that will hold possible values for
your list (manually, or with app within minutes). You don't much care about
the livetable, you mainly need a form for users to create new values. You
can either define only one field in this Class (the values to show in the
list), or 2 fields (one for the key, one for the value). Remember the name
of the class and fields created.
- in the Database List field you want to populate, apply [1], and enter the
name of the class you created above, and the field(s) defining the values
(and the keys if needed).

The Hibernate Query field is here if you want to do more advanced
selections of the keys/values.
You can even define a "tree" structure for the values to show in the list,
but that's another topic ! ;-)

Note that if you don't need strict validation of user inputs, and to
propose a predefined list of values, you could also just use the "suggest"
feature in your field (and make it a simple string field instead of db
list).

Hope this helps,
Jeremie

[1] -
http://dev.xwiki.org/xwiki/bin/view/Drafts/DatabaseListProperties#HUsingtheClassName2BId2FValuefields


2014-07-17 9:14 GMT+02:00 Jason Clemons :

> Now that I read my post, it dawns on me that I don't really need to use
> "LiveTables" if that's too much of a hassle, populating the Database List
> based on a table in the backend DB would work just as well, has anyone done
> this, or have any pointers?
>
> Ultimately, I just need to devise a strategy to allow my user community to
> add/delete and edit the values that show up in my list without cracking
> into code or the class editor.  And I don't want them to call me either :)
>
> > On Jul 15, 2014, at 8:48 AM, "Jason Clemons" 
> wrote:
> >
> >
> >> Hello again all,
> >>
> >> I’m trying not to ask every little question here, but I’m pretty well
> stuck.  I’ve created an App Within Minutes app and added a “Database List”
> but I’m not sure how to populate the list.  I’ve read tons (mostly of which
> I don’t understand) about HQL and LiveTable, but since I’m so new I can’t
> really figure out how to get this going.  I’d like to have a “LiveTable”
> (form) somewhere that my users enter and maintain data which then populates
> the “Database List” on my app.  I’ve Googled a bunch but I can’t seem to
> find a good example of this.  In my mind I want to do the following:
> >>
> >> 1.Create a LiveTable somewhere
> >> 2.   Link the Database List to the LiveTable I created.
> >>
> >> Any help is greatly appreciated,
> >>
> >> Jason M Clemons
> >> Network Operations - Service Delivery Lead Analyst
> >> 602-766-1844
> >>
> >> American Express made the following annotations
> >>
> >> "This message and any attachments are solely for the intended recipient
> and may contain confidential or privileged information. If you are not the
> intended recipient, any disclosure, copying, use, or distribution of the
> information included in this message and any attachments is prohibited. If
> you have received this communication in error, please notify us by reply
> e-mail and immediately and permanently delete this message and any
> attachments. Thank you."
> >>
> >> American Express a ajouté le commentaire suivant le
> >> Ce courrier et toute pièce jointe qu'il contient sont réservés au seul
> destinataire indiqué et peuvent renfermer des renseignements confidentiels
> et privilégiés. Si vous n'êtes pas le destinataire prévu, toute
> divulgation, duplication, utilisation ou distribution du courrier ou de
> toute pièce jointe est interdite. Si vous avez reçu cette communication par
> erreur, veuillez nous en aviser par courrier et détruire immédiatement le
> courrier et les pièces jointes. Merci.
> > ___
> > 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] Skip name dialog in App Within Minutes

2014-07-16 Thread Jeremie BOUSQUET
BTW, an alternative could be to use the modal box [1], to display your form
in a modal pop-up (with autofilled field displayed or hidden), then create
the page with the name you want upon submit. The server-side saving could
be done with either velocity or groovy script.

I think there is an extension doing that, but I can't find it ... If
someone remembers :)

BR,
Jeremie

[1]
http://extensions.xwiki.org/xwiki/bin/view/Extension/Modal+Box+Application


2014-07-17 1:08 GMT+02:00 Jeremie BOUSQUET :

> Hello,
>
> You could check the "Self renaming forms" extension [1], that would allow
> renaming your page using the uid from the autofilled field.
>
> [1]
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Self-Renaming+Forms
>
> BR,
> Jeremie
>
>
> 2014-07-16 23:59 GMT+02:00 Jason Clemons :
>
> Hello all,
>>
>> I've created an "App Within Minutes" and written some custom JavaScript
>> to autofill the value of the popup dialog box (called "Entry Name") with a
>> randomly generated UID..
>>
>> Essentially what happens is I click the "Add New Entry" button and when
>> the dialog pops up, it is autofilled with the UID from my client-side code.
>>
>> I'd like to skip the popup box entirely and just create the page directly
>> off of the UID so the user is just taken to the form automatically, but the
>> only thing I can think of is just hiding the dialog and pushing the button
>> via JavaScript.
>>
>> Any other suggestions are certainly welcome, thx
>> ___
>> 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] Skip name dialog in App Within Minutes

2014-07-16 Thread Jeremie BOUSQUET
Hello,

You could check the "Self renaming forms" extension [1], that would allow
renaming your page using the uid from the autofilled field.

[1] http://extensions.xwiki.org/xwiki/bin/view/Extension/Self-Renaming+Forms

BR,
Jeremie


2014-07-16 23:59 GMT+02:00 Jason Clemons :

> Hello all,
>
> I've created an "App Within Minutes" and written some custom JavaScript to
> autofill the value of the popup dialog box (called "Entry Name") with a
> randomly generated UID..
>
> Essentially what happens is I click the "Add New Entry" button and when
> the dialog pops up, it is autofilled with the UID from my client-side code.
>
> I'd like to skip the popup box entirely and just create the page directly
> off of the UID so the user is just taken to the form automatically, but the
> only thing I can think of is just hiding the dialog and pushing the button
> via JavaScript.
>
> Any other suggestions are certainly welcome, thx
> ___
> 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] how to purge history in a space? Did I found bug?

2014-07-11 Thread Jeremie BOUSQUET
Hi,


2014-07-11 9:06 GMT+02:00 Pascal BASTIEN :

> Do you mean I must launch on query by langage?
>
>
> Yes I agree with you about this $item then I can use id of document like
> this:
>
> {{velocity}}
>  #set ($items = $xwiki.search("select doc.id from XWikiDocument as doc
> where doc.space='Sandbox' and doc.name != 'WebPreferences'"))
>

Should select doc.fullName instead of doc.id I believe.
You could also call $xwiki.wrapDocs to convert search result to a list of
xwiki documents directly.
http://maven.xwiki.org/site/docs/xwiki-javadoc-4.1.x/com/xpn/xwiki/api/XWiki.html#wrapDocs(java.util.List)


>#foreach($item in $items)
>  #set($itemDoc = $xwiki.getDocument($item))
>

You could check if $itemDoc is not null and an existing document before
trying to further access it ;-)
http://maven.xwiki.org/site/docs/xwiki-javadoc-4.1.x/com/xpn/xwiki/api/XWiki.html#exists(java.lang.String)


>  * //[$itemDoc] ID in Sandbox space with language : $itemDoc.language
>#end
>  {{/velocity}}
> but after I don't know how to retrieve all field from wikidoc table from
> $items. :-(
>
> $itemDoc.language and $itemDoc.name return nothing. Are there a magic
> functions?
> Thxs
>
>
>
> 
>  De : Marius Dumitru Florea 
> À : Pascal BASTIEN ; XWiki Users  >
> Envoyé le : Jeudi 10 juillet 2014 21h20
> Objet : Re: [xwiki-users] how to purge history in a space? Did I found bug?
>
>
>
> Just print $item and you'll see it's just the name of the document so
> there's no way getDocument would return something other than the default
> translation, which has the language field empty because it's the default
> language (check the defaultLanguage field). If you want to get the
> translations then you can use the 'language' query filter which adds the
> language to the query results.
> On Jul 10, 2014 12:52 PM, "Pascal BASTIEN" 
> wrote:
> >
> > I try to finish my xar but I think there are a bug in the xwiki about
> language.
> > I can't display XWD_LANGUAGE value from database with velocity.
> > By example, this code doesn't return language of
> Sandbox.WebHome:{{velocity}}
> > #set ($items = $xwiki.search("select doc.fullName from XWikiDocument as
> doc where doc.space='Sandbox' and doc.name != 'WebPreferences'"))
> >   #foreach($item in $items)
> > #set($itemDoc = $xwiki.getDocument($item))
> > * //[$itemDoc] in Sandbox space with language : $itemDoc.language
> >   #end
> > {{/velocity}}
> >
> > I obtain this:
> >
> >
> > [Sandbox.WebHome] in Sandbox space with language :
> > [Sandbox.TestPage3] in Sandbox space with language :
> > [Sandbox.WebHome] in Sandbox space with language :
> > [Sandbox.WebHome] in Sandbox space with language :
> > [Sandbox.TestPage2] in Sandbox space with language :
> > [Sandbox.WebHome] in Sandbox space with language :
> > [Sandbox.WebHome] in Sandbox space with language :
> > [Sandbox.WebHome] in Sandbox space with language :
> > [Sandbox.WebHome] in Sandbox space with language :
> > [Sandbox.WebHome] in Sandbox space with language :
> > [Sandbox.TestPage1] in Sandbox space with language :
> > [Sandbox.WebHome] in Sandbox space with language :
> > [Sandbox.WebHome] in Sandbox space with language :
> > [Sandbox.WebHome] in Sandbox space with language :
> > [Sandbox.WebHome] in Sandbox space with language :
> > [Sandbox.test] in Sandbox space with language :
> >
> >
> >
> > Did I found a bug?
> >
> > NB: I don't use "#foreach ($docName in
> $xwiki.getSpaceDocsName("SandboxTemplate")" because if Administrator
> doesn't display hidden document, this code doesn't return  SandboxTemplate
> space hidden documents :-(
> >
> > Thxs
> >
> > Pascal BASTIEN
> >
> >
> >
> > 
> >  De : Pascal BASTIEN 
> > À : XWiki Users 
> > Envoyé le : Mercredi 9 juillet 2014 9h31
> > Objet : Re: [xwiki-users] how to purge history in a space?
> >
> >
> >
> > Sure!
> >
> > NB: is it to late for my commit for 6.1?:
> https://github.com/xwiki/xwiki-platform/pull/297
> >
> >
> >
> > 
> >  De : "vinc...@massol.net" 
> > À : XWiki Users 
> > Envoyé le : Mardi 8 juillet 2014 18h51
> > Objet : Re: [xwiki-users] how to purge history in a space?
> >
> >
> > Hi Pascal,
> >
> > It could be nice to share "how to reinitialize a space” as a snippet on
> extensions.xwiki.org when you have it all working ;)
> >
> > Thanks
> > -Vincent
> >
> >
> > On 8 Jul 2014 at 17:38:43, Pascal BASTIEN (pbasnews-xw...@yahoo.fr
> (mailto:pbasnews-xw...@yahoo.fr)) wrote:
> >
> > >
> > >
> > > FYI, finally I add this parameter to overwryte my Sandbox (and reinit
> history):
> > > copy $xwiki.copyDocument("TemplateSandbox.$docName",
> "Sandbox.$docName","fr","true","true"))
> > >
> > >
> http://maven.xwiki.org/site/docs/xwiki-javadoc-4.1.x/com/xpn/xwiki/api/XWiki.html#copyDocument%28java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String,%20boolean,%20boo

Re: [xwiki-users] Maven errors

2014-06-12 Thread Jeremie BOUSQUET
2014-06-12 9:39 GMT+02:00 wafid :

>
> I did not understand!!
> this means that there is no problem ?
> or I can not continue?
>

Now that Guillaume published missing stuff on central, you could try again
to build, and tell here if it now succeeds or not.


>
>
>
>
> --
> View this message in context:
> http://xwiki.475771.n2.nabble.com/Maven-errors-tp7590867p7591007.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
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Maven errors

2014-06-11 Thread Jeremie BOUSQUET
2014-06-11 16:34 GMT+02:00 Guillaume "Louis-Marie" Delhumeau <
gdelhum...@xwiki.com>:

> It seems I haven't fully released xwiki-commons and xwiki-rendering 5.4.5
> on maven central. I just have done this. Don't we have them on our own
> Maven repository ?
>

I see it in your nexus, with:
Uploaded Date:Mon May 26 2014 11:05:53

Uploaded by "anonymous" which seems strange.

I can't understand why it would try to get that one from central, and the
others from nexus.xwiki.org, and why it wouldn't do the same for previous
libraries ...
But maybe you could also define the mirrors / mirrorOf * for nexus.xwiki.org
repo in maven settings (ie, never go to central). That may not be a good
idea, but as central seems to be proxified from nexus.xwiki, it should work.
I didn't find any mirror recommendations on
http://dev.xwiki.org/xwiki/bin/view/Community/Building .



> Anyway, Wafid, it should be fixed within the next 2 hours...
>
> Sorry for that.
>
> Guillaume
>
>
> 2014-06-11 16:23 GMT+02:00 wafid :
>
> >
> > settings.xml
> >
> >
> > //*
> > 
> >  
> >
> >  xwiki
> >
> > 
> >
> >  xwiki-snapshots
> >  XWiki Nexus Snapshot Repository Proxy
> >  
> http://nexus.xwiki.org/nexus/content/groups/public-snapshots
> > 
> >  
> >false
> >  
> >  
> >true
> >  
> >
> >
> >  xwiki-releases
> >  XWiki Nexus Releases Repository Proxy
> >  http://nexus.xwiki.org/nexus/content/groups/public
> >  
> >true
> >  
> >  
> >false
> >  
> >
> >
> >
> > 
> >  xwiki-external
> >  XWiki Nexus External Repository Proxy
> >  http://nexus.xwiki.org/nexus/content/groups/public
> >  
> >true
> >  
> >  
> >false
> >  
> >
> >
> >
> >
> >  
> >  
> >
> >  xwiki-plugins-snapshots
> >  XWiki Nexus Plugin Snapshot Repository Proxy
> >  
> http://nexus.xwiki.org/nexus/content/groups/public-snapshots
> > 
> >  
> >false
> >  
> >  
> >true
> >  
> >
> >
> >  xwiki-plugins-releases
> >  XWiki Nexus Plugin Releases Repository Proxy
> >  http://nexus.xwiki.org/nexus/content/groups/public
> >  
> >true
> >  
> >  
> >false
> >  
> >
> >  
> >
> >  
> >  
> >xwiki
> >  
> > 
> >
> >
> >
> >
> > --
> > View this message in context:
> > http://xwiki.475771.n2.nabble.com/Maven-errors-tp7590867p7590992.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
> >
> ___
> 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] AddUserToGroup Programmatically

2014-06-10 Thread Jeremie BOUSQUET
Hi,
Le 10 juin 2014 21:09, "Daniel Ebanja"  a
écrit :
>
> Hi,
> i am adding Users to a group as shown below d want to prevent that a user
> be added to a group twice. It is not working this way.
>
> if( null == groupDoc.getXObject(groupDocumentReference, "member",
> xwikiname)){

I never used this method, and its javadoc could be improved, are you sure
it does what you think ? ;)
You could use something like (to be checked):
xwiki.getUser("username", context).isUserInGroup("group")

> // Add a member object to document
> BaseObject memberObj = groupDoc.newXObject(
> groupClass.getDocumentReference(), context);
> memberObj.setStringValue("member", xwikiname);
>
> context.getWiki().saveDocument(groupDoc, context);
> }else
> log.error("the user already existed in the requested
> group...");

You say it doesn't work, but do you see that log  ? What happens ?

>
> I will appreciate any help.
> Thanks
> ___
> 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] IllegalArgumentException

2014-06-05 Thread Jeremie BOUSQUET
Hi,

I think more details would be needed about what you do actually ...

I tested the following groovy script in a page :

{{groovy}}

def space = "%C3%A4%C3%B6%C3%BC%C3%9F%C2%A7%25%21%3C%3E_helloworld"

println "ENCODED ${space}"

String decodedspacename = URLDecoder.decode(space, "UTF-8");

println "DECODED ${decodedspacename}"

def spaceFromUrl = request.space

println "From URL ENCODED ${spaceFromUrl}"

String decodedspacenameFromUrl = URLDecoder.decode(space, "UTF-8");

println "From URL DECODED ${decodedspacenameFromUrl}"


{{/groovy}}

I pass "space=%C3%A4%C3%B6%C3%BC%C3%9F%C2%A7%25%21%3C%3E_helloworld" as a
parameter to the page.
The output is then :

ENCODED %C3%A4%C3%B6%C3%BC%C3%9F%C2%A7%25%21%3C%3E_helloworld
DECODED äöüߧ%!<>_helloworld
From URL ENCODED äöüߧ%!<>_helloworld
From URL DECODED äöüߧ%!<>_helloworld

So in this case, it works for me.

If I add this additional line to my script:

decodedspacenameFromUrl = URLDecoder.decode(decodedspacenameFromUrl ,
"UTF-8");

Then I get the exception you got, as Clemens.


BR,
Jeremie



2014-06-05 9:59 GMT+02:00 Daniel Ebanja :

> Hi,
> just wanted to ask if someone has an idea for me.
> I'll appreciate any help.
> Thanks
> Am 03.06.2014 05:16 schrieb "Daniel Ebanja" :
>
> > Hi,
> > i am receiveing the following exception:
> > Caused by: java.lang.IllegalArgumentException: URLDecoder: Illegal hex
> > characters in escape (%) pattern - For input string: "!<"
> >
> > My scenario:
> > Users can create space by using a URL that looks like:
> > mydomain.com/xwiki/bin/...?space=
> > %C3%A4%C3%B6%C3%BC%C3%9F%C2%A7%25%21%3C%3E_helloworld
> >
> > i then try to decode this spacename and create the space without success.
> > String decodedspacename = URLDecoder.decode(space, "UTF-8");
> >
> > How should i deal with this?
> > thanks for your help in advance.
> >
> >
> ___
> 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] Maven errors

2014-06-04 Thread Jeremie BOUSQUET
Hi,

To investigate, you need to check exactly what maven told you:

"Please refer to
/home/usr/xwikiProject/xwiki-platform-xwiki-platform-5.4.5/xwiki-platform-core/xwiki-platform-oldcore/target/surefire-reports
for the individual test results."

In the test reports you should find why it failed more precisely.

BR,
Jeremie


2014-06-04 11:15 GMT+02:00 wafid :

> Hello;
>
> when i execute "mvn {path of xwiki} install clean , i have this error :
>
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-surefire-plugin:2.16:test (default-test) on
> project xwiki-platform-oldcore: There are test failures.
> [ERROR]
> [ERROR] Please refer to
>
> /home/usr/xwikiProject/xwiki-platform-xwiki-platform-5.4.5/xwiki-platform-core/xwiki-platform-oldcore/target/surefire-reports
> for the individual test results.
> [ERROR] -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions,
> please
> read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
> [ERROR]
> [ERROR] After correcting the problems, you can resume the build with the
> command
> [ERROR]   mvn  -rf :xwiki-platform-oldcore
>
> help please;
> thanks
>
>
>
>
> --
> View this message in context:
> http://xwiki.475771.n2.nabble.com/Maven-errors-tp7590867.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
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] RES: New Notifications Tutorial (a.k.a Event Listener)

2014-05-30 Thread Jeremie BOUSQUET
Hi,

Yes, see here:
http://dev.xwiki.org/xwiki/bin/view/Community/Building

Br,
Jérémie
Le 30 mai 2014 16:22, "Danilo Amaral de Oliveira" <
danilo.olive...@energisa.com.br> a écrit :

> I am trying to use the maven to mount the Listener component, however I am
> getting this following error:
>  > mvn clean install
>
> [ERROR] Failed to execute goal on project commentListener: Could not
> resolve dep
> endencies for project com.energisa:commentListener:jar:1.0-SNAPSHOT: The
> followi
> ng artifacts could not be resolved:
> org.xwiki.platform:xwiki-platform-oldcore:ja
> r:5.4.4, org.xwiki.platform:xwiki-platform-mailsender:jar:5.4.4: Could not
> find
> artifact org.xwiki.platform:xwiki-platform-oldcore:jar:5.4.4 in central
> (http://
> repo.maven.apache.org/maven2) -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the
> -e swit
> ch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions,
> please rea
> d the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso
> lutionException
>
>
>
> Do I need to configure the repositories in Maven, in order to make it
> download from the right place?
>
> Thank you.
> Danilo
>
>
>
> Grupo Energisa
> Danilo Oliveira
> Analista Suporte Aplicacao TI - DPTO CORP. DE INFRAESTR. TI
> e-mail: danilo.olive...@energisa.com.br | tel: (32) 3429-6342 | cel: (32)
> 8452-9478
>
> Esta mensagem contém informação confidencial. Se você a recebeu por
> engano, não divulgue ou copie seu conteúdo. Por favor, avise ao remetente
> imediatamente e apague-a do computador.
> Privileged and confidential. If this message has been received by mistake,
> do not disclose or copy its contents. Please notify sender and delete
> immediately.
>
>
> -Mensagem original-
> De: users [mailto:users-boun...@xwiki.org] Em nome de Marius Dumitru
> Florea
> Enviada em: sexta-feira, 30 de maio de 2014 04:32
> Para: XWiki Users
> Assunto: Re: [xwiki-users] New Notifications Tutorial (a.k.a Event
> Listener)
>
> On Fri, May 30, 2014 at 9:32 AM, vinc...@massol.net 
> wrote:
> >
> >
> >
> >
> > On 30 May 2014 at 07:39:44, Marius Dumitru Florea (
> mariusdumitru.flo...@xwiki.com(mailto:mariusdumitru.flo...@xwiki.com))
> wrote:
> >
> >> Event listeners should not keep a reference to the XWiki context from
> >> when they were created. XWiki context is created per request while
> >> the event listener is used on multiple requests. I updated the
> >> LoggingEventListener.
> >
>
> > Thanks but I think it’s better to get it from the passed “data”
> parameters which represents the XWikiContext.
>
> I didn't say otherwise :) , even if you get it from the passed "data"
> or from the execution context you should still not keep a reference to the
> XWiki context between events.
>
> >
> > Also
> http://platform.xwiki.org/xwiki/bin/download/DevGuide/WritingEventListenerTutorial/groovynotifier.txt
> needs to be updated too.
> >
> > Thanks
> > -Vincent
> >
> >> Thanks,
> >> Marius
> >>
> >> On Thu, May 29, 2014 at 7:39 PM, vinc...@massol.net wrote:
> >> > Dear XWiki users,
> >> >
> >> > Since I’ve seen several questions recently on the list related to
> XWiki events, I’ve spent several hours rewriting the XWiki Notifications
> Tutorial here:
> >> >
> >> > http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingEventListe
> >> > nerTutorial
> >> >
> >> > You’ll learn for example:
> >> > - Adding content to pages on save
> >> > - Log when a document is modified
> >> > - Send a mail whenever a comment is added
> >> >
> >> > Enjoy!
> >> >
> >> > Thanks
> >> > -Vincent
> >> >
> >> >
> >> > ___
> >> > 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
> ___
> 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] APT syntax

2014-05-23 Thread Jeremie BOUSQUET
Done :
http://jira.xwiki.org/browse/XRENDERING-342


2014-05-23 15:12 GMT+02:00 Thomas Mortagne :

> The EM one, it's useless to have it by default IMO. We already have
> too much stuff.
>
> On Fri, May 23, 2014 at 3:10 PM, Jeremie BOUSQUET
>  wrote:
> > 2014-05-23 15:06 GMT+02:00 Thomas Mortagne :
> >
> >> Would be nice if you could report it so that we don't forget, I don't
> >> think I will have time to look at it today.
> >>
> >>
> > To be clear, what needs to be reported ?
> > - the fact that apt is not provided by default with XE
> > - the fact that it works only if installed "on farm" in EM
> > If answer is yes to both, means 2 issues must be created
> >
> >
> >> On Fri, May 23, 2014 at 3:03 PM, Jeremie BOUSQUET
> >>  wrote:
> >> > 2014-05-23 15:00 GMT+02:00 Thomas Mortagne  >:
> >> >
> >> >> I guess it means the code that gets the list of available syntaxes is
> >> >> only looking at root component manager instead of context component
> >> >> manager
> >> >
> >> >
> >> >
> >> >> (in you case I guess you installed it on main wiki and not "on
> >> >> farm").
> >> >>
> >> >
> >> > Yes that's right
> >> >
> >> >
> >> >> On Fri, May 23, 2014 at 2:49 PM, Jeremie BOUSQUET
> >> >>  wrote:
> >> >> > Dear community,
> >> >> >
> >> >> > I wanted to test the apt/1.0 syntax, so I updated xwiki.cfg to add
> >> >> > "apt/1.0" in parameter "xwiki.rendering.syntaxes" and restarted my
> >> wiki.
> >> >> >
> >> >> > When editing a page, no "apt/1.0" choice appeared in the Document
> >> Syntax
> >> >> > Panel.
> >> >> >
> >> >> > So in another page I displayed the available parsers and renderers,
> >> which
> >> >> > gave:
> >> >> >
> >> >> > Parsers : [XWiki 2.1, Markdown 1.0, XWiki 2.0, TWiki 1.0, XWiki
> 1.0,
> >> >> > JSPWiki 1.0, MediaWiki 1.0, DocBook 4.4, HTML 4.01, XHTML 1.0,
> Creole
> >> >> 1.0,
> >> >> > Confluence 1.0, Plain 1.0]
> >> >> > Renderers : [DocBook 4.4, TeX 1.0, XWiki 2.1, Annotated XHTML 1.0,
> >> XWiki
> >> >> > 2.0, XHTML 1.0, XHTML Macro 1.0, Plain 1.0]
> >> >> >
> >> >> > (I'm on 5.1, apt was added in 4.3, so it should be there unless it
> was
> >> >> > removed later and I missed the release note - or there was an error
> >> >> during
> >> >> > install/upgrade but it seems unlikely)
> >> >> >
> >> >> > So from Extension Manager, I searched and installed
> >> >> > org.xwiki.rendering:xwiki-rendering-syntax-apt-5.1.jar.
> >> >> > No change on the list of parsers/renderers, still no APT.
> >> >> >
> >> >> > I thought that probably renderers and parsers are registered only
> at
> >> >> start
> >> >> > and maybe not by EM, so I restarted the wiki again, but no change
> on
> >> the
> >> >> > list of parsers/renderers.
> >> >> >
> >> >> > Eventually I moved that jars (for xwiki-rendering-syntax-apt and
> >> >> > xwiki-rendering-xml) from the extension repository under perm data
> >> dir,
> >> >> to
> >> >> > WEB-INF/lib of the webapp, and restarted again, and apt now
> appears in
> >> >> the
> >> >> > list of parsers/renderers !
> >> >> >
> >> >> > Then I tried to enter some content in a page, with apt syntax, and
> on
> >> >> > saving got this:
> >> >> >
> >> >> > Caused by: java.lang.NoClassDefFoundError:
> >> >> > org/apache/maven/doxia/module/apt/AptParser
> >> >> > at
> >> >> >
> >> >>
> >>
> org.xwiki.rendering.internal.parser.apt.APTParser.createDoxiaParser(APTParser.java:50)
> >> >> > ~[xwiki-rendering-syntax-apt-5.1.jar:na]
> >> >> > at
> >> >> >
> >> >>
> >>
> org.xwiki.rendering.internal.parser.doxia.AbstractDoxiaParser.parse(AbstractDoxiaParser.java:99)
> >> >

Re: [xwiki-users] APT syntax

2014-05-23 Thread Jeremie BOUSQUET
2014-05-23 15:06 GMT+02:00 Thomas Mortagne :

> Would be nice if you could report it so that we don't forget, I don't
> think I will have time to look at it today.
>
>
To be clear, what needs to be reported ?
- the fact that apt is not provided by default with XE
- the fact that it works only if installed "on farm" in EM
If answer is yes to both, means 2 issues must be created


> On Fri, May 23, 2014 at 3:03 PM, Jeremie BOUSQUET
>  wrote:
> > 2014-05-23 15:00 GMT+02:00 Thomas Mortagne :
> >
> >> I guess it means the code that gets the list of available syntaxes is
> >> only looking at root component manager instead of context component
> >> manager
> >
> >
> >
> >> (in you case I guess you installed it on main wiki and not "on
> >> farm").
> >>
> >
> > Yes that's right
> >
> >
> >> On Fri, May 23, 2014 at 2:49 PM, Jeremie BOUSQUET
> >>  wrote:
> >> > Dear community,
> >> >
> >> > I wanted to test the apt/1.0 syntax, so I updated xwiki.cfg to add
> >> > "apt/1.0" in parameter "xwiki.rendering.syntaxes" and restarted my
> wiki.
> >> >
> >> > When editing a page, no "apt/1.0" choice appeared in the Document
> Syntax
> >> > Panel.
> >> >
> >> > So in another page I displayed the available parsers and renderers,
> which
> >> > gave:
> >> >
> >> > Parsers : [XWiki 2.1, Markdown 1.0, XWiki 2.0, TWiki 1.0, XWiki 1.0,
> >> > JSPWiki 1.0, MediaWiki 1.0, DocBook 4.4, HTML 4.01, XHTML 1.0, Creole
> >> 1.0,
> >> > Confluence 1.0, Plain 1.0]
> >> > Renderers : [DocBook 4.4, TeX 1.0, XWiki 2.1, Annotated XHTML 1.0,
> XWiki
> >> > 2.0, XHTML 1.0, XHTML Macro 1.0, Plain 1.0]
> >> >
> >> > (I'm on 5.1, apt was added in 4.3, so it should be there unless it was
> >> > removed later and I missed the release note - or there was an error
> >> during
> >> > install/upgrade but it seems unlikely)
> >> >
> >> > So from Extension Manager, I searched and installed
> >> > org.xwiki.rendering:xwiki-rendering-syntax-apt-5.1.jar.
> >> > No change on the list of parsers/renderers, still no APT.
> >> >
> >> > I thought that probably renderers and parsers are registered only at
> >> start
> >> > and maybe not by EM, so I restarted the wiki again, but no change on
> the
> >> > list of parsers/renderers.
> >> >
> >> > Eventually I moved that jars (for xwiki-rendering-syntax-apt and
> >> > xwiki-rendering-xml) from the extension repository under perm data
> dir,
> >> to
> >> > WEB-INF/lib of the webapp, and restarted again, and apt now appears in
> >> the
> >> > list of parsers/renderers !
> >> >
> >> > Then I tried to enter some content in a page, with apt syntax, and on
> >> > saving got this:
> >> >
> >> > Caused by: java.lang.NoClassDefFoundError:
> >> > org/apache/maven/doxia/module/apt/AptParser
> >> > at
> >> >
> >>
> org.xwiki.rendering.internal.parser.apt.APTParser.createDoxiaParser(APTParser.java:50)
> >> > ~[xwiki-rendering-syntax-apt-5.1.jar:na]
> >> > at
> >> >
> >>
> org.xwiki.rendering.internal.parser.doxia.AbstractDoxiaParser.parse(AbstractDoxiaParser.java:99)
> >> > ~[xwiki-rendering-syntax-doxia-5.1.jar:na]
> >> > at
> >> >
> >>
> org.xwiki.rendering.internal.parser.doxia.AbstractDoxiaParser.parse(AbstractDoxiaParser.java:70)
> >> > ~[xwiki-rendering-syntax-doxia-5.1.jar:na]
> >> > at
> >> > com.xpn.xwiki.doc.XWikiDocument.parseContent(XWikiDocument.java:7975)
> >> > ~[xwiki-platform-legacy-oldcore-5.1.jar:na]
> >> > [...]
> >> > ... 50 common frames omitted
> >> >
> >> >
> >> > ... though from EM, dependencies of the apt renderer seem to be
> correctly
> >> > installed (either provided or installed) :
> >> >
> >> > XWiki Rendering - Syntax - Doxia Bridge5.1 (in wiki xwiki) Provided
> >> > Doxia :: APT Module1.3 (in wiki xwiki) Installed
> >> > XWiki Rendering - Legacy - API5.1 (in wiki xwiki) Provided
> >> > XWiki Commons - Legacy - Component - API5.1 (in wiki xwiki) Provided
> >> >
> >> > doxia-module-apt-1.3.jar is p

Re: [xwiki-users] APT syntax

2014-05-23 Thread Jeremie BOUSQUET
Sure !


2014-05-23 15:06 GMT+02:00 Thomas Mortagne :

> Would be nice if you could report it so that we don't forget, I don't
> think I will have time to look at it today.
>
> On Fri, May 23, 2014 at 3:03 PM, Jeremie BOUSQUET
>  wrote:
> > 2014-05-23 15:00 GMT+02:00 Thomas Mortagne :
> >
> >> I guess it means the code that gets the list of available syntaxes is
> >> only looking at root component manager instead of context component
> >> manager
> >
> >
> >
> >> (in you case I guess you installed it on main wiki and not "on
> >> farm").
> >>
> >
> > Yes that's right
> >
> >
> >> On Fri, May 23, 2014 at 2:49 PM, Jeremie BOUSQUET
> >>  wrote:
> >> > Dear community,
> >> >
> >> > I wanted to test the apt/1.0 syntax, so I updated xwiki.cfg to add
> >> > "apt/1.0" in parameter "xwiki.rendering.syntaxes" and restarted my
> wiki.
> >> >
> >> > When editing a page, no "apt/1.0" choice appeared in the Document
> Syntax
> >> > Panel.
> >> >
> >> > So in another page I displayed the available parsers and renderers,
> which
> >> > gave:
> >> >
> >> > Parsers : [XWiki 2.1, Markdown 1.0, XWiki 2.0, TWiki 1.0, XWiki 1.0,
> >> > JSPWiki 1.0, MediaWiki 1.0, DocBook 4.4, HTML 4.01, XHTML 1.0, Creole
> >> 1.0,
> >> > Confluence 1.0, Plain 1.0]
> >> > Renderers : [DocBook 4.4, TeX 1.0, XWiki 2.1, Annotated XHTML 1.0,
> XWiki
> >> > 2.0, XHTML 1.0, XHTML Macro 1.0, Plain 1.0]
> >> >
> >> > (I'm on 5.1, apt was added in 4.3, so it should be there unless it was
> >> > removed later and I missed the release note - or there was an error
> >> during
> >> > install/upgrade but it seems unlikely)
> >> >
> >> > So from Extension Manager, I searched and installed
> >> > org.xwiki.rendering:xwiki-rendering-syntax-apt-5.1.jar.
> >> > No change on the list of parsers/renderers, still no APT.
> >> >
> >> > I thought that probably renderers and parsers are registered only at
> >> start
> >> > and maybe not by EM, so I restarted the wiki again, but no change on
> the
> >> > list of parsers/renderers.
> >> >
> >> > Eventually I moved that jars (for xwiki-rendering-syntax-apt and
> >> > xwiki-rendering-xml) from the extension repository under perm data
> dir,
> >> to
> >> > WEB-INF/lib of the webapp, and restarted again, and apt now appears in
> >> the
> >> > list of parsers/renderers !
> >> >
> >> > Then I tried to enter some content in a page, with apt syntax, and on
> >> > saving got this:
> >> >
> >> > Caused by: java.lang.NoClassDefFoundError:
> >> > org/apache/maven/doxia/module/apt/AptParser
> >> > at
> >> >
> >>
> org.xwiki.rendering.internal.parser.apt.APTParser.createDoxiaParser(APTParser.java:50)
> >> > ~[xwiki-rendering-syntax-apt-5.1.jar:na]
> >> > at
> >> >
> >>
> org.xwiki.rendering.internal.parser.doxia.AbstractDoxiaParser.parse(AbstractDoxiaParser.java:99)
> >> > ~[xwiki-rendering-syntax-doxia-5.1.jar:na]
> >> > at
> >> >
> >>
> org.xwiki.rendering.internal.parser.doxia.AbstractDoxiaParser.parse(AbstractDoxiaParser.java:70)
> >> > ~[xwiki-rendering-syntax-doxia-5.1.jar:na]
> >> > at
> >> > com.xpn.xwiki.doc.XWikiDocument.parseContent(XWikiDocument.java:7975)
> >> > ~[xwiki-platform-legacy-oldcore-5.1.jar:na]
> >> > [...]
> >> > ... 50 common frames omitted
> >> >
> >> >
> >> > ... though from EM, dependencies of the apt renderer seem to be
> correctly
> >> > installed (either provided or installed) :
> >> >
> >> > XWiki Rendering - Syntax - Doxia Bridge5.1 (in wiki xwiki) Provided
> >> > Doxia :: APT Module1.3 (in wiki xwiki) Installed
> >> > XWiki Rendering - Legacy - API5.1 (in wiki xwiki) Provided
> >> > XWiki Commons - Legacy - Component - API5.1 (in wiki xwiki) Provided
> >> >
> >> > doxia-module-apt-1.3.jar is present in extensions repo (under data
> dir),
> >> so
> >> > I thought maybe it had to be present in WEB-INF/lib (though it seems
> >> > surprising 

Re: [xwiki-users] APT syntax

2014-05-23 Thread Jeremie BOUSQUET
2014-05-23 15:00 GMT+02:00 Thomas Mortagne :

> I guess it means the code that gets the list of available syntaxes is
> only looking at root component manager instead of context component
> manager



> (in you case I guess you installed it on main wiki and not "on
> farm").
>

Yes that's right


> On Fri, May 23, 2014 at 2:49 PM, Jeremie BOUSQUET
>  wrote:
> > Dear community,
> >
> > I wanted to test the apt/1.0 syntax, so I updated xwiki.cfg to add
> > "apt/1.0" in parameter "xwiki.rendering.syntaxes" and restarted my wiki.
> >
> > When editing a page, no "apt/1.0" choice appeared in the Document Syntax
> > Panel.
> >
> > So in another page I displayed the available parsers and renderers, which
> > gave:
> >
> > Parsers : [XWiki 2.1, Markdown 1.0, XWiki 2.0, TWiki 1.0, XWiki 1.0,
> > JSPWiki 1.0, MediaWiki 1.0, DocBook 4.4, HTML 4.01, XHTML 1.0, Creole
> 1.0,
> > Confluence 1.0, Plain 1.0]
> > Renderers : [DocBook 4.4, TeX 1.0, XWiki 2.1, Annotated XHTML 1.0, XWiki
> > 2.0, XHTML 1.0, XHTML Macro 1.0, Plain 1.0]
> >
> > (I'm on 5.1, apt was added in 4.3, so it should be there unless it was
> > removed later and I missed the release note - or there was an error
> during
> > install/upgrade but it seems unlikely)
> >
> > So from Extension Manager, I searched and installed
> > org.xwiki.rendering:xwiki-rendering-syntax-apt-5.1.jar.
> > No change on the list of parsers/renderers, still no APT.
> >
> > I thought that probably renderers and parsers are registered only at
> start
> > and maybe not by EM, so I restarted the wiki again, but no change on the
> > list of parsers/renderers.
> >
> > Eventually I moved that jars (for xwiki-rendering-syntax-apt and
> > xwiki-rendering-xml) from the extension repository under perm data dir,
> to
> > WEB-INF/lib of the webapp, and restarted again, and apt now appears in
> the
> > list of parsers/renderers !
> >
> > Then I tried to enter some content in a page, with apt syntax, and on
> > saving got this:
> >
> > Caused by: java.lang.NoClassDefFoundError:
> > org/apache/maven/doxia/module/apt/AptParser
> > at
> >
> org.xwiki.rendering.internal.parser.apt.APTParser.createDoxiaParser(APTParser.java:50)
> > ~[xwiki-rendering-syntax-apt-5.1.jar:na]
> > at
> >
> org.xwiki.rendering.internal.parser.doxia.AbstractDoxiaParser.parse(AbstractDoxiaParser.java:99)
> > ~[xwiki-rendering-syntax-doxia-5.1.jar:na]
> > at
> >
> org.xwiki.rendering.internal.parser.doxia.AbstractDoxiaParser.parse(AbstractDoxiaParser.java:70)
> > ~[xwiki-rendering-syntax-doxia-5.1.jar:na]
> > at
> > com.xpn.xwiki.doc.XWikiDocument.parseContent(XWikiDocument.java:7975)
> > ~[xwiki-platform-legacy-oldcore-5.1.jar:na]
> > [...]
> > ... 50 common frames omitted
> >
> >
> > ... though from EM, dependencies of the apt renderer seem to be correctly
> > installed (either provided or installed) :
> >
> > XWiki Rendering - Syntax - Doxia Bridge5.1 (in wiki xwiki) Provided
> > Doxia :: APT Module1.3 (in wiki xwiki) Installed
> > XWiki Rendering - Legacy - API5.1 (in wiki xwiki) Provided
> > XWiki Commons - Legacy - Component - API5.1 (in wiki xwiki) Provided
> >
> > doxia-module-apt-1.3.jar is present in extensions repo (under data dir),
> so
> > I thought maybe it had to be present in WEB-INF/lib (though it seems
> > surprising that it could cause an error, never had those kind of
> > classloader issue with xwiki extensions). So I moved it to WEB-INF/lib
> and
> > restarted and  now it's ok. Just tested with a page, and the result
> is
> > very nice ! :)
> >
> > To be complete, I checked in war file of 6.0.1, and
> > xwiki-rendering-syntax-apt-6.0.1.jar is not present. So I suppose APT
> > format has not be much used yet ;-)
> >
> >
> > Thanks,
> > Jeremie
> >
> > PS: I would love to be able to publish a maven site to XWiki ... But I
> > think parsing APT from xwiki may not be the best, as the idea is not to
> > edit a maven site from xwiki (at least, my purpose is to view published
> > maven sites, you could use apt parser to edit maven sites sources). What
> I
> > would like is to be able to view a maven site from a site packaged in a
> jar
> > in a maven repository, and use xwiki as a front-end for maven sites -
> that
> > would be cool (or publish those jars into xwiki as attachments, so they
> > would be indexed by solr)
> > ___
> > 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] APT syntax

2014-05-23 Thread Jeremie BOUSQUET
Dear community,

I wanted to test the apt/1.0 syntax, so I updated xwiki.cfg to add
"apt/1.0" in parameter "xwiki.rendering.syntaxes" and restarted my wiki.

When editing a page, no "apt/1.0" choice appeared in the Document Syntax
Panel.

So in another page I displayed the available parsers and renderers, which
gave:

Parsers : [XWiki 2.1, Markdown 1.0, XWiki 2.0, TWiki 1.0, XWiki 1.0,
JSPWiki 1.0, MediaWiki 1.0, DocBook 4.4, HTML 4.01, XHTML 1.0, Creole 1.0,
Confluence 1.0, Plain 1.0]
Renderers : [DocBook 4.4, TeX 1.0, XWiki 2.1, Annotated XHTML 1.0, XWiki
2.0, XHTML 1.0, XHTML Macro 1.0, Plain 1.0]

(I'm on 5.1, apt was added in 4.3, so it should be there unless it was
removed later and I missed the release note - or there was an error during
install/upgrade but it seems unlikely)

So from Extension Manager, I searched and installed
org.xwiki.rendering:xwiki-rendering-syntax-apt-5.1.jar.
No change on the list of parsers/renderers, still no APT.

I thought that probably renderers and parsers are registered only at start
and maybe not by EM, so I restarted the wiki again, but no change on the
list of parsers/renderers.

Eventually I moved that jars (for xwiki-rendering-syntax-apt and
xwiki-rendering-xml) from the extension repository under perm data dir, to
WEB-INF/lib of the webapp, and restarted again, and apt now appears in the
list of parsers/renderers !

Then I tried to enter some content in a page, with apt syntax, and on
saving got this:

Caused by: java.lang.NoClassDefFoundError:
org/apache/maven/doxia/module/apt/AptParser
at
org.xwiki.rendering.internal.parser.apt.APTParser.createDoxiaParser(APTParser.java:50)
~[xwiki-rendering-syntax-apt-5.1.jar:na]
at
org.xwiki.rendering.internal.parser.doxia.AbstractDoxiaParser.parse(AbstractDoxiaParser.java:99)
~[xwiki-rendering-syntax-doxia-5.1.jar:na]
at
org.xwiki.rendering.internal.parser.doxia.AbstractDoxiaParser.parse(AbstractDoxiaParser.java:70)
~[xwiki-rendering-syntax-doxia-5.1.jar:na]
at
com.xpn.xwiki.doc.XWikiDocument.parseContent(XWikiDocument.java:7975)
~[xwiki-platform-legacy-oldcore-5.1.jar:na]
[...]
... 50 common frames omitted


... though from EM, dependencies of the apt renderer seem to be correctly
installed (either provided or installed) :

XWiki Rendering - Syntax - Doxia Bridge5.1 (in wiki xwiki) Provided
Doxia :: APT Module1.3 (in wiki xwiki) Installed
XWiki Rendering - Legacy - API5.1 (in wiki xwiki) Provided
XWiki Commons - Legacy - Component - API5.1 (in wiki xwiki) Provided

doxia-module-apt-1.3.jar is present in extensions repo (under data dir), so
I thought maybe it had to be present in WEB-INF/lib (though it seems
surprising that it could cause an error, never had those kind of
classloader issue with xwiki extensions). So I moved it to WEB-INF/lib and
restarted and  now it's ok. Just tested with a page, and the result is
very nice ! :)

To be complete, I checked in war file of 6.0.1, and
xwiki-rendering-syntax-apt-6.0.1.jar is not present. So I suppose APT
format has not be much used yet ;-)


Thanks,
Jeremie

PS: I would love to be able to publish a maven site to XWiki ... But I
think parsing APT from xwiki may not be the best, as the idea is not to
edit a maven site from xwiki (at least, my purpose is to view published
maven sites, you could use apt parser to edit maven sites sources). What I
would like is to be able to view a maven site from a site packaged in a jar
in a maven repository, and use xwiki as a front-end for maven sites - that
would be cool (or publish those jars into xwiki as attachments, so they
would be indexed by solr)
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Components, context and subwikis

2014-05-13 Thread Jeremie BOUSQUET
2014-05-13 19:10 GMT+02:00 Thomas Mortagne :

> On Tue, May 13, 2014 at 6:29 PM, Jeremie BOUSQUET
>  wrote:
> > 2014-05-13 17:53 GMT+02:00 Thomas Mortagne :
> >
> >> The ExecutionContext returned by execution.getContext(); comes from a
> >> ThreadLocal which means it's not a singleton associated to the main
> >> wiki but a new ExecutionContext generated for each http request.
> >>
> >
> > That is what I understood, but that means that for my component to
> operate
> > on correct wiki (in correct context), it should reassign his own
> "context"
> > member for each request - and not do it once at component initialization
> > time.
>
> I'm not sure I understand, are you talking about storing the
> XWikiContext in your component instance at init ?
>

Yes in fact it's what I did (the "this.context = " in my sample code). I
realize that I didn't think about it so much when I did it :)


>
> The XWikiContext should never ever be stored, instead you should
> always request the current one when you need it. Among other things
> the XWikiContext is not thread safe at all and is supposed to always
> be used in the Thread it's been created for.
>

Here I have to apologize because we already had this discussion here, and
you already suggested to use Provider, but I completely
forgot about it.

I suggest that the component tutorial could be updated around this context
stuff ?
http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents#HTheXWikicontext

I would propose to replace:

"If you still need to access the old XWiki context, then you can get a
reference to it from the execution context, but you should not cast it to
an XWikiContext, which would pull the whole xwiki-core as a dependency, but
to a Map. You won't be able to access all the properties, like the current
user name or the URL factory, but you can access anything placed in the
internal map of the XWikiContext."

By:

"If you still need to access the old XWiki context, then you can get a
reference to it from an injected XWikiContext Provider, but you should not
cast it to an XWikiContext, which would pull the whole xwiki-core as a
dependency, but to a Map. You won't be able to access all the properties,
like the current user name or the URL factory, but you can access anything
placed in the internal map of the XWikiContext."

And to replace the sample code by:

"
/** Provides access to the XWiki context. Injected by the Component
Manager. */
@Inject
private Provider xcontextProvider;

[...]

private void workWithTheContext()
 {
Map xwikiContext = (Map)
xcontextProvider.get();
// Do something with the XWiki context
 }"



>
> >
> >
> >>
> >> By the way you should really use Provider component
> instead.
> >>
> >
> > I will, thanks. Does it have a different/better behaviour or is just the
> > preferred way ?
> >
> >
> >> ___
> >> 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] Components, context and subwikis

2014-05-13 Thread Jeremie BOUSQUET
2014-05-13 17:53 GMT+02:00 Thomas Mortagne :

> The ExecutionContext returned by execution.getContext(); comes from a
> ThreadLocal which means it's not a singleton associated to the main
> wiki but a new ExecutionContext generated for each http request.
>

That is what I understood, but that means that for my component to operate
on correct wiki (in correct context), it should reassign his own "context"
member for each request - and not do it once at component initialization
time.


>
> By the way you should really use Provider component instead.
>

I will, thanks. Does it have a different/better behaviour or is just the
preferred way ?


> ___
> 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] Components, context and subwikis

2014-05-13 Thread Jeremie BOUSQUET
Hello,

I have some java components (@Singleton) that depend on old core. It is
bad, and I'm trying to move away from it, but I'll keep at least one
component like this - my own bridge.

I have this in initialize() of these components:

ExecutionContext context = execution.getContext();
this.context = (XWikiContext)
context.getProperty("xwikicontext");
this.xwiki = this.context.getWiki();

I realize that this worked well in the context of a mono-wiki, but in a
subwiki I wonder if it causes issues.
Here, ExecutionContext relates to the request (user action) at initialize()
time, so I suppose it's a sort of default execution context, related to
main wiki, right ?
So for example when xwiki.getDocument() is called, it looks after a
document in the main wiki - not in the (sub)wiki from which the component
method was called, right ?

Should I just call initialize() at the beginning of every method that needs
a correct context, in order to get a "fresh" execution context related to
correct wiki ?
Or should I pass the context from the script service, adding it as
parameter to all needed methods in my component ?

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


Re: [xwiki-users] Using parameter macro in the js extension

2014-05-13 Thread Jeremie BOUSQUET
2014-05-13 16:04 GMT+02:00 Caleb James DeLisle :

> This depends a lot on how the javascript is loaded...
>
> If you're including it using $xwiki.jsx.use() then it won't have the same
> context because it's a different HTTP request. If you use the macro and
> then
> do a {{velocity}} macro with an {{html}} macro and a 

Re: [xwiki-users] Using parameter macro in the js extension

2014-05-13 Thread Jeremie BOUSQUET
Hi,


2014-05-13 8:40 GMT+02:00 Michael Bußler :

> Hi, the velocity-code is executed on the server, while js-code runs on the
> client side, AFTER the macro-code was executed .
> You could try need to pass parameters to your macro via an URL parameter or
> http POST.
>

Only if value needs to be refreshed without a page refresh. If value comes
from a velocity macro, it's in the context of a page, so it's enough to
initialize the javascript var from velocity (which is ok as velocity is
executed before) - it's not supposed to be updated server-side after the
page is rendered.
Of course if it needs to be dynamic you could go ajax.
Well my understanding of Eduardo is that he needs to initialize a value in
javascript, based on a macro parameter passed to a velocity macro.


>
> Hope this helps!
>
> Best, Michael
> Am 12.05.2014 19:01 schrieb "Eduardo Abritta"  >:
>
> > Hi Sirs,
> >
> > I am developing a macro in velocity (wiki macro) and need to use a
> > parameter (wiki macro parameter) defined by the user in my java script
> code
> > (java script extension). I tried  can several methods but it is not
> working.
> >
> > How can I do this?
> >
> >
> >
> >
> > Atenciosamente,
> > Eduardo Abritta
> > e-mail: eduardo.abri...@outlook.com |
> >
> >
> >
> > ___
> > 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] Using parameter macro in the js extension

2014-05-12 Thread Jeremie BOUSQUET
Hi,

To access to velocity variables from your javascript extension, you need to
enable "Parse content" option of the JavaScriptExtension object.
That means that your javascript code will be processed by velocity when
page is rendered.

Then to share a variable between your page and the javascript extension,
you can use:

## in macro
$xcontext.put("param", "$xcontext.macro.parameter.foo")

// in javascript extension
def param = "$xcontext.get("param")";



Note: I didn't test that, so I don't know if it works - maybe there's a
different way to do.

BR,
Jeremie



2014-05-12 19:00 GMT+02:00 Eduardo Abritta :

> Hi Sirs,
>
> I am developing a macro in velocity (wiki macro) and need to use a
> parameter (wiki macro parameter) defined by the user in my java script code
> (java script extension). I tried  can several methods but it is not working.
>
> How can I do this?
>
>
>
>
> Atenciosamente,
> Eduardo Abritta
> e-mail: eduardo.abri...@outlook.com |
>
>
>
> ___
> 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] Polemic Security Question

2014-04-25 Thread Jeremie BOUSQUET
Hello,

I don't think it's possible... (and it has nothing to do with xwiki).
Seems possible with IE but with very crappy method - you don't want to do
that :)

BR,
Jeremie



2014-04-25 14:56 GMT+02:00 Danilo Amaral de Oliveira <
danilo.olive...@energisa.com.br>:

> Hello Community,
>
> I would like to do a polemic question... Do you think that is possible to
> deny the function of PrintScreen on the XWiki application?
>
> Thanks
> Danilo
>
>
> Grupo Energisa
> Danilo Oliveira
> Analista Suporte Aplicacao TI - DPTO CORP. DE INFRAESTR. TI
> e-mail: danilo.olive...@energisa.com.br | tel: (32) 3429-6342 | cel: (32)
> 8452-9478
>
> Esta mensagem contém informação confidencial. Se você a recebeu por
> engano, não divulgue ou copie seu conteúdo. Por favor, avise ao remetente
> imediatamente e apague-a do computador.
> Privileged and confidential. If this message has been received by mistake,
> do not disclose or copy its contents. Please notify sender and delete
> immediately.
>
>
> ___
> 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] how to copy the title field in an entry page for the title field of the next an application

2014-04-25 Thread Jeremie BOUSQUET
Hello,

>From what you describe, it seems that maybe the Self-Renaming Forms
extension [1] might help you,
Alternatively why do you want to have page name again in a field of your
app ? you can retrieve it also through $doc.name.

BR,
Jeremie

[1] http://extensions.xwiki.org/xwiki/bin/view/Extension/Self-Renaming+Forms


2014-04-25 14:23 GMT+02:00 Eduardo Abritta :

> Marius,
>
> Yes, i'm using the app within minutes to build the application.
>
> What I am trying to do is handle automatically the value of the entry.
>
> For example, when I create a new entry, I need inform the page name and I
> want that this value go to text field of my application automatically,
> avoiding that the user need to retype it.
>
>
> How can I do this?
>
> Thank you
>
>
>
> > From: eduardo.abri...@outlook.com
> > To: users@xwiki.org; mariusdumitru.flo...@xwiki.com
> > Date: Fri, 25 Apr 2014 14:40:36 +0300
> > Subject: Re: [xwiki-users] how to copy the title field in an entry page
> for the title field of the next an application
> >
> > I am developing a system and a module this has the option of adding a
> new entry, it would be equivalent to the title set by the user, after a new
> page is loaded and in this there is the need for the user to type the title
> again, so I wanted to spend it automatically to another page.
> >
> > Thank you.
> >
> > > Date: Thu, 24 Apr 2014 22:25:42 +0300
> > > From: mariusdumitru.flo...@xwiki.com
> > > To: users@xwiki.org
> > > Subject: Re: [xwiki-users] how to copy the title field in an entry
> page for the title field of the next an application
> > >
> > > Hi Eduardo,
> > >
> > > On Thu, Apr 24, 2014 at 3:03 PM, Eduardo Abritta
> > >  wrote:
> > > >
> > > >
> > > >
> > > > Good Morning Sirs,
> > > >
> > > >
> > > > I would like to know how to copy the title field in an entry
> > > > page for the title field of the next an application.
> > > >
> > > >
> > > > Can anyone help me?
> > >
> > > You need to give more details. I didn't understood what you are trying
> > > to achieve. Are you referring to an application created with App
> > > Within Minutes (
> > >
> http://extensions.xwiki.org/xwiki/bin/view/Extension/App+Within+Minutes+Application
> > > ) ?
> > >
> > > Hope this helps,
> > > Marius
> > >
> > > >
> > > >
> > > > Thank you.Eduardo Abritta
> > > > ___
> > > > 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
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Turn off comments on one page only?

2014-04-22 Thread Jeremie BOUSQUET
Hello,

This is described here:
http://platform.xwiki.org/xwiki/bin/view/DevGuide/Scripting#HControllingWhichSectionstoDisplay

But I must say that I couldn't have it work (in xwiki 5.4.3 at least).
>From xwikivars.vm, it seems to me that you can only deactivate comments at
minimum at level of a space.
Alternatively you could update your xwikivars.vm to deactivate comments
after testing for a specific page name.

BR,
Jeremie



2014-04-21 18:55 GMT+02:00 Patrick Masson :

> I was wondering if it was possible to turn off comments on a single wiki
> page?
>
> I found information for disabling comments across the wiki...
>
> * http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Configuration
> * http://www.xwiki.org/xwiki/bin/view/FAQ/Howtodisablecommentsandattachm
> ents
>
> and the same question from someone else (but with no response yet)...
>
> * http://www.xwiki.org/xwiki/bin/view/FAQ/Howcancommentsbedisabledforasi
> nglepage
>
>
> Thanks,
> Patrick
>
>
> --
> |||  |  |||||  |||| |||
> Patrick Masson
> General Manager, Director & Secretary to the Board
> Open Source Initiative
> 855 El Camino Real, Ste 13A, #270
> Palo Alto, CA 94301
> United States
> Skype: massonpj
> sip: mas...@getonsip.com  call?a=mas...@getonsip.com>
> Ph: (970) 4MASSON
> Em: mas...@opensource.org 
> Ws: www.opensource.org 
> ___
> 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] Menu Application rendering content

2014-04-22 Thread Jeremie BOUSQUET
Hi,

Thanks Marius, I simply forgot to try adding "{{velocity}}" macro, I was
thinking too much it would be like css extensions ! :)

BR,
Jeremie


2014-04-18 16:43 GMT+02:00 Marius Dumitru Florea <
mariusdumitru.flo...@xwiki.com>:

> Hi Jeremie,
>
> The "Menu Structure" is rendered!
>
> Take a look at
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Menu+Application#HExamples
> . As you can see there is a menu macro whose content supports wiki
> syntax (including scripting!). The Menu Application uses this menu
> macro. When you create a new menu (a new entry in the Menu
> Application) you get a WYSIWYG editor for the "Menu Structure"
> property. Whatever you put there is passed as the content of the menu
> macro. In other words, the "Menu Structure" is the content of the menu
> macro. So you can insert any scripting macro through the WYSIWYG
> editor or you can switch to source and write there the code you need.
> The only 'requirement' is that your code will generate in the end an
> HTML list. Checkout the "Hierarchy Panel" example.
>
> Hope this helps,
> Marius
>
> On Fri, Apr 18, 2014 at 11:53 AM, Jeremie BOUSQUET
>  wrote:
> > Hello,
> >
> > I used the Menu Application [1] to define a horizontal menu, after page
> > header, and it's very nice and very user-friendly.
> >
> > I wonder if it could (easily) be feasible, to have the content ("Menu
> > Structure") of the menu rendered ? My point would be to put some velocity
> > scripting in it, to achieve more dynamic menus (display parts depending
> on
> > user rights, generate some lists of items, etc).
> > A bit like the jsx/ssx extensions do.
> >
> > I had a look but I didn't find where the "magic" operates :)
> >
> > Thanks,
> > Jeremie
> >
> >
> > [1]
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Menu+Application
> > ___
> > 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] Menu Application rendering content

2014-04-18 Thread Jeremie BOUSQUET
Hello,

I used the Menu Application [1] to define a horizontal menu, after page
header, and it's very nice and very user-friendly.

I wonder if it could (easily) be feasible, to have the content ("Menu
Structure") of the menu rendered ? My point would be to put some velocity
scripting in it, to achieve more dynamic menus (display parts depending on
user rights, generate some lists of items, etc).
A bit like the jsx/ssx extensions do.

I had a look but I didn't find where the "magic" operates :)

Thanks,
Jeremie


[1] http://extensions.xwiki.org/xwiki/bin/view/Extension/Menu+Application
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] securing xwiki MySQL user a little

2014-04-15 Thread Jeremie BOUSQUET
Hello,

I think GRANT right is needed, so xwiki db user can automatically assign
rights to created databases, isn't it ?
You have some ways to improve security, as using a strong password for
xwiki db user, limiting login from this specific server only, etc...
You could also give privilege needed to create new db only when you need it
(ie, you want to create a subwiki), and remove them afterwards (supposing
you control the subwiki creation process).

BR,
Jeremie


2014-04-14 19:17 GMT+02:00 Guillaume Fenollar 
:

> Hello,
>
> Giving "ALL PRIVILEGES" doesn't give the GRANT option, so basically, if you
> run this command, it will give xwiki user all the rights, but to that one
> only. Beyond that, I don't see how the reload privilege could be dangerous
> at all to give.
>
> The only way to make it more secure is to grant the rights for every
> database, one by one.
>
> We used to meet people having issues during wikis creations, because of
> lack of privileges, that's why the documentation directly advise to give
> all privileges to everything. So of course, you can also pick the exclusive
> rights you want to grant, but since you need to do that for every database,
> it may be a bit long.
>
> Good luck
>
> Guillaume
>
>
> 2014-04-14 9:43 GMT+02:00 Martin Hamant :
>
> > Hi,
> >
> > It is mentioned in the documentation "Give all privileges to the xwiki
> > user for accessing and creating databases" - because the user to be able
> to
> > create additional databases for sub-wikis ; but isn't it a little pushy
> to
> > give *all* the privileges (Grant, reload...) to the xwiki user ?
> >
> > How could I secure the xwiki mysql user account a little more ?
> > ___
> > 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] No create wiki menu in XWiki 5.4.3

2014-04-08 Thread Jeremie BOUSQUET
2014-04-08 17:18 GMT+02:00 Jeremie BOUSQUET :

>
>
>
> 2014-04-02 14:30 GMT+02:00 Jeremie BOUSQUET :
>
> Hello,
>>
>>
>> 2014-04-02 10:21 GMT+02:00 Marius Dumitru Florea <
>> mariusdumitru.flo...@xwiki.com>:
>>
>> On Fri, Mar 28, 2014 at 4:53 PM, Jeremie BOUSQUET
>>>  wrote:
>>> > Hello,
>>> >
>>> > Just migrated from 4.5.2 to 5.4.3, and it worked perfectly except some
>>> > "issues" (or misunderstandings) :
>>> > - My user is in an admin group with admin and PR rights, and I've set
>>> it
>>> > also (on the group) the "create wiki" right. Still, when logged in, I
>>> don't
>>> > have any "wiki" item in the "Add" menu (only usual space, page, ...).
>>> I'm
>>> > sure I'm missing something obvious but can't find it.
>>>
>>> > - I show the Blog in a gadget of the Dashboard. Weirdly, "permalinks"
>>> > correctly point to each blog entry, but the link from page title
>>> points to
>>> > a create action (though it points apparently to exact same url as
>>> permalink
>>> > except for the "create" action). The same for the buttons on right
>>> side of
>>> > each blog subject (create/delete/)
>>>
>>> Does this happen on a subwiki?
>>
>>
>> No it's on main wiki, anyway I'm not able to create sub-wikis because of
>> first point I listed ;)
>>
>>
>>> The default UI for subwikis doesn't
>>> include the Blog application any more in 5.4.3 so the Blog application
>>> is removed during the upgrade. You should have been asked to confirm
>>> the deletion of unused wiki pages during the upgrade and the Blog code
>>> pages must have been among those pages. See
>>>
>>> http://extensions.xwiki.org/xwiki/bin/view/Extension/Extension+Manager+Application#HDeleteUnusedWikiPages
>>>
>> . The upgrade doesn't remove the pages created by the user (e.g. the
>>> blog posts). That's why the links to the Blog UI pages have /create/
>>> action (they have been removed) and the links to the blog posts are
>>> fine (they have been kept).
>>>
>>
>> I'm not sure of what is the difference between a Blog UI page and a blog
>> post page here ...
>> Example of bad link (ko):
>> http://host:port/xwiki/bin/create/Blog/TOTO?parent=Main.WebHome
>> Permalink for same post (ok):
>> http://host:port/xwiki/bin/view/Blog/TOTO
>>
>
> More about this (Blog posts link with "create" action in dashboard) :
> Currently these blog posts are displayed by a Dashboard, in a specific
> XWiki.GadgetClass with following content, in the Main.WebHome of the main
> (home) wiki:
>
> {{include document="Blog.BlogCode"/}}
>
> {{velocity}}
> {{html clean="false" wiki="true"}}
> #set($blogDoc = $xwiki.getDocument("Blog.WebHome"))
> #set($blogPostObjectNumber = 5)
> #if($xcontext.action != 'edit' && $xcontext.action != 'inline')
>   #printBlog($blogDoc)
> #end
> {{/html}}
> {{/velocity}}
>
> If I move this exact same code to another page of the main wiki, the blog
> posts links are displayed just fine - no "create" anymore.
> This is weird ... Could it be something done by the Dashboard macro ?
>

Got it !
My Main.WebHome was in syntax 2.0, after moving to 2.1, the blogs show up
correctly ...
So I assume, that the #printblog macro, generates links compliant with
syntax 2.1 and not 2.0. Now I'll know :)


>
>
>
>>
>> I wonder if both points I list may be linked together ...
>> Currently I cloned my original instance to test migration, and it's now
>> configured as follow:
>> DB : mysql, schema "xwikinew", user "xwiki"
>> xwiki.cfg : "xwiki.db=xwikinew"
>>
>>
>>>
>>> Hope this helps,
>>> Marius
>>>
>>> >
>>> > Thanks,
>>> > Jeremie
>>> > ___
>>> > 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] No create wiki menu in XWiki 5.4.3

2014-04-08 Thread Jeremie BOUSQUET
2014-04-02 14:30 GMT+02:00 Jeremie BOUSQUET :

> Hello,
>
>
> 2014-04-02 10:21 GMT+02:00 Marius Dumitru Florea <
> mariusdumitru.flo...@xwiki.com>:
>
> On Fri, Mar 28, 2014 at 4:53 PM, Jeremie BOUSQUET
>>  wrote:
>> > Hello,
>> >
>> > Just migrated from 4.5.2 to 5.4.3, and it worked perfectly except some
>> > "issues" (or misunderstandings) :
>> > - My user is in an admin group with admin and PR rights, and I've set it
>> > also (on the group) the "create wiki" right. Still, when logged in, I
>> don't
>> > have any "wiki" item in the "Add" menu (only usual space, page, ...).
>> I'm
>> > sure I'm missing something obvious but can't find it.
>>
>> > - I show the Blog in a gadget of the Dashboard. Weirdly, "permalinks"
>> > correctly point to each blog entry, but the link from page title points
>> to
>> > a create action (though it points apparently to exact same url as
>> permalink
>> > except for the "create" action). The same for the buttons on right side
>> of
>> > each blog subject (create/delete/)
>>
>> Does this happen on a subwiki?
>
>
> No it's on main wiki, anyway I'm not able to create sub-wikis because of
> first point I listed ;)
>
>
>> The default UI for subwikis doesn't
>> include the Blog application any more in 5.4.3 so the Blog application
>> is removed during the upgrade. You should have been asked to confirm
>> the deletion of unused wiki pages during the upgrade and the Blog code
>> pages must have been among those pages. See
>>
>> http://extensions.xwiki.org/xwiki/bin/view/Extension/Extension+Manager+Application#HDeleteUnusedWikiPages
>>
> . The upgrade doesn't remove the pages created by the user (e.g. the
>> blog posts). That's why the links to the Blog UI pages have /create/
>> action (they have been removed) and the links to the blog posts are
>> fine (they have been kept).
>>
>
> I'm not sure of what is the difference between a Blog UI page and a blog
> post page here ...
> Example of bad link (ko):
> http://host:port/xwiki/bin/create/Blog/TOTO?parent=Main.WebHome
> Permalink for same post (ok):
> http://host:port/xwiki/bin/view/Blog/TOTO
>

More about this (Blog posts link with "create" action in dashboard) :
Currently these blog posts are displayed by a Dashboard, in a specific
XWiki.GadgetClass with following content, in the Main.WebHome of the main
(home) wiki:

{{include document="Blog.BlogCode"/}}

{{velocity}}
{{html clean="false" wiki="true"}}
#set($blogDoc = $xwiki.getDocument("Blog.WebHome"))
#set($blogPostObjectNumber = 5)
#if($xcontext.action != 'edit' && $xcontext.action != 'inline')
  #printBlog($blogDoc)
#end
{{/html}}
{{/velocity}}

If I move this exact same code to another page of the main wiki, the blog
posts links are displayed just fine - no "create" anymore.
This is weird ... Could it be something done by the Dashboard macro ?



>
> I wonder if both points I list may be linked together ...
> Currently I cloned my original instance to test migration, and it's now
> configured as follow:
> DB : mysql, schema "xwikinew", user "xwiki"
> xwiki.cfg : "xwiki.db=xwikinew"
>
>
>>
>> Hope this helps,
>> Marius
>>
>> >
>> > Thanks,
>> > Jeremie
>> > ___
>> > 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] Increasing parser.pool.size property

2014-04-07 Thread Jeremie BOUSQUET
Hello,

You can define some Velocity properties in xwiki.properties as follows:

#-# velocity.properties =  = 

Check the xwiki.properties file for more details (since 2.0M1 as said in
the file)

So I suppose you could add something like:

velocity.properties = parser.pool.size = 20
(or whatever number you like, default being 20)

BR,
Jeremie


2014-04-07 14:18 GMT+02:00 Danilo Amaral de Oliveira <
danilo.olive...@energisa.com.br>:

> I am getting this following INFO  when a lot of simultenous users try to
> access my Wiki:
>
> INFO  o.x.v.i.DefaultVelocityEngine  - Runtime : ran out of parsers.
> Creating a new one.  Please increment the parser.pool.size property. The
> current value is too small.
>
> Where can I increase this value in XWiki configurations? Is it possible?
>
> Thank you
>
>
> Grupo Energisa
> Danilo A. Oliveira
> Analista Suporte Aplicacao TI - DPTO CORP. DE INFRAESTR. TI
> e-mail: danilo.olive...@energisa.com.br | tel: (32) 3429-6342 | cel: (32)
> 8452-9478
>
> Esta mensagem contém informação confidencial. Se você a recebeu por
> engano, não divulgue ou copie seu conteúdo. Por favor, avise ao remetente
> imediatamente e apague-a do computador.
> Privileged and confidential. If this message has been received by mistake,
> do not disclose or copy its contents. Please notify sender and delete
> immediately.
>
>
> ___
> 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] No create wiki menu in XWiki 5.4.3

2014-04-03 Thread Jeremie BOUSQUET
2014-04-03 10:09 GMT+02:00 Jeremie BOUSQUET :

>
>
>
> 2014-04-03 9:08 GMT+02:00 Jeremie BOUSQUET :
>
>
>>
>>
>> 2014-04-02 18:19 GMT+02:00 Guillaume "Louis-Marie" Delhumeau <
>> gdelhum...@xwiki.com>:
>>
>> 2014-03-28 15:53 GMT+01:00 Jeremie BOUSQUET :
>>>
>>> > Hello,
>>> >
>>> > Just migrated from 4.5.2 to 5.4.3, and it worked perfectly except some
>>> > "issues" (or misunderstandings) :
>>> > - My user is in an admin group with admin and PR rights, and I've set
>>> it
>>> > also (on the group) the "create wiki" right. Still, when logged in, I
>>> don't
>>> > have any "wiki" item in the "Add" menu (only usual space, page, ...).
>>> I'm
>>> > sure I'm missing something obvious but can't find it.
>>> >
>>>
>>> Can you display, somewhere, $isWikiUIAvailable and $hasCreateWiki in a
>>> {{velocity}} macro?
>>>
>>
>> It shows this:
>> isWikiUIAvailable : false
>> hasCreateWiki : true
>>
>> I checked, and I have the following extension installed:
>>
>> org.xwiki.platform:xwiki-platform-wiki-ui-mainwiki 5.4.3
>>
>> I thought it to be the "wiki ui" ?
>>
>
> After some searching, menuview.vm checks for "WikiManager.WebHome" page
> from main wiki, and though it should be part of
> xwiki-platform-wiki-ui-mainwiki (that is installed), that page doesn't
> exist in my wiki...
> So I'm not sure what happened, but I tried to uninstall it in order to
> reinstall it and got:
>
> Extension [org.xwiki.platform:xwiki-platform-wiki-ui-mainwiki] is not
> installed
>
> I checked permanent data directory and found:
>
>
> /data/extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-wiki-ui-mainwiki/5%2E4%2E3
>   org%2Exwiki%2Eplatform%3Axwiki-platform-wiki-ui-mainwiki-5%2E4%2E3.xar
>   org%2Exwiki%2Eplatform%3Axwiki-platform-wiki-ui-mainwiki-5%2E4%2E3.xed
>
> I'm a bit surprised by the escaped dots in version folder, but maybe it's
> normal ... ?
>

Sorry I should have tested more before posting, in fact it was "uninstall
on farm" that was causing the error, "uninstall" worked correctly, after
re-installing xwiki-platform-wiki-ui-mainwiki, the menus show up nicely ! :)
What I really don't know, if what caused that, and what I could do wrong
during migration ... I'm afraid I didn't take note of everything I did for
this migration, but apparently all was ok.
Also not sure if I could have issues with other extensions that appear
"installed" but in fact are not, difficult to find them. I think it's
unusual, because in such cases usually EM clearly states the extension is
"invalid" (but many not for missing pages).
I noted also something, in extension repository in data directory, there's
a mix of extension folders starting with "org.xwiki" and "org%2Exwiki". I
don't know if my issue comes from that or not.


>
>
>>
>> ___
>>> 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] No create wiki menu in XWiki 5.4.3

2014-04-03 Thread Jeremie BOUSQUET
2014-04-03 9:08 GMT+02:00 Jeremie BOUSQUET :

>
>
>
> 2014-04-02 18:19 GMT+02:00 Guillaume "Louis-Marie" Delhumeau <
> gdelhum...@xwiki.com>:
>
> 2014-03-28 15:53 GMT+01:00 Jeremie BOUSQUET :
>>
>> > Hello,
>> >
>> > Just migrated from 4.5.2 to 5.4.3, and it worked perfectly except some
>> > "issues" (or misunderstandings) :
>> > - My user is in an admin group with admin and PR rights, and I've set it
>> > also (on the group) the "create wiki" right. Still, when logged in, I
>> don't
>> > have any "wiki" item in the "Add" menu (only usual space, page, ...).
>> I'm
>> > sure I'm missing something obvious but can't find it.
>> >
>>
>> Can you display, somewhere, $isWikiUIAvailable and $hasCreateWiki in a
>> {{velocity}} macro?
>>
>
> It shows this:
> isWikiUIAvailable : false
> hasCreateWiki : true
>
> I checked, and I have the following extension installed:
>
> org.xwiki.platform:xwiki-platform-wiki-ui-mainwiki 5.4.3
>
> I thought it to be the "wiki ui" ?
>

After some searching, menuview.vm checks for "WikiManager.WebHome" page
from main wiki, and though it should be part of
xwiki-platform-wiki-ui-mainwiki (that is installed), that page doesn't
exist in my wiki...
So I'm not sure what happened, but I tried to uninstall it in order to
reinstall it and got:

Extension [org.xwiki.platform:xwiki-platform-wiki-ui-mainwiki] is not
installed

I checked permanent data directory and found:

/data/extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-wiki-ui-mainwiki/5%2E4%2E3
  org%2Exwiki%2Eplatform%3Axwiki-platform-wiki-ui-mainwiki-5%2E4%2E3.xar
  org%2Exwiki%2Eplatform%3Axwiki-platform-wiki-ui-mainwiki-5%2E4%2E3.xed

I'm a bit surprised by the escaped dots in version folder, but maybe it's
normal ... ?


>
> ___
>> 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] No create wiki menu in XWiki 5.4.3

2014-04-03 Thread Jeremie BOUSQUET
2014-04-02 18:19 GMT+02:00 Guillaume "Louis-Marie" Delhumeau <
gdelhum...@xwiki.com>:

> 2014-03-28 15:53 GMT+01:00 Jeremie BOUSQUET :
>
> > Hello,
> >
> > Just migrated from 4.5.2 to 5.4.3, and it worked perfectly except some
> > "issues" (or misunderstandings) :
> > - My user is in an admin group with admin and PR rights, and I've set it
> > also (on the group) the "create wiki" right. Still, when logged in, I
> don't
> > have any "wiki" item in the "Add" menu (only usual space, page, ...). I'm
> > sure I'm missing something obvious but can't find it.
> >
>
> Can you display, somewhere, $isWikiUIAvailable and $hasCreateWiki in a
> {{velocity}} macro?
>

It shows this:
isWikiUIAvailable : false
hasCreateWiki : true

I checked, and I have the following extension installed:

org.xwiki.platform:xwiki-platform-wiki-ui-mainwiki 5.4.3

I thought it to be the "wiki ui" ?

___
> 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] No create wiki menu in XWiki 5.4.3

2014-04-02 Thread Jeremie BOUSQUET
Hello,


2014-04-02 10:21 GMT+02:00 Marius Dumitru Florea <
mariusdumitru.flo...@xwiki.com>:

> On Fri, Mar 28, 2014 at 4:53 PM, Jeremie BOUSQUET
>  wrote:
> > Hello,
> >
> > Just migrated from 4.5.2 to 5.4.3, and it worked perfectly except some
> > "issues" (or misunderstandings) :
> > - My user is in an admin group with admin and PR rights, and I've set it
> > also (on the group) the "create wiki" right. Still, when logged in, I
> don't
> > have any "wiki" item in the "Add" menu (only usual space, page, ...). I'm
> > sure I'm missing something obvious but can't find it.
>
> > - I show the Blog in a gadget of the Dashboard. Weirdly, "permalinks"
> > correctly point to each blog entry, but the link from page title points
> to
> > a create action (though it points apparently to exact same url as
> permalink
> > except for the "create" action). The same for the buttons on right side
> of
> > each blog subject (create/delete/)
>
> Does this happen on a subwiki?


No it's on main wiki, anyway I'm not able to create sub-wikis because of
first point I listed ;)


> The default UI for subwikis doesn't
> include the Blog application any more in 5.4.3 so the Blog application
> is removed during the upgrade. You should have been asked to confirm
> the deletion of unused wiki pages during the upgrade and the Blog code
> pages must have been among those pages. See
>
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Extension+Manager+Application#HDeleteUnusedWikiPages
>
. The upgrade doesn't remove the pages created by the user (e.g. the
> blog posts). That's why the links to the Blog UI pages have /create/
> action (they have been removed) and the links to the blog posts are
> fine (they have been kept).
>

I'm not sure of what is the difference between a Blog UI page and a blog
post page here ...
Example of bad link (ko):
http://host:port/xwiki/bin/create/Blog/TOTO?parent=Main.WebHome
Permalink for same post (ok):
http://host:port/xwiki/bin/view/Blog/TOTO

I wonder if both points I list may be linked together ...
Currently I cloned my original instance to test migration, and it's now
configured as follow:
DB : mysql, schema "xwikinew", user "xwiki"
xwiki.cfg : "xwiki.db=xwikinew"


>
> Hope this helps,
> Marius
>
> >
> > Thanks,
> > Jeremie
> > ___
> > 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] No create wiki menu in XWiki 5.4.3

2014-03-28 Thread Jeremie BOUSQUET
Hello,

Just migrated from 4.5.2 to 5.4.3, and it worked perfectly except some
"issues" (or misunderstandings) :
- My user is in an admin group with admin and PR rights, and I've set it
also (on the group) the "create wiki" right. Still, when logged in, I don't
have any "wiki" item in the "Add" menu (only usual space, page, ...). I'm
sure I'm missing something obvious but can't find it.
- I show the Blog in a gadget of the Dashboard. Weirdly, "permalinks"
correctly point to each blog entry, but the link from page title points to
a create action (though it points apparently to exact same url as permalink
except for the "create" action). The same for the buttons on right side of
each blog subject (create/delete/)

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


Re: [xwiki-users] XWQL : order by count ?

2014-03-27 Thread Jeremie BOUSQUET
Hello,

Seems every year I hit this problem (ORDER BY COUNT in XWQL causes a parser
exception), so this time I decided to create an issue ... :) :

http://jira.xwiki.org/browse/XWIKI-10189

BR,
Jeremie


2012-05-24 15:13 GMT+02:00 Jeremie BOUSQUET :

> Hello,
>
> Seems I'm back to this problem (XWiki 3.5), and I did not find a
> solution still ...
>
> For example this XWQL request :
>
>select topic.author, count(topic.author)
>  from Document doc, doc.object(MailArchiveCode.MailTopicClass) as topic
> where doc.space<>'MailArchiveCode'
>  group by topic.author
>  order by count(topic.author) desc
>
> ... will throw this exception when executed :
>
> Caused by: org.xwiki.query.jpql.parser.ParserException: [1,165] expecting:
> id
> at org.xwiki.query.jpql.parser.Parser.parse(Parser.java:1247)
> at
> org.xwiki.query.jpql.internal.JPQLParser.parse(JPQLParser.java:46)
> at
> org.xwiki.query.xwql.internal.hql.XWQLtoHQLTranslator.translate(XWQLtoHQLTranslator.java:55)
> at
> org.xwiki.query.xwql.internal.XWQLQueryExecutor.execute(XWQLQueryExecutor.java:78)
> ... 123 more
>
> Column 165 refers to the count in the order by clause.
>
> This does not work better :
>
>select topic.author, count(topic.author)
>  from Document doc, doc.object(MailArchiveCode.MailTopicClass) as topic
> where doc.space<>'MailArchiveCode'
>  group by topic.author
>  order by 2 desc
>
> It does not work with a MySQL nor HSQLDB default db.
>
> If I remove the order by clause, the query works correctly.
>
> I think it's strange because for me ORDER BY COUNT() is valid
> in JPQL ? As long as the expression is also present in the SELECT
> clause.
>
> Thanks,
> Jeremie
>
>
> 2011/10/18 jerem 
> >
> > Hi,
> >
> > I'm trying to use XWQL query language to select count of authors and
> would
> > like to order this by descending order of this count.
> >
> > I ended up having this work fine :
> >
> > "select count(myobject.author), myobject.author from Document as doc,
> > doc.object(Space.MyClass) as myobject group by myobject.author"
> >
> > But adding " order by count(myobject.author) desc" leads to an error for
> > translating the query ...
> > Adding "AS" in the select expression does not seem to work either.
> >
> > Is this possible in XWQL and how ?
> >
> > Thanks,
> > Jeremie
> >
> > --
> > View this message in context:
> http://xwiki.475771.n2.nabble.com/XWQL-order-by-count-tp6904819p6904819.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
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Attachments on new pages that contain 'Objects' of 'Class'.

2014-03-27 Thread Jeremie BOUSQUET
Hello,

Personnally I would merely add some hints on concerned fields (wysiwyg,
attachment chooser, ...) to warn users that they must first save the page
one time THEN re-edit it to add this information, or you could update your
Sheet in edit mode to not display those fields if object does not yet exist.
That's what is done on xwiki org when you contribute an extension.

BR,
Jeremie


2014-03-27 10:16 GMT+01:00 Gerritjan Koekkoek :

> XWiki has the nice feature of Class and Class related sheets and templates.
> I feel there is a annoying bug with regard to uploading attachments,
> although XWiki experts explain why it's happening. (they do not confirm
> it's a BUG!!)
>
> When you create a Class, Sheet and Template there is a moment to add a
> new-object on a page.
> In XWiki you could, like app-within-minutes, create a button: Create new
> "record of something"
>
> The user will then see a new-page in inline edit mode (a html form) and
> usually a few buttons:
> Save and View, Save and Continue and Cancel.
>
> I think the last one: 'Cancel' is why the 'In my opinion BUG' is happening.
> The new document and object are not yet saved... You are first considered
> to fill in the form and when you reconsider or not able to fill in all the
> required fields there is 'Cancel'; nothing saved and gentle exit (although
> sometimes you get: XWiki document does not exist, a smarter CANCEL that
> would redirect you to the page with the creation option...)
>
> But now about my BUG; If the form contains a option to upload a attachment
> (like the avatar image on XWikiUsers) we get very user unfriendly things.
> The explanation of the error is; you can not attach anything to a page not
> yet saved!
> But the results are quite dramatic; a page, sometimes two are created, but
> not containing any object (so all the data in the form is lost). The user
> is not informed about what happened...
>
> What coding can be done to prevent the above..
>
> Why I consider it a BUG? The same problem occurs when you have a Large Text
> field with the wysywig editor. This editor has a button 'Image' or
> 'Attachment'. How can we then prevent the problem occurring?
>
> Gerritjan
> ___
> 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] Can't install Column Macro due to lack of Programming Rights

2014-03-18 Thread Jeremie BOUSQUET
You need to:
- give PR right to the GLOBAL Admin user, or to your administrative user
(not on XWiki space specifically, but globally for that user)
- be logged with this GLOBAL user when you try to install the extension
For the first part, you need to check that you are in the global
administration section of your main wiki (not in a space admin, not in a
subwiki).
For the second part, you can check if your user is local or global by going
to the profile (top-right), and check the url. If that url targets a
subwiki your user is a local user and it's no good. Logout, browse to the
main wiki, and login again.


2014-03-18 7:57 GMT+01:00 Hamster :

> -bump-
>
>
>
> --
> View this message in context:
> http://xwiki.475771.n2.nabble.com/Can-t-install-Column-Macro-due-to-lack-of-Programming-Rights-tp7589568p7589641.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
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Blocking jobs

2014-03-18 Thread Jeremie BOUSQUET
Hello Thomas,


2014-03-18 8:49 GMT+01:00 Thomas Mortagne :

> Yes there is only a single queue right now. See
> http://jira.xwiki.org/browse/XCOMMONS-400, did not had time to work on
> it yet.
>

Sorry, forgot to check JIRA about this ...


>
> On Mon, Mar 17, 2014 at 9:40 PM, Jeremie BOUSQUET
>  wrote:
> > Hello,
> >
> > I designed my mail archive to use the nice Job module, but seems I just
> > realized an unexpected side-effect of it ...
> > The job module queues jobs in a blocking queue. The unexpected, is that
> > only one job (of any kind) can run at a time in an xwiki instance
> (unless I
> > misunderstood something which is always possible).
> >
> > Currently, the mail archive creates jobs for loading emails, and these
> jobs
> > can be long-lived (say, 15min, 30min, or more...). It means that during
> > this time, you cannot install any extension anymore with EM, and anything
> > you do with EM (like, compute an extension plan, install an extension,
> etc)
> > is blocked until the mail archive job ends.
> >
> > Do you see any way around this ? (I could shorten the life duration of
> mail
> > archive jobs, but I don't think it's a correct workaround).
>
> Note that the default job manager is actually not doing much, most of
> the work is done by the job itself generally so the meantime solution
> is to do its job yourself.
>
> In the meantime there is two possibility used in other modules:
> 1) you just want to run a single job in it's own thread: take care
> yourself of the threading. Here is an example:
>
> https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/DefaultSolrIndexer.java#L542
> 2) you need a queue too but your own queue: extends DefaultJobManager
> in your own manager. Here is an example:
>
> https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/DefaultSolrIndexer.java#L542t
>
>
Thanks I think I'll go for something like that ...
If I'm in the mood I may try to make a "multi-queue" job manager with a
different hint.



>  > Seems logical to restrict one job at a time per job type for example,
> but
> > jobs of different types may execute concurrently with no harm I think ...
>
> It's been first implemented for Extension Manager needs and then moved
> to commons, this is why it's a single queue. But there is no doubt
> that it's not enough, just did not had time to work on it and wanted
> to review the new JBatch jsr before going further in Job module (see
> jira.xwiki.org/browse/XCOMMONS-443) but did not had much time either
> on that subject.
>
> >
> > By the way the other side-effect is that my mailarchive jobs (which
> purpose
> > are to be scheduled periodically), can "stack" on each other, if
> > periodicity is shorter than job duration. My intent was to just reject a
> > job if another is running for the mail archive to avoid this "stack"
> > effect, but as it's "locked" before getting a chance to execute, it's
>
> Job module does not yet support scheduling (but yes it's a goal) so
> not sure job manager is the best fit right now. What you could do for
> now maybe is to use something like quartz internally to call you when
> you need to do 1) basically.
>

Well currently I just use the Scheduler for this purpose, the Scheduler job
calls the API of my component that in turns runs the job from job manager.
That part fits my needs already :)


>
> > useless.
> >
> > Thanks,
> > Jeremie
> > ___
> > 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] Blocking jobs

2014-03-17 Thread Jeremie BOUSQUET
Hello,

I designed my mail archive to use the nice Job module, but seems I just
realized an unexpected side-effect of it ...
The job module queues jobs in a blocking queue. The unexpected, is that
only one job (of any kind) can run at a time in an xwiki instance (unless I
misunderstood something which is always possible).

Currently, the mail archive creates jobs for loading emails, and these jobs
can be long-lived (say, 15min, 30min, or more...). It means that during
this time, you cannot install any extension anymore with EM, and anything
you do with EM (like, compute an extension plan, install an extension, etc)
is blocked until the mail archive job ends.

Do you see any way around this ? (I could shorten the life duration of mail
archive jobs, but I don't think it's a correct workaround).
Seems logical to restrict one job at a time per job type for example, but
jobs of different types may execute concurrently with no harm I think ...

By the way the other side-effect is that my mailarchive jobs (which purpose
are to be scheduled periodically), can "stack" on each other, if
periodicity is shorter than job duration. My intent was to just reject a
job if another is running for the mail archive to avoid this "stack"
effect, but as it's "locked" before getting a chance to execute, it's
useless.

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


Re: [xwiki-users] crash on tomcat 7.0.47 with xwiki 5.4.2

2014-03-17 Thread Jeremie BOUSQUET
With PermSize equal to 256m, I had no outofmemory permgen anymore, but I'm
not on same system, and not on same xwiki version, so it doesn't mean much
...

But if you had no issue with 5.4.1, there may be some something either
"memory-demanding" in new wiki version, or some leak or whatever ...


2014-03-17 17:18 GMT+01:00 Pascal BASTIEN :

> Oups about permsize! :-/
>
> Thxs I try that then:
> JAVA_OPTS="-server -Xms1724m -Xmx1724m -XX:PermSize=256M
> -XX:MaxPermSize=512m -Dfile.encoding=utf-8 -Djava.awt.headless=true
> -XX:+UseParallelGC -XX:MaxGCPauseMillis=100
> -Dhttp.proxyHost=beast.dom.cpii.i2 -Dhttp.proxyPort=8080"
>
> For instant, we are me and ... my boss on xwiki and there aren't a lot of
> page.
> But in 2 weeks we will be 1000 or more...
>
>
>   --
>  *De :* Jeremie BOUSQUET 
>
> *À :* Pascal BASTIEN ; XWiki Users <
> users@xwiki.org>
> *Envoyé le :* Lundi 17 mars 2014 16h49
>
> *Objet :* Re: [xwiki-users] crash on tomcat 7.0.47 with xwiki 5.4.2
>
> Hello,
>
> It may be something else (see error about AsyncHttpClient-Callback), but
> basically it seems you JVM is missing memory. 800m may be a bit too small.
> I know it's the recommendation for large installs, but in my case at least
> I had to put more than that (about 1724m, but there's no "generic" number
> of course).
> Is your wiki very "big" ? (in terms of number of pages for example)
> Also it seems a bit weird that "PermSize" is larger than "MaxPermSize" in
> you OPTS.
>
> BR,
> Jeremie
>
>
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Extending administrative ui

2014-03-17 Thread Jeremie BOUSQUET
Yes same link I pasted already ;-)

I'm wondering, if it's possible to have this ConfigurableClass show this
specific Sheet in Administration UI, globally and for each Space, as
requested by kalor.
Or if, as I understand it, your choice is only to show it in global admin
ui, or in admin ui of the Space where reside the application (ie, only when
administering space "XWiki", in this case).


2014-03-17 17:08 GMT+01:00 Thomas Mortagne :

> See
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Administration+Application#HMakingyourapplicationeasilyconfigurablewithConfigurableClass28SinceEnterprise2.3M129
>
> On Mon, Mar 17, 2014 at 4:40 PM, Jeremie BOUSQUET
>  wrote:
> > Hello,
> >
> > In fact ConfigurableClass allows you to "plug" a specific Sheet (used to
> > fill some properties from a class from an object from a specific page) in
> > the admin UI of XWiki.
> > So you can normally:
> > - add some properties to the class XWiki.XWikiPreferences
> > - create a page containing a Sheet to view/edit those new properties
> > - (create a page holding an object for those properties) --> this is
> > already the preferences pages
> > - add a ConfigurableClass object to "plug" your sheet into the admin UI.
> As
> > it should be added to the page that holds configuration, I think you have
> > to add it to the XWiki.XWikiPreferences page.
> >
> > The Sheet will show properties you want from XWiki.XWikiPreferences
> class,
> > and so when you save it will update the preferences object of the page.
> For
> > the configuration on Space per Space basis I suppose it's the purpose of
> > the option "configureGlobally" - but I never tested that.
> > I'm not sure I'm very clear ... :)
> >
> > BR,
> > Jeremie
> >
> >
> >
> > 2014-03-17 12:59 GMT+01:00 kalor :
> >
> >> Thank you for your answer.
> >> If I understand it correctly this will work for some document I create
> >> adding ConfigurableClass and my custom class with configuration, and
> will
> >> be
> >> shown in configuration for space where my document is created.
> >>
> >> But is there a way to use XWikiPreferences extended by some properties
> and
> >> edit those new properties in admin ui? Or is there a way to use custom
> >> class
> >> in the manner XWikiPreferences is used? Generaly I want to make some
> custom
> >> configurations per space, and I want to use getSpacePreference(...)
> method
> >> of XWiki api (using XWikiPreferences would be best for me)
> >>
> >> Best regards
> >> Karol
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://xwiki.475771.n2.nabble.com/Extending-administrative-ui-tp7589610p7589615.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
> >>
> > ___
> > 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] crash on tomcat 7.0.47 with xwiki 5.4.2

2014-03-17 Thread Jeremie BOUSQUET
Hello,

It may be something else (see error about AsyncHttpClient-Callback), but
basically it seems you JVM is missing memory. 800m may be a bit too small.
I know it's the recommendation for large installs, but in my case at least
I had to put more than that (about 1724m, but there's no "generic" number
of course).
Is your wiki very "big" ? (in terms of number of pages for example)
Also it seems a bit weird that "PermSize" is larger than "MaxPermSize" in
you OPTS.

BR,
Jeremie


2014-03-17 15:25 GMT+01:00 Pascal BASTIEN :

> now my xwiki 5.4.2 crash with:
>
> Exception in thread "http://iwiki.cp2i.i2/bin/admin/Menu/WebPreferences";
> Exception: java.lang.OutOfMemoryError thrown from the
> UncaughtExceptionHandler in thread "
> http://iwiki.cp2i.i2/bin/admin/Menu/WebPreferences";
> Exception in thread "AsyncHttpClient-Callback"
> Exception: java.lang.OutOfMemoryError thrown from the
> UncaughtExceptionHandler in thread "AsyncHttpClient-Callback"
> 2014-03-17 15:17:59,664 [http://iwiki.cp2i.i2/bin/view/Main/WebHome]
> WARN  .o.i.DefaultObservationManager - The
> [com.xpn.xwiki.store.XWikiCacheStore] listener has overwritten a previously
> registered listener [com.xpn.xwiki.store.XWikiCacheStore] since they both
> are registered under the same id [XWikiCacheStore]. In the future consider
> removing a Listener first if you really want to register it again.
> Exception in thread "http-bio-8080-exec-7"
> Exception: java.lang.OutOfMemoryError thrown from the
> UncaughtExceptionHandler in thread "http-bio-8080-exec-7"
> Exception in thread "ajp-bio-8009-exec-19"
> Exception: java.lang.OutOfMemoryError thrown from the
> UncaughtExceptionHandler in thread "ajp-bio-8009-exec-19"
> Exception in thread "http-bio-8080-exec-3"
> Exception: java.lang.OutOfMemoryError thrown from the
> UncaughtExceptionHandler in thread "http-bio-8080-exec-3"
> Exception in thread "http-bio-8080-exec-16"
>
>
> with:
> JAVA_OPTS="-server -Xms800m -Xmx800m -XX:PermSize=256M
> -XX:MaxPermSize=196m -Dfile.encoding=utf-8 -Djava.awt.headless=true
> -XX:+UseParallelGC -XX:MaxGCPauseMillis=100
> -Dhttp.proxyHost=beast.dom.cpii.i2 -Dhttp.proxyPort=8080"
>
> Any ideas?
>
> Thxs
>
>
> 
>  De : Valdis Vītoliņš 
> À : Pascal BASTIEN ; XWiki Users  >
> Envoyé le : Mercredi 12 mars 2014 10h46
> Objet : Re: [xwiki-users] crash on tomcat 7.0.47 with xwiki 5.4.2
>
>
> You need to increase permanent space (parameter -XX:MaxPermSize), which
> is used for static objects, and which is never deallocated, e.g.
> -XX:MaxPermSize=256m
>
> Valdis
>
>
> > Hello,
> >
> > With xwiki 5.4.1 I hadn't crash of xwiki but with the last version 5.4.2
> I have 2 crash per day...
> > Log indicate : "java.lang.OutOfMemoryError: PermGen space"
> >
> > Here my catalina.sh
> >
> > JAVA_OPTS="-server -Xms800m -Xmx800m -XX:PermSize=64M
> -XX:MaxPermSize=196m -Dfile.encoding=utf-8 -Djava.awt.headless=true
> -XX:+UseParallelGC -XX:MaxGCPauseMillis=100
> -Dhttp.proxyHost=beast.dom.cpii.i2 -Dhttp.proxyPort=8080"
> >
> > and the log
> >
> ___
> 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] Extending administrative ui

2014-03-17 Thread Jeremie BOUSQUET
Hello,

In fact ConfigurableClass allows you to "plug" a specific Sheet (used to
fill some properties from a class from an object from a specific page) in
the admin UI of XWiki.
So you can normally:
- add some properties to the class XWiki.XWikiPreferences
- create a page containing a Sheet to view/edit those new properties
- (create a page holding an object for those properties) --> this is
already the preferences pages
- add a ConfigurableClass object to "plug" your sheet into the admin UI. As
it should be added to the page that holds configuration, I think you have
to add it to the XWiki.XWikiPreferences page.

The Sheet will show properties you want from XWiki.XWikiPreferences class,
and so when you save it will update the preferences object of the page. For
the configuration on Space per Space basis I suppose it's the purpose of
the option "configureGlobally" - but I never tested that.
I'm not sure I'm very clear ... :)

BR,
Jeremie



2014-03-17 12:59 GMT+01:00 kalor :

> Thank you for your answer.
> If I understand it correctly this will work for some document I create
> adding ConfigurableClass and my custom class with configuration, and will
> be
> shown in configuration for space where my document is created.
>
> But is there a way to use XWikiPreferences extended by some properties and
> edit those new properties in admin ui? Or is there a way to use custom
> class
> in the manner XWikiPreferences is used? Generaly I want to make some custom
> configurations per space, and I want to use getSpacePreference(...) method
> of XWiki api (using XWikiPreferences would be best for me)
>
> Best regards
> Karol
>
>
>
> --
> View this message in context:
> http://xwiki.475771.n2.nabble.com/Extending-administrative-ui-tp7589610p7589615.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
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Extending administrative ui

2014-03-17 Thread Jeremie BOUSQUET
Hi,

I think it may be possible using the ConfigurableClass [1].


BR,
Jeremie

[1] -
http://extensions.xwiki.org/xwiki/bin/view/Extension/Administration+Application#HMakingyourapplicationeasilyconfigurablewithConfigurableClass28SinceEnterprise2.3M129




2014-03-17 11:33 GMT+01:00 kalor :

> Hi,
>
> How is it possible to extend xwiki administrative ui to add my custom
> configuration forms?
> For example, I extended XWikiPreferences class by adding some fields, and
> now I want to be able to configure them through admin ui, not object
> editor.
> I will be gratefull for any tips.
>
> Best regards
> Karol
>
>
>
> --
> View this message in context:
> http://xwiki.475771.n2.nabble.com/Extending-administrative-ui-tp7589610.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
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] PDF export a table crash xwiki 5.4.2

2014-03-17 Thread Jeremie BOUSQUET
Hello,

I just tested on XWiki 4.5.2, and pdf export worked correctly. What version
of XWiki are you using ?

BR,
Jeremie


2014-03-17 11:05 GMT+01:00 Pascal BASTIEN :

> Hello,
>
> My user copy/paste this table from Libreoffice on a xwiki page but wehn he
> try to export in PDF format xwiki crash.
> Do you know this bug?
>
>
> Here the source code of the page:
> ***
> Test export PDF tableau HTML
> (((
> (% cellpadding="4" cellspacing="0" style="page-break-before: always"
> width="100%" %)
> (% style="vertical-align:TOP" %)|(% style="border-top: 1px solid #00;
> border-bottom: 1px solid #00; border-left: 1px solid #00;
> border-right: none; padding-top: 0.1cm; padding-bottom: 0.1cm;
> padding-left: 0.1cm; padding-right: 0cm;background-color:#e6e6ff"
> width="25%" %)(% style="font-family: Liberation Sans, sans-serif;
> font-size: 0.8em" %)**Point**|(% style="border-top: 1px solid #00;
> border-bottom: 1px solid #00; border-left: 1px solid #00;
> border-right: none; padding-top: 0.1cm; padding-bottom: 0.1cm;
> padding-left: 0.1cm; padding-right: 0cm;background-color:#e6e6ff"
> width="14%" %)(% style="font-family: Liberation Sans, sans-serif;
> font-size: 0.8em" %)Timing|(% style="border-top: 1px solid #00;
> border-bottom: 1px solid #00; border-left: 1px solid #00;
> border-right: none; padding-top: 0.1cm; padding-bottom: 0.1cm;
> padding-left: 0.1cm; padding-right: 0cm;background-color:#e6e6ff"
> width="23%" %)(% style="font-family:
>  Liberation Sans, sans-serif; font-size: 0.8em" %)Présentation/animation
> du thème|(% style="border: 1px solid #00; padding:
> 0.1cm;background-color:#e6e6ff" width="38%" %)(% style="font-family:
> Liberation Sans, sans-serif; font-size: 0.8em" %)Commentaire
> (% style="vertical-align:TOP" %)|(% height="26" style="border-top: none;
> border-bottom: 1px solid #00; border-left: 1px solid #00;
> border-right: none; padding-top: 0cm; padding-bottom: 0.1cm; padding-left:
> 0.1cm; padding-right: 0cm;background-color:#e6e6e6" width="25%" %)(%
> style="font-family: Liberation Sans, sans-serif; font-size: 0.8em"
> %)**Introduction**|(% style="border-top: none; border-bottom: 1px solid
> #00; border-left: 1px solid #00; border-right: none; padding-top:
> 0cm; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm"
> width="14%" %)(% style="font-family: Liberation Sans, sans-serif;
> font-size: 0.8em" %)10H00 - 10H30|(% style="border-top: none;
> border-bottom: 1px solid #00; border-left: 1px solid #00;
> border-right: none; padding-top: 0cm; padding-bottom: 0.1cm; padding-left:
> 0.1cm; padding-right: 0cm" width="23%" %)(% style="font-family: Liberation
> Sans, sans-serif; font-size: 0.8em" %)g|(%
>  style="border-top: none; border-bottom: 1px solid #00; border-left:
> 1px solid #00; border-right: 1px solid #00; padding-top: 0cm;
> padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm"
> width="38%" %)(((
> (% lang="zxx" style="font-weight: normal" %)
> (% style="font-family: Liberation Sans, sans-serif; font-size: 0.8em"
> %)Attentes
> )))
> (% style="vertical-align:TOP" %)|(% height="33" style="border-top: none;
> border-bottom: 1px solid #00; border-left: 1px solid #00;
> border-right: none; padding-top: 0cm; padding-bottom: 0.1cm; padding-left:
> 0.1cm; padding-right: 0cm;background-color:#e6e6e6" width="25%" %)(((
> (% lang="zxx" %)
> (% style="font-family: Liberation Sans, sans-serif; font-size: 0.8em"
> %)**Bilan**
> )))|(% style="border-top: none; border-bottom: 1px solid #00;
> border-left: 1px solid #00; border-right: none; padding-top: 0cm;
> padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm" width="14%"
> %)(% style="font-family: Liberation Sans, sans-serif; font-size: 0.8em"
> %)16H35-17H00|(% style="border-top: none; border-bottom: 1px solid #00;
> border-left: 1px solid #00; border-right: none; padding-top: 0cm;
> padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm" width="23%"
> %)(% style="font-family: Liberation Sans, sans-serif; font-size: 0.8em"
> %)xxx|(% style="border-top: none; border-bottom: 1px solid #00;
> border-left: 1px solid #00; border-right: 1px solid #00;
> padding-top: 0cm; padding-bottom: 0.1cm; padding-left: 0.1cm;
> padding-right: 0.1cm" width="38%" %)(((
> f
> )))
> )))
>
> fin du tableau
>
> 
> Here the error:
>
> Information détaillée:
> Error number 11015 in 11: Exception while exporting
> com.xpn.xwiki.XWikiException: Error number 11015 in 11: Exception while
> exporting
> at com.xpn.xwiki.web.ExportAction.render(ExportAction.java:82)
> at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:294)
> at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:129)
> at
> org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
> at
> org.apache.struts.action.Requ

Re: [xwiki-users] Dropping support for IE8 in 6.x cycle?

2014-03-12 Thread Jeremie BOUSQUET
Hi Caty,


2014-03-12 8:03 GMT+01:00 Ecaterina Moraru (Valica) :

> Hi Jeremie,
>
> What version of XWiki are you using? Do you plan to upgrade to 6.x? 6.x
> timeframe is by the end of the year (Dec 2014). Do you think you will still
> be using IE8 next year (I don't know either how IT departments schedule the
> upgrades)?
>

Well I currently use both 4.x (prod) and 5.x (tests). Usually I wait for
several iterations (near the end of an xwiki cycle or even far after the
end) to put a version in prod. I upgrade test server, when I think about it
or have some time to do so :) I think my next move will be to upgrade prod
to last 5.x version available, and there are chances that I stick on it for
a long time.
For IE8 I really don't know when it may be upgraded by our IT. Currently we
can upgrade by ourselves, but as we need to support IE8 on our own products
right now, it's somewhat easier to stick with it on our computers.

Obviously, I don't mean in any way that you should stick with IE8, just
providing my own feedback :) If you have to I'll adapt to the choice.
I think there's also a difference, between stopping support of a specific
browser version (and usually, there are chances that issues appear only
later, and that you can still use old version with almost no impact for
some time), and moving to a new technology or architecture that implies a
complete break of usability on old versions. Here I suspect it may be more
of the second kind. Gmail does not support IE8, but for the time being, the
only impact I saw personnally, is a message with a recommendation to
upgrade my browser version ...


>
> Thanks,
> Caty
>
>
> On Tue, Mar 11, 2014 at 10:23 PM, Jeremie BOUSQUET <
> jeremie.bousq...@gmail.com> wrote:
>
> > Hello,
> >
> > Well, not everyone is that lucky :)
> > Currently as you said it's an Enterprise wiki, and some enterprises do
> not
> > necessarily shine with being up-to-date. Currently in mine our official
> > browser is still IE8. And most of our customers also stick to IE8. In
> this
> > kind of context there is no solution, except praying that your IT will
> > schedule some upgrade not too far from now.
> > Not saying this is representative of the majority - I have no idea. I
> hope
> > not.
> >
> > 4 years seem quite old, but in my opinion it's quite sad to see that many
> > web apps have to drop support for so recent browsers versions, due to
> > maintenance costs (though completely understandable). We could have
> > imagined that a responsive js framework could gracefully manage when
> > browser is not responsive (do you remember, when web sites could imagine
> > that you didn't want to activate javascript and still "work" ? :) ). If
> the
> > intention of these frameworks is to reach everyone everywhere from every
> > device, then it would seem logical to manage every browser ;-) But I must
> > say I'm not sure of what it means, or amount of work that would be
> needed.
> >
> > BR,
> > Jeremie
> >
> > PS: my own computer is more than 4 years old :)
> >
> >
> >
> > 2014-03-11 20:03 GMT+01:00 Leonardo Kodato :
> >
> > > I think if even google dropped support to IE8(in their apps), why would
> > you
> > > maintain it?
> > > Besides, no one wants to make thousands of hacks just to support an old
> > > browser.
> > > And Xwiki is not just a wiki. Is a 2.0 Enterprise Wiki. IE8 doesn't
> sound
> > > well with 2.0 hahaha.
> > >
> > > Btw, 4 years is a lot of time. Who has a 4 year computer today?
> > > You lost some old browser users, but you win some android, iPad and
> > Iphone
> > > users.
> > >
> > > That's is what I think as a user and a html developer.
> > >
> > > Thank you =).
> > >
> > >
> > >
> > >
> > > 2014-03-11 11:35 GMT-03:00 Ecaterina Moraru (Valica) <
> vali...@gmail.com
> > >:
> > >
> > > > The current supported browser list is available here
> > > > http://dev.xwiki.org/xwiki/bin/view/Community/BrowserSupportStrategy
> > > >
> > > > Thanks,
> > > > Caty
> > > >
> > > >
> > > > On Tue, Mar 11, 2014 at 4:32 PM, Ecaterina Moraru (Valica) <
> > > > vali...@gmail.com> wrote:
> > > >
> > > > > Hi everyone,
> > > > >
> > > > > For the 6.x cycle (
> > > http://www.xwiki.org/xwiki/bin/view/Roadmaps/WebHome)
> > > > we plan to develop a new skin Flamingo (
> > > &g

Re: [xwiki-users] Dropping support for IE8 in 6.x cycle?

2014-03-11 Thread Jeremie BOUSQUET
Hello,

Well, not everyone is that lucky :)
Currently as you said it's an Enterprise wiki, and some enterprises do not
necessarily shine with being up-to-date. Currently in mine our official
browser is still IE8. And most of our customers also stick to IE8. In this
kind of context there is no solution, except praying that your IT will
schedule some upgrade not too far from now.
Not saying this is representative of the majority - I have no idea. I hope
not.

4 years seem quite old, but in my opinion it's quite sad to see that many
web apps have to drop support for so recent browsers versions, due to
maintenance costs (though completely understandable). We could have
imagined that a responsive js framework could gracefully manage when
browser is not responsive (do you remember, when web sites could imagine
that you didn't want to activate javascript and still "work" ? :) ). If the
intention of these frameworks is to reach everyone everywhere from every
device, then it would seem logical to manage every browser ;-) But I must
say I'm not sure of what it means, or amount of work that would be needed.

BR,
Jeremie

PS: my own computer is more than 4 years old :)



2014-03-11 20:03 GMT+01:00 Leonardo Kodato :

> I think if even google dropped support to IE8(in their apps), why would you
> maintain it?
> Besides, no one wants to make thousands of hacks just to support an old
> browser.
> And Xwiki is not just a wiki. Is a 2.0 Enterprise Wiki. IE8 doesn't sound
> well with 2.0 hahaha.
>
> Btw, 4 years is a lot of time. Who has a 4 year computer today?
> You lost some old browser users, but you win some android, iPad and Iphone
> users.
>
> That's is what I think as a user and a html developer.
>
> Thank you =).
>
>
>
>
> 2014-03-11 11:35 GMT-03:00 Ecaterina Moraru (Valica) :
>
> > The current supported browser list is available here
> > http://dev.xwiki.org/xwiki/bin/view/Community/BrowserSupportStrategy
> >
> > Thanks,
> > Caty
> >
> >
> > On Tue, Mar 11, 2014 at 4:32 PM, Ecaterina Moraru (Valica) <
> > vali...@gmail.com> wrote:
> >
> > > Hi everyone,
> > >
> > > For the 6.x cycle (
> http://www.xwiki.org/xwiki/bin/view/Roadmaps/WebHome)
> > we plan to develop a new skin Flamingo (
> > > http://design.xwiki.org/xwiki/bin/view/Improvements/Skin4x ).
> > > One of the advantages of this skin is that is **responsive**. Currently
> > > IE8 doesn't natively support this functionality.
> > >
> > > I am wondering how many of you are using this browser and how difficult
> > > would be upgrade to a newer version of IE (IE10, IE11).
> > >
> > > IE8 was released in March 2009 (4 years ago)
> > > IE9 - March 2011 (2 years ago)
> > > IE10 - Sept 2012 (17 months ago)
> > > IE11 - Oct 2013 (4 month ago)
> > >
> > > Let me know of any other problems that could prevent us from dropping
> the
> > > IE8 support.
> > >
> > > Thanks,
> > > Caty
> > >
> > ___
> > 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] Add yourself to the XWiki community map!

2014-03-10 Thread Jeremie BOUSQUET
Hi Vincent,

Just added myself, after figuring out the particular ergonomics of google
maps ... :)

BR,
Jeremie


2014-03-10 9:19 GMT+01:00 vinc...@massol.net :

> Hi XWiki users,
>
> It would really help if you could add yourself to the xwiki users google
> map:
> http://bit.ly/1iqiEbP
>
> There are currently only 40 or so persons added, that doesn't represent
> the xwiki community! The XWiki project has about 30K downloads every month
> and there are probably about 10K active instances of XWiki in the world, so
> come on, don't be shy and help the xwiki project feel like a true user
> community by adding yourself to this map :) This will allow to organize
> user meetups in the future for example so it's important you add yourself.
>
> Display XWiki Users, Groups & Staff on a larger map
>
>
> Thanks a lot
> -Vincent
> ___
> 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] Container macro with more than 2 columns

2014-03-07 Thread Jeremie BOUSQUET
Thanks,

In fact I forgot about the section / column macros, I used them some years
ago, before replacing them with container macro (as it's bundled in xwiki
while section/column macros are retired).
I see why it didn't have this problem, it's because it was using inline
styles - so no pb with css injection...
I may use this as a temporary workaround though, so thanks again,

BR,
Jeremie



2014-03-07 11:39 GMT+01:00 Hamster :

> Jerem,
>
> Nice to see someone else with the same problem we had :-)
>
> I run into this problem when I added a custom macro which displayed a TOC
> on
> a page in multiple columns. The user can choose how many columns the TOC
> should have (for example 3), and the TOC would show all child-pages in 3
> columns.
>
> But when I added my macro to our dashboard, I noticed that the number of
> columns was being ignored.
> Reason: the dashboard is using the {{container}} macro to display the
> columns in the dashboard. It turns out that an XWiki page is listening to
> only 1 {{container}} macro (and thus ignored my custom macro).
>
>
>
> I do have a solution for you...use a different macro!
>
> We are now using the  Column Macro
>   .
>
> {{section}}
> {{column}}
> a
> {{/column}}
>
> {{column}}
> b
> {{/column}}
>
> {{column}}
> c
> {{/column}}
> {{/section}}
>
> Hope this helps!
>
>
>
> --
> View this message in context:
> http://xwiki.475771.n2.nabble.com/Container-macro-with-more-than-2-columns-tp7589422p7589467.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
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Container macro with more than 2 columns

2014-03-06 Thread Jeremie BOUSQUET
Hello,

I don't know if it is the place to discuss issues, or if I should put the
following as comment of the issue in jira, but ... I can put it afterwards
in jira.

I thought about it, and imagined that only way around, would be to assign a
different "id" to the column elements added by each different {{container}}
macro.

For example the following:
{{container}}
...3 columns...
{{/container}}
{{container}}
...2 columns...
{{/container}}

Would generate html :


... columns...


...columns...


columns css would be injected twice with:
/columns.css?columns=3&id=container1
/columns.css?columns=2&id=container2
(but I don't know if it's even possible to inject it twice with same name
and different params as currently it's not the case) (*)

In CSS column width would be computed from number of columns, and selector
changed to:

#${request.id}.container-columns .column { ...}

WDYT ?
2 problems I see are:
- point (*) above
- generate automatically an id for the container (and how ?) like
"containerN", or force passing a new parameter "id" to the container macro
(or maybe syntax (% id=... %) could work ?)

BR,
Jeremie



2014-03-05 17:25 GMT+01:00 Jeremie BOUSQUET :

> Thanks Vincent,
>
> I created a JIRA for it:
> http://jira.xwiki.org/browse/XWIKI-10118
>
> I nailed the problem maybe, but I didn't nail the solution :) Doesn't seem
> so easy ...
>
> BR,
> jeremie
>
>
> 2014-03-05 17:03 GMT+01:00 vinc...@massol.net :
>
> Hi Jeremie,
>>
>> I think it's Anca who coded this container macro so I don't know the
>> details but it looks like a bug indeed.
>>
>> I'd file a jira issue if I were you since it seems like you nailed the
>> problem :)
>>
>> Thanks
>> -Vincent
>>
>> On 5 Mar 2014 at 16:55:30, Jeremie BOUSQUET (jeremie.bousq...@gmail.com
>> (mailto:jeremie.bousq...@gmail.com)) wrote:
>>
>> > Hello,
>> >
>> > I have a weird issue with {{container}} macro in xwiki 4.5.2.
>> > If I want to display 3 columns, like this for example:
>> >
>> > {{container layoutStyle="columns"}}
>> > ((( a )))
>> > ((( b )))
>> > ((( c )))
>> > {{/container}}
>> >
>> > It shows content over only 2 columns like this:
>> > a b
>> > c
>> >
>> > ... instead of expected:
>> > a b c
>> >
>> > After having a look at the source :
>> >
>> https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-4.5.2/xwiki-platform-core/xwiki-platform-rendering/xwiki-platform-rendering-macros/xwiki-platform-rendering-macro-container/src/main/java/org/xwiki/rendering/internal/macro/container/ColumnsLayoutManager.java
>> >
>> > ... I think I understand the problem.
>> > It seems a limitation of container macro, is that it injects
>> columns.css in
>> > the page with number of columns as parameter. So if you add more than
>> one
>> > {{container}} to the same page, they can't have a different number of
>> > columns ...
>> > For instance in my case I used the container macro in a Panel, with 2
>> > columns - so I can never add more than 2 columns in other locations. I
>> > removed the columns from the Panel, and now my 3-columns are correctly
>> > displayed :)
>> >
>> > If you agree I could fill a Jira for this (I searched quickly, didn't
>> find
>> > it already described)
>> >
>> > Thanks,
>> > Jeremie
>> > ___
>> > 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] Container macro with more than 2 columns

2014-03-05 Thread Jeremie BOUSQUET
Thanks Vincent,

I created a JIRA for it:
http://jira.xwiki.org/browse/XWIKI-10118

I nailed the problem maybe, but I didn't nail the solution :) Doesn't seem
so easy ...

BR,
jeremie


2014-03-05 17:03 GMT+01:00 vinc...@massol.net :

> Hi Jeremie,
>
> I think it's Anca who coded this container macro so I don't know the
> details but it looks like a bug indeed.
>
> I'd file a jira issue if I were you since it seems like you nailed the
> problem :)
>
> Thanks
> -Vincent
>
> On 5 Mar 2014 at 16:55:30, Jeremie BOUSQUET (jeremie.bousq...@gmail.com
> (mailto:jeremie.bousq...@gmail.com)) wrote:
>
> > Hello,
> >
> > I have a weird issue with {{container}} macro in xwiki 4.5.2.
> > If I want to display 3 columns, like this for example:
> >
> > {{container layoutStyle="columns"}}
> > ((( a )))
> > ((( b )))
> > ((( c )))
> > {{/container}}
> >
> > It shows content over only 2 columns like this:
> > a b
> > c
> >
> > ... instead of expected:
> > a b c
> >
> > After having a look at the source :
> >
> https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-4.5.2/xwiki-platform-core/xwiki-platform-rendering/xwiki-platform-rendering-macros/xwiki-platform-rendering-macro-container/src/main/java/org/xwiki/rendering/internal/macro/container/ColumnsLayoutManager.java
> >
> > ... I think I understand the problem.
> > It seems a limitation of container macro, is that it injects columns.css
> in
> > the page with number of columns as parameter. So if you add more than one
> > {{container}} to the same page, they can't have a different number of
> > columns ...
> > For instance in my case I used the container macro in a Panel, with 2
> > columns - so I can never add more than 2 columns in other locations. I
> > removed the columns from the Panel, and now my 3-columns are correctly
> > displayed :)
> >
> > If you agree I could fill a Jira for this (I searched quickly, didn't
> find
> > it already described)
> >
> > Thanks,
> > Jeremie
> > ___
> > 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


  1   2   3   4   >