Re: [xwiki-users] [VOTE] Enable default actions for the Flamingo top menu entries

2014-12-05 Thread Pascal BASTIEN
May I? (you send mail at user list)... then +1
On 6.3 I still use 6.2 menu (I modified the template on my xwiki)

I'm agree with you the 2 side of button must be better separate (with color on 
hoover or a black vertical bar?).

IMO we must respect the same logic of actions button (an one-click default 
action and drop down sub menu level at the right-side-click )
With CSS it should be possible to:- use 2 side button on big screen- use GoTo 
menu on small screen
(with @media min-width)

Thxs
Pascal BASTIEN
  De : Marius Dumitru Florea mariusdumitru.flo...@xwiki.com
 À : XWiki Developers d...@xwiki.org; XWiki Users users@xwiki.org 
 Envoyé le : Vendredi 5 décembre 2014 17h20
 Objet : [xwiki-users] [VOTE] Enable default actions for the Flamingo top menu 
entries
   
Hi everyone,

= Short Story =

I propose to change the behaviour of the top level menu from Flamingo
for tablet and desktop screens (so NOT for phones) to match the
behaviour we had in 6.2 BUT improving the separation between the
navigation links and the drop down toggle. The idea is that the top
level menu entries should behave like a drop down button (e.g. the Add
button) but without looking like one. You can see some screen shots at
http://jira.xwiki.org/browse/XWIKI-11517.

= Long Story =

I've heard complains that the current behaviour of the top level menu
from Flamingo skin is not perfect. The issue is that you need to click
twice to navigate. Ok, with a mouse you can use the middle click
(wheel) to open the link in a new tab but still it's annoying for
simple uses and for those that use the touch pad or a tablet.

An alternative I have investigated in
http://jira.xwiki.org/browse/XWIKI-11479 is to open the menu on hover
(on devices that support this of course). The result is quite nice and
effective but there is a problem: if you have a second horizontal menu
displayed under the top level menu then you'll have a hard time
hovering the second menu. So I decided to close XWIKI-11479 as Won't
Fix. For those that like the open-on-hover behaviour and which don't
plan to use a second menu I've published this extension
http://extensions.xwiki.org/xwiki/bin/view/Extension/Hover+and+Default+Action+for+Flamingo+Menu
.

The other alternative to fix the problem is to go back to the
behaviour from 6.2. Precisely, each menu has two sides:
* on the left is the label which is a link used for navigation
* on the right there is a toggle (arrow) used to open the menu.

The problem with this, and the reason we change it in 6.3, was that
the label and the toggle were not separated very well so the user
could easily think they were doing the same action (opening the menu).
At the same time this separation felt unnatural on extra small screens
(phones) because you couldn't tap easily on the toggle (arrow).

The solution I propose is to:
* Keep the current behaviour for extra small screens (phones). That
means the use has to tap twice to navigate: one tap to open the menu
and another one on the Go to this XYZ.
* On desktop and tablet enable the default action (navigation link) as
in 6.2 but improve the separation so that the menu behaves as much as
possible as a drop down button (e.g. the Add button) without looking
like one. This means:
** You should understand there are two sides without hovering
** Separate hover and active state (e.g. the link is not hovered when
the toggle is hovered)

I've investigated *many* ways to achieve this and the result can be
seen on http://jira.xwiki.org/browse/XWIKI-11517. This is close to
http://extensions.xwiki.org/xwiki/bin/view/Extension/Enable+Default+Action+for+Flamingo+Menu
but not the same.

NOTE: The way the menu behaves and looks on hover and click (text and
background color) is strictly determined by the color theme. Some
themes highlight the hovered menu items by changing their background
color, others the text color and some do both. My changes are
independent on this. We can of course improve the default color theme
to better highlight the menu items. This is a different topic though.

I'd like to commit this changes in 6.4. Here's my +1.

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


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


Re: [xwiki-users] I can not use less variable in a SSX

2014-12-05 Thread Pascal BASTIEN
Thanks a lot.

I will use 768px value then.

(I always forget to check jira before to ask, sorry)
  De : Ecaterina Moraru (Valica) vali...@gmail.com
 À : Pascal BASTIEN pbasnews-xw...@yahoo.fr; XWiki Users users@xwiki.org 
 Envoyé le : Vendredi 5 décembre 2014 16h28
 Objet : Re: [xwiki-users] I can not use less variable in a SSX
   
Hi,

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

Thanks,
Caty



On Fri, Dec 5, 2014 at 5:24 PM, Pascal BASTIEN pbasnews-xw...@yahoo.fr wrote:

Hello,
In ./skins/flamingo/less/bootstrap/variables.less we found:
//== Media queries breakpoints
//
//## Define the breakpoints at which your layout will change, adapting to 
different screen sizes.
...
// Small screen / tablet
//** Deprecated `@screen-sm` as of v3.0.1
@screen-sm:  768px;
@screen-sm-min:  @screen-sm;

Then I want use screen-sm-min in a new SSX object but this doesn't 
work:@media (min-width: @screen-sm-min) {
  h1 {
    color: fuchsia;
   }}(If I replace screen-sm-min with his value 768px, my SSX work well.)
Is it normal than @screen-sm-min doesn't work in a SSX?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] What would you like to see in the XWiki 7.x cycle?

2014-12-09 Thread Pascal BASTIEN
+1 for numbered header
+0 about TOC (user must be able to choose if he want a TOC on his page)
In someone interested, on (my wiki), I use that to add numbered header and 
TOC:http://extensions.xwiki.org/xwiki/bin/view/Extension/TOC+Macro#HExample4:TOCnumberingcorrespondingatNumberedHeadings
To add this code by default:---{{box 
cssClass=floatinginfobox title=**Sommaire**}}
{{toc numbered=true depth=3/}}
{{/box}}

{{numberedheadings/}}


//Voici le formatage type d'une page de l'Encyclopédie qu'il est conseillé 
d'appliquer.
Si vous souhaitez conserver cette mise en page avec sommaire vous devez 
remplacer ce texte (et ne pas supprimer les macros ci-dessus).//

= Titre de niveau un =

Texte
--- in all new doc of Encyclopédie space, I modify 
./templates/editwysiwygnew.vm with---
## Affiche un contenu type pour tous les nouveaux documents ouvert avec Wysiwyg
#set($itemModLContenu = 
$xwiki.getDocument($escapetool.xml(Personnalisation.ModeleContenuEncyclopédie)))
#if ($tdoc.content ==   $tdoc.space == $escapetool.xml(Encyclopédie))
  $xwiki.getTextArea($itemModLContenu.getContent())
#else
  $xwiki.getTextArea($tdoc.content)
#end
---Anyway, someone (who?) create a whishlist page on 
xwiki.org? Or is it useless?
Thxs
Pascal B

 De : Hamster teun...@hotmail.com
 À : users@xwiki.org 
 Envoyé le : Mardi 9 décembre 2014 8h38
 Objet : Re: [xwiki-users] What would you like to see in the XWiki 7.x cycle?
   
What I would like to see in XWiki 7.x:

- A standard way of navigating the Wiki (I know there a several Extensions
available, but this needs to be a basic feature of XWiki). This is my no. 1
complaint ;-).
- Better layout, with numbered headers. This is the no. 1 complaint from our
users. They are used to the way MS Word is able to format their documents.
Numbered lists with blank lines for example.
- A standard Table of Contents, which displays the headers on a
(large)page. This TOC should be dockable/collapsable, iow always
available to the users.
- Automatic Update/Upgrade to latest XWiki version.




--
View this message in context: 
http://xwiki.475771.n2.nabble.com/What-would-you-like-to-see-in-the-XWiki-7-x-cycle-tp7593349p7593387.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-09 Thread Pascal BASTIEN
Yes you are right it is http://ckeditor.com/   (I was confused because I tested 
MoinMoin editor http://moinmo.in/FCKeditor  and FckEditor probably changed his 
name)
 

  De : Hamster teun...@hotmail.com
 À : users@xwiki.org 
 Envoyé le : Mardi 9 décembre 2014 9h06
 Objet : Re: [xwiki-users] What would you like to see in the XWiki 7.x cycle?
   
PascalB wrote
 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

FckEditor? Or do you mean  CKEditor http://ckeditor.com/  ?



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/What-would-you-like-to-see-in-the-XWiki-7-x-cycle-tp7593349p7593389.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] Howto getprefix in a Sheet? (and add some class in my form)

2015-01-30 Thread Pascal BASTIEN
No way to catch $prefix with velocity in my docSheet, then? :-(
Finally I adopt another 'ugly'? way to add some class and stuf in some DIV on 
my form: I reconstruct some DIV elements with velocity in Custom Display 
field of my docClass properties.
My purpose, I wanted add some nice bootstrap tooltips on my radio button 
generate by my docSheet.http://getbootstrap.com/javascript/#tooltips-examples
Here my example I can paste in XWIKI FAQ if it is a good way (I doubt it :-) 
):- I add a Boolean property in my docClass with form type radio and I 
paste this code in Custom Display:***{{velocity}}
{{html clean=false}}
#if($type == edit)
  #set ($MyToolTipText=Tooltip on top de mon bouton radio)
  #foreach( $i in [1..0] )
    div
    #if ($i==0)
  #set($LibReponse='Non')
  #set($SuffxLabel='_false')
  #if ($!value==0)
    #set($IsChecked='checked=checked')
  #end
    #else
  #set($LibReponse='Oui')
  #if ($!value==1)
    #set($IsChecked='checked=checked')
  #end
    #end
 label for=${prefix}${name}$!{SuffxLabel}
    input id=${prefix}${name}$!{SuffxLabel} type=radio 
name=${prefix}${name} value=$i $!IsChecked data-toggle=tooltip 
data-placement=right title=$!{MyToolTipText}
    $LibReponse
    /label
    /div
    #set($IsChecked='')
  #end
#elseif ($type == view)
  #if ($!value==0)
    strongNon/strong
  #elseif ($!value==1)
    strongOui/strong
  #end
#end
{{/html}}
{{/velocity}}

***I paste this xwiki.javascriptExtension to initiate 
Tooltips:require(['jquery'], function ($) {
$(function () {
  $('[data-toggle=tooltip]').tooltip()
})
});


(Notice: I didn't use full JS because I don't like the blinking effect or 
errors who's crash Xwiki menu)
Pascal B
  De : Pascal BASTIEN pbasnews-xw...@yahoo.fr
 À : XWiki Users users@xwiki.org 
 Envoyé le : Jeudi 29 janvier 2015 12h05
 Objet : [xwiki-users] Howto getprefix in a Sheet?
   


Hello,I have a docClass with some properties and use a linked Sheet to display 
my data.On this thread 
http://xwiki.475771.n2.nabble.com/Help-with-custom-display-td508630.htmlI saw 
we can get this value in custom display field of docClass properties.- $name 
= the name of the displayed field
- $prefix = a prefix for the form field
- $object = the displayed object
- $type = the intended display mode (view, edit, hidden, search...)
- $value = the property value 

I try to have same value from mydocSheet (in particulary prefix the id of the 
field in edit form)
There Velocity code in my docSheet:

#set($class = $doc.getObject('MySpace.docClass').xWikiClass)

#foreach($prop in $class.properties)
  * $prop.Name  * $prop.?? How to obtain the prefix ???  * $object (it 
doesn't matter)  * $xcontext.action  * $doc.getValue($prop.Name)
  $prop.prettyName $doc.display($prop.getName())
#end
#break
If any have an (or many) idea how I can obtain this prefix in my Sheet
(If not I can concanet MySpace.docClass_0_$prop.Name but I'm not sure about _0_)

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] Howto getprefix in a Sheet?

2015-02-03 Thread Pascal BASTIEN
Yes thanks you both.

In editobject.vm

#macro(displayObject $obj $class $props $firstField)
  div id=xobject_${escapetool.xml($class.name)}_${obj.number} 
class=xobject

Then i think, I found the solution to get prefix in a sheet:

#set ($DocClass= 'MySpace.MydocClass')
#set($class = $doc.getObject(${DocClass}).xWikiClass)
##Boucle sur toutes les properties de la classe DocClass
#foreach($prop in $class.properties)
* ${escapetool.xml($class.name)}_${class.number}_$prop.Name
#end

Notice: sorry about miss formating mail, I think it is yahoo webmail fault?

Pascal B.


En date de : Mar 3.2.15, Clemens Klein-Robbenhaar c.robbenh...@espresto.com a 
écrit :

 Objet: Re: [xwiki-users] Howto getprefix in a Sheet?
 À: users@xwiki.org
 Date: Mardi 3 février 2015, 10h38
 
 
 The
 number is not the number of the property in the class, but
 the number of the object on the page.
 I.e.
 you can have one, two, or manye objects of the same type
 MySpace.MyClass on the same page.
 
 A Macro where you can see how the ID gets
 rendered is in templates/editobject.vm and/or 
 webapps/xwiki/skins/flamingo/editobject.vm
 see the #macro displayObject
 
 
 On 02/03/2015
 10:12 AM, Pascal BASTIEN wrote:
  ThxsI
 verified and it seem it is always _0_  for each properties
 (even for multiple properties of same type)ie If I have 2
 properties with 'date' type in MySpace.MyClass
 (date_entry and birthday), $doc.display($prop.getName() will
 generate this form
  input
 id=MySpace.MyClass_0_date_entry input
 id=MySpace.MyClass_0_birthday  xx
  But If I have a 'database list'
 with checkbox property BirthdayYear in
 MySpace.MyClass, $doc.display($prop.getName() will generate
 this form (with 2 similar hidden input field ! Maybe a bug?)
 :label class=xwiki-form-listclass
 for=xwiki-form-A_Expert-0-0input
 id=xwiki-form-A_Expert-0-0
 type=checkbox value=1980
 name=MySpace.MyClass_0_BirthdayYear1980/labellabel
 class=xwiki-form-listclass
 for=xwiki-form-BirthdayYear-0-1input
 id=xwiki-form-A_Expert-0-1
 type=checkbox value=1981
 name=MySpace.MyClass_0_BirthdayYear1981/label...
  label
 class=xwiki-form-listclass
 for=xwiki-form-BirthdayYear-0-ninput
 id=xwiki-form-A_Expert-0-n
 type=checkbox value=20nn
 name=MySpace.MyClass_0_BirthdayYear
 20nn/labelinput type=hidden
 value=
 name=MySpace.MyClass_0_BirthdayYearinput
 type=hidden value=
 name=MySpace.MyClass_0_BirthdayYear I
 didn't find what is generate this _0_ (macro or java
 stuf)
  ThxsPascal B
 
 
        De : Marius Dumitru
 Florea mariusdumitru.flo...@xwiki.com
   À : Pascal BASTIEN pbasnews-xw...@yahoo.fr;
 XWiki Users users@xwiki.org
 
   Envoyé le : Mardi 3 février 2015
 8h16
   Objet : Re: [xwiki-users] Howto
 getprefix in a Sheet?
     
  ...
  If any have
 an (or many) idea how I can obtain this prefix in my
 Sheet
  
  (If not
 I can concanet MySpace.docClass_0_$prop.Name but I'm not
 sure about _0_)
  
 
 I'm afraid you have to compute the prefix yourself. 0
 represents the
  object number. So
 MySpace.MyClass_4_age refers to the 'age'
 property
  of the MySpace.MyClass object
 with number 4 (normally the fifth object
  of that type from the target document).
  
  Hope this helps,
  Marius
  
  
  
 
  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
  
 
 
 
 mit freundlichen Grüßen
 Clemens Klein-Robbenhaar
 
 -- 
 Clemens Klein-Robbenhaar
 Software Development
 EsPresto
 AG
 Breite Str. 30-31
 10178
 Berlin/Germany
 Tel: +49.(0)30.90 226.763
 Fax: +49.(0)30.90 226.760
 robbenh...@espresto.com
 
 HRB 77554 B -
 Berlin-Charlottenburg
 Vorstand: Maya
 Biersack, Peter Biersack
 Vorsitzender des
 Aufsichtsrats: Dipl.-Wirtsch.-Ing. Winfried Weber
 Zertifiziert nach ISO 9001:2008
 ___
 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] Howto getprefix in a Sheet?

2015-02-03 Thread Pascal BASTIEN
ThxsI verified and it seem it is always _0_  for each properties (even for 
multiple properties of same type)ie If I have 2 properties with 'date' type in 
MySpace.MyClass (date_entry and birthday), $doc.display($prop.getName() will 
generate this form
input id=MySpace.MyClass_0_date_entry input 
id=MySpace.MyClass_0_birthday  xx
But If I have a 'database list' with checkbox property BirthdayYear in 
MySpace.MyClass, $doc.display($prop.getName() will generate this form (with 2 
similar hidden input field ! Maybe a bug?) :label class=xwiki-form-listclass 
for=xwiki-form-A_Expert-0-0input id=xwiki-form-A_Expert-0-0 
type=checkbox value=1980 
name=MySpace.MyClass_0_BirthdayYear1980/labellabel 
class=xwiki-form-listclass for=xwiki-form-BirthdayYear-0-1input 
id=xwiki-form-A_Expert-0-1 type=checkbox value=1981 
name=MySpace.MyClass_0_BirthdayYear1981/label...
label class=xwiki-form-listclass for=xwiki-form-BirthdayYear-0-ninput 
id=xwiki-form-A_Expert-0-n type=checkbox value=20nn 
name=MySpace.MyClass_0_BirthdayYear 20nn/labelinput type=hidden 
value= name=MySpace.MyClass_0_BirthdayYearinput type=hidden value= 
name=MySpace.MyClass_0_BirthdayYear I didn't find what is generate this _0_ 
(macro or java stuf)
ThxsPascal B

  De : Marius Dumitru Florea mariusdumitru.flo...@xwiki.com
 À : Pascal BASTIEN pbasnews-xw...@yahoo.fr; XWiki Users users@xwiki.org 
 Envoyé le : Mardi 3 février 2015 8h16
 Objet : Re: [xwiki-users] Howto getprefix in a Sheet?
   
...
 If any have an (or many) idea how I can obtain this prefix in my Sheet

 (If not I can concanet MySpace.docClass_0_$prop.Name but I'm not sure about 
 _0_)

I'm afraid you have to compute the prefix yourself. 0 represents the
object number. So MySpace.MyClass_4_age refers to the 'age' property
of the MySpace.MyClass object with number 4 (normally the fifth object
of that type from the target document).

Hope this helps,
Marius




 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


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

2015-02-09 Thread Pascal BASTIEN
Hello,
I read/apply this doc with succcess:
http://platform.xwiki.org/xwiki/bin/view/DevGuide/APIGuide#HAccessobjectsinapage

With this code I can display all objects ATTACHED to THIS page.
***
#set($class = $obj.xWikiClass) ## access the class object representing 
SomeSpace.SomeClass
#foreach($prop in $class.properties) ## go through all properties
...
***
but if I attached some class to another page, how can I list properties?
Another question:
I have a page with 3 same Class, how to list them (like ?editor=class did)?
An example:
MySpaceMyClass contain this Class properties:
- My Field ID (IdField: String)
- My Lib Field (LibField: String)
I create MySpace.MyNiceDoc and add my previous Class 
MySpace/MyNiceDoc?editor=object
and contain:
Objets de type MySpace.MyClass (2)
* MyClass 0
 - My Field ID
 - My Lib Field
*MyClass 1:
 - My Field ID
 - My Lib Field

With it I like to fill a select list from this doc (but from another doc to).
How can I proceed? because on MySpace.MyNiceDoc I can only display one/First 
Lib values with this code:
{{velocity}}
## Retrieve the first object (index [0]) among all objects attached to this 
page and of a certain class 
#set($obj = $doc.getObject('MySpace.MyClass'))
#set($class = $obj.xWikiClass) ## access the class object representing 
SomeSpace.SomeClass
#foreach($prop in $class.properties) ## go through all properties
 * ${prop.prettyName} : $doc.display($prop.getName())
#end
{{/velocity}}
I guess i need a loop but which one?

And the big question (who I think it will interest everyone), how can I use 
documentation
( http://platform.xwiki.org/xwiki/bin/view/SRD/Navigation?xpage=embed and or 
http://nexus.xwiki.org/nexus/service/local/repositories/releases/archive/org/xwiki/platform/xwiki-platform-oldcore/6.4/xwiki-platform-oldcore-6.4-javadoc.jar/!/index.html
 )
to guess xWikiClass (or my loop) by example?

A doc/example to use documentation will be welcome. :-)

thxs for any help.

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


Re: [xwiki-users] Add date of account creation (without time) in User Index problem

2015-01-15 Thread Pascal BASTIEN
 it should not be too 
inefficient.
Personally I still think this is the way to go ...

 
      De : Clemens Klein-Robbenhaar c.robbenh...@espresto.com
  À : users@xwiki.org 
  Envoyé le : Mardi 13 janvier 2015 16h10
  Objet : Re: [xwiki-users] Add date of account creation (without time) in 
User Index problem
    
 
 On 01/13/2015 03:05 PM, Pascal BASTIEN wrote:
 Thxs a lot to explained me with clarity all of that and help me to 
 understand better XWiki.
 Then with what you give me, I tried to add a  format_date parameter () (or 
 regexp) in columns properties to improve livetable.
 I failed because I didn't manage to find where is store livetable macro :-))

 Something like this and next add a format date parameter in user index 
 customizer.
 #set($columns = [_avatar, first_name, last_name, email, 
 doc.creationDate, _actions])
 #set($columnsProperties = {
    _avatar : { type : none, link : none, html : true, 
sortable:false },
    first_name : { type : text , size : 20, link : view},
    last_name : { type : text, link : view},
    email : { type : text },
    doc.creationDate : { type : date, dateformat:-mm }
 })
 
 I am afraid that this does not work.
 The supported options are documented here:
 
  http://extensions.xwiki.org/xwiki/bin/view/Extension/Livetable+Macro
 
 and a 'dateformat' option is unfortunately not part of it.
 
 The problem is that in the end the #livetable macro turns out to make an AJAX 
 call
 to the code at the page XWiki.LiveTableResults ,  which in turn uses the 
 XWiki.LiveTableResultsMacros
 and the latter just calls  $xwiki.formatDate($itemDoc.creationDate)) without 
 any custom format.
 
 What you can to is:
 
  - either again patch that line of code in the XWiki.LiveTableResultsMacros 
with a date format of your choice
 
  - or modify the results afterwards, as explained  
http://extensions.xwiki.org/xwiki/bin/view/Extension/Livetable+Macro#HCustomJSON
  (scroll down to the Starting with XWiki Enterprise 4.0 you can modify the 
default JSON ...)
 
 the later would involve creating your own livetable result page, i.e. 
 XWiki.LiveTableResultsNoTime
 with e.g. the contents:
 
 {{include reference=XWiki.LiveTableResultsMacros /}}
 
 {{velocity wiki=false}}
 #if($!{request.xpage} == 'plain')
  $response.setContentType('application/json')
 #end
 ##==
 ## Initialize the map that will store the JSON data.
 ##==
 #set($map = {})
 ##==
 ## Build the JSON in memory using the previous map
 ##==
 #gridresult_buildJSON($!request.classname $request.collist.split(',') $map)
 ##==
 ## Modify the JSON data from the map or add new data.
 ##==
 #foreach($row in $map.get('rows'))
  #if($row.get('doc_creationDate'))
    #set($creation_date = $row.get('doc_creationDate'))
    #set($time_sep_index = $creation_date.indexOf(' '))
    #if($time_sep_index =0)
      #set($creation_date_without_time = $creation_date.substring(0, 
$time_sep_index))
      #set($discard = $row.put('doc_creationDate', $creation_date_without_time 
))
    #end
  #end
 #end
 ##==
 ## Serialize the map in the JSON format.
 ##==
 $jsontool.serialize($map)
 {{/velocity}}
 
 this mostly copy  paste from the LiveTable docs, expect for the Modify the 
 JSON data ... part,
 where the creation date field is simply cut off after the first space - quite 
 hackish, but should work
 for most date formats.
 
 Now when calling that page to get the results, everything must be put inside 
 the 'url' option
 so the $options change to:
 
 #set($options = {
  url : $xwiki.getURL('XWiki.LiveTableResultsNoTime', 'get', 
'outputSyntax=plainclassname=XWiki.XWikiUserstransprefix=xe.userdirectory.collist=_avatar,first_name,last_name,email,doc.creationDate'),
  rowCount: 10
 })
 
 Afterwards it is just a matter of a few hours debugging with firebug etc 
 until one finds the missing ')' or '' that keeps things from working ;)
 
 
 Oh, and come to think of it, the simplest solution would be to change
 the XWiki date format the XWiki Admin to exclude the time - that would remove
 the time everywhere, but I know people who actually like it. ;)
 
 
 
 
 #set($options = {
  className:XWiki.XWikiUsers,
  translationPrefix : xe.index.users.,
  tagCloud : true,
  rowCount: 10
 })
 #livetable(userdirectory $columns $columnsProperties $options)
 [...]
 ___
 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
 



mit freundlichen Grüßen
Clemens Klein-Robbenhaar

-- 
Clemens Klein-Robbenhaar
Software Development
EsPresto AG
Breite Str. 30-31
10178 Berlin/Germany
Tel: +49.(0)30.90 226.763
Fax: +49.(0)30.90 226.760
robbenh...@espresto.com

HRB 77554 B - Berlin-Charlottenburg
Vorstand: Maya Biersack, Peter Biersack

Re: [xwiki-users] Add date of account creation (without time) in User Index problem

2015-01-15 Thread Pascal BASTIEN
Cool!thinking ... soon when I come back to this improvment, all will be done! 
:-)


  De : Marius Dumitru Florea mariusdumitru.flo...@xwiki.com
 À : Pascal BASTIEN pbasnews-xw...@yahoo.fr; XWiki Users users@xwiki.org 
 Envoyé le : Jeudi 15 janvier 2015 15h12
 Objet : Re: [xwiki-users] Add date of account creation (without time) in User 
Index problem
   
You can take a look at how I added the 'match' column parameter
recently 
https://github.com/xwiki/xwiki-platform/commit/aad969f6e51299d3f684b86101aa13c04519541c
.

Hope this helps,
Marius



On Thu, Jan 15, 2015 at 11:48 AM, Pascal BASTIEN
pbasnews-xw...@yahoo.fr wrote:
 Ok thxs you.I will let this improvment for later when I have less working 
 priority.
 Like the other said: I'll be back :-)

      De : Clemens Klein-Robbenhaar c.robbenh...@espresto.com
  À : users@xwiki.org
  Envoyé le : Mercredi 14 janvier 2015 18h28
  Objet : Re: [xwiki-users] Add date of account creation (without time) in 
User Index problem

 Ah, ok, now I understand (I hope) :)

 Indeed the livetable macro is in that place, but this is because the flamingo 
 skin overrides some of the macros;
 the original is actually here: 
 https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-web/src/main/webapp/templates/macros.vm

 I guess both macros should be updated, as other skins will use the version in 
 xwiki-platform-web by default.

 (Btw, as the variant in the flamingo skin seems to be there to stay, I wonder 
 if one wants to split that file
 into two parts, one containing the macros overwritten in the flamingo-skin, 
 and the other one containing the common ones.
 Or is this considered an API breakage ?)

 Anyway, when adding a dateformat to one of the $columnsProperties it might 
 be still some way to go to get this working ...
 I just tried to track this down, and ended up with the following (any better 
 idea how to do it?)

  - the livetable macro does not really render much stuff by itself, but 
delegates most to the AJAX call
  You can see that in the script part, where a JavaScript at the end of the 
macro, where
  the  function startup()  creates a JavaScript object : 
XWiki.widgets.LiveTable  that does the actual loading

  - just in case you wonder how this triggers the Ajax call, this JavaScript 
class in turn is in the file
      
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-web/src/main/webapp/resources/js/xwiki/table/livetable.js
  but I guess that does not need to be touched. (at least)

  - instead you can see how the AJAX-request parameters are put together in 
the #livetable macro in

    #set ($parameters = {
      'outputSyntax': 'plain',
      'transprefix': $transprefix,
      'classname': $classname,
      'collist': $stringtool.join($dataColumns, ','),
      'queryFilters': $queryFilters
    })

  You can see these parameters are send via Ajax if you check your browsers 
network tab.

  So this would be the place to add more parameters.
  However as you might see there are no column-specific parameters, only 
global ones. So you need to invent a schema to pass these parameters for 
columns in, too.
  Maybe it might be easier to try to send a global dateformat, at least for 
a first try? (I.e. globally used for all entries in the current livetable)

  Anyway, these parameters are then send to the XWiki.LiveTableResults : 
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-livetable/xwiki-platform-livetable-ui/src/main/resources/XWiki/LiveTableResults.xml
 which in turn delegate most of the work into the  XWiki.LiveTableResultsMarco 
  
 https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-livetable/xwiki-platform-livetable-ui/src/main/resources/XWiki/LiveTableResultsMacros.xml
 there the call chain in the velocity macros is:

  gridresultwithfilter - calls gridresultwithfilter_buildJSON  - 
gridresult_buildRowsJSON - gridresult_buildRowJSON

 In the latter one you find the code which creates the (already formatted) 
 doc.creationDate (already formatted, because Date is no JSON data type that 
 can be passed around, and also formatting Dates in JavaScript + Timezone 
 issues = Desperation IMO)
 It is somewhere:
  #set($discard = $row.put('doc_date', $xwiki.formatDate($translatedDoc.date)))
  
  #set($discard = $row.put('doc_creationDate', 
$xwiki.formatDate($translatedDoc.creationDate)))

 Then this macro, for custom class property date columns, delegates to 
 gridresult_buildColumnJSON, which just called the display for that class 
 property and I guess that will ignore any attempts to change date formatting.


 It looks like after putting the date format into the request you would have 
 to read the format from the request in XWiki.LiveTableResults and pass it 
 around through all the macros ...



 Yes I know that format_date parameter doesn't exist for the moment :-), I 
 wanted to improve livetable

[xwiki-users] Xwiki from 6.3 version to 6.4 JNDI / postgresql problem

2015-01-22 Thread Pascal BASTIEN

Hello,
I have some problems to upgrade Xwiki from 6.3 version to 6.4.
I'm on Debian/Tomcat and use the .WAR to connect on my postgreSQL database with 
JNDI database connector.
With this database connector I hadn't problem with 6.1,6.2 and 6.3 upgrades but 
with 6.4 upgrade I have this error 500 (at the end of mail) and not the DW...

It is clearly a problem with JNDI because if I fill my hibernate.xml with 
postgreSQL database parameters, I obtain the DW when I restart my Tomcat.

Here my functionnal (with 6.1/2/3 but not 6.4) JNDI parameters:
***
    ./tomcat-7.0.47/conf/server.xml

type=javax.mail.Session

mail.smtp.host=localhost/

Resource name=jdbc/xwiki_db auth=Container type=javax.sql.DataSource

driverClassName=org.postgresql.Driver

url=jdbc:postgresql://MYServeur.Postgresql:/database_xwiki

username=database_user

password=xx

minIdle=5

maxActive=10

maxIdle=10

defaultAutoCommit=false

validationQuery=select '1'

testOnBorrow=true

testOnReturn=true

removeAbandoned=true

logAbandoned=true

removeAbandonedTimeout=60

maxWait=-1/

/Context

/Host


    ./webapps/xwiki/WEB-INF/hibernate.cfg.xml

hibernate-configuration

session-factory

property name=show_sqlfalse/property

property name=use_outer_jointrue/property

!--

property name=dbcp.defaultAutoCommitfalse/property

property name=dbcp.maxActive50/property

property name=dbcp.maxIdle5/property

property name=dbcp.maxWait3/property

property name=dbcp.whenExhaustedAction1/property

property name=dbcp.ps.whenExhaustedAction1/property

property name=dbcp.ps.maxActive20/property

property name=dbcp.ps.maxWait12/property

property name=dbcp.ps.maxIdle20/property

--

!-- Datasource configuration. --

property name=connection.datasourcejava:comp/env/jdbc/xwiki_db/property

property name=dialectorg.hibernate.dialect.PostgreSQLDialect/property

property name=jdbc.use_streams_for_binaryfalse/property

property name=xwiki.virtual_modeschema/property

property name=connection.useUnicodetrue/property

property name=connection.characterEncodingUTF-8/property

mapping resource=xwiki.postgresql.hbm.xml/

mapping resource=feeds.hbm.xml/

mapping resource=activitystream.hbm.xml/

mapping resource=instance.hbm.xml/

/session-factory

/hibernate-configuration

    ./webapps/xwiki/WEB-INF/web.xml

location/bin/view/Main/DocumentDoesNotExist/location

/error-page

!-- Uncomment if you wish to use a DataSource to define the Database 
connection --

resource-ref

descriptionDB Connection/description

res-ref-namejdbc/xwiki_db/res-ref-name

res-typejavax.sql.DataSource/res-type

res-authContainer/res-auth

/resource-ref

env-entry

env-entry-nameXWikiConfig/env-entry-name

env-entry-typejava.lang.String/env-entry-type
*

Thxs for any help.

Pascal B.

My log:
Etat HTTP 500 - com.xpn.xwiki.XWikiException: Error number 11007 in 0: Failed 
to extract Entity Resource Reference from URL 
[https://yyy/bin/view/Main/]

type Rapport d''exception

message com.xpn.xwiki.XWikiException: Error number 11007 in 0: Failed to 
extract Entity Resource Reference from URL 
[https://yyy/bin/view/Main/]

description Le serveur a rencontré une erreur interne qui l''a empêché de 
satisfaire la requête.

exception

javax.servlet.ServletException: com.xpn.xwiki.XWikiException: Error number 
11007 in 0: Failed to extract Entity Resource Reference from URL 
[https://yyy/bin/view/Main/]
    
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:520)
    
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:427)
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
    org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:115)
    
org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:127)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
    
org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
    com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:66)
    
org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
    
org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)

cause mère

com.xpn.xwiki.XWikiException: Error number 11007 in 0: Failed to extract Entity 
Resource Reference from URL [https://yyy/bin/view/Main/]
    com.xpn.xwiki.XWiki.initializeResourceFromURL(XWiki.java:617)
    

Re: [xwiki-users] Xwiki from 6.3 version to 6.4 JNDI / postgresql problem

2015-01-22 Thread Pascal BASTIEN
More test later: I manage to upgrade my xwiki (with postgres database parameter 
in hibernate.xml) but if I use JNDI connecter, Xwiki failed with the same error.
  De : Pascal BASTIEN pbasnews-xw...@yahoo.fr
 À : XWiki Users users@xwiki.org 
 Envoyé le : Jeudi 22 janvier 2015 17h46
 Objet : [xwiki-users] Xwiki from 6.3 version to 6.4 JNDI / postgresql problem
   

Hello,
I have some problems to upgrade Xwiki from 6.3 version to 6.4.
I'm on Debian/Tomcat and use the .WAR to connect on my postgreSQL database with 
JNDI database connector.
With this database connector I hadn't problem with 6.1,6.2 and 6.3 upgrades but 
with 6.4 upgrade I have this error 500 (at the end of mail) and not the DW...

It is clearly a problem with JNDI because if I fill my hibernate.xml with 
postgreSQL database parameters, I obtain the DW when I restart my Tomcat.

Here my functionnal (with 6.1/2/3 but not 6.4) JNDI parameters:
***
    ./tomcat-7.0.47/conf/server.xml

type=javax.mail.Session

mail.smtp.host=localhost/

Resource name=jdbc/xwiki_db auth=Container type=javax.sql.DataSource

driverClassName=org.postgresql.Driver

url=jdbc:postgresql://MYServeur.Postgresql:/database_xwiki

username=database_user

password=xx

minIdle=5

maxActive=10

maxIdle=10

defaultAutoCommit=false

validationQuery=select '1'

testOnBorrow=true

testOnReturn=true

removeAbandoned=true

logAbandoned=true

removeAbandonedTimeout=60

maxWait=-1/

/Context

/Host


    ./webapps/xwiki/WEB-INF/hibernate.cfg.xml

hibernate-configuration

session-factory

property name=show_sqlfalse/property

property name=use_outer_jointrue/property

!--

property name=dbcp.defaultAutoCommitfalse/property

property name=dbcp.maxActive50/property

property name=dbcp.maxIdle5/property

property name=dbcp.maxWait3/property

property name=dbcp.whenExhaustedAction1/property

property name=dbcp.ps.whenExhaustedAction1/property

property name=dbcp.ps.maxActive20/property

property name=dbcp.ps.maxWait12/property

property name=dbcp.ps.maxIdle20/property

--

!-- Datasource configuration. --

property name=connection.datasourcejava:comp/env/jdbc/xwiki_db/property

property name=dialectorg.hibernate.dialect.PostgreSQLDialect/property

property name=jdbc.use_streams_for_binaryfalse/property

property name=xwiki.virtual_modeschema/property

property name=connection.useUnicodetrue/property

property name=connection.characterEncodingUTF-8/property

mapping resource=xwiki.postgresql.hbm.xml/

mapping resource=feeds.hbm.xml/

mapping resource=activitystream.hbm.xml/

mapping resource=instance.hbm.xml/

/session-factory

/hibernate-configuration

    ./webapps/xwiki/WEB-INF/web.xml

location/bin/view/Main/DocumentDoesNotExist/location

/error-page

!-- Uncomment if you wish to use a DataSource to define the Database 
connection --

resource-ref

descriptionDB Connection/description

res-ref-namejdbc/xwiki_db/res-ref-name

res-typejavax.sql.DataSource/res-type

res-authContainer/res-auth

/resource-ref

env-entry

env-entry-nameXWikiConfig/env-entry-name

env-entry-typejava.lang.String/env-entry-type
*

Thxs for any help.

Pascal B.

My log:
Etat HTTP 500 - com.xpn.xwiki.XWikiException: Error number 11007 in 0: Failed 
to extract Entity Resource Reference from URL 
[https://yyy/bin/view/Main/]

type Rapport d''exception

message com.xpn.xwiki.XWikiException: Error number 11007 in 0: Failed to 
extract Entity Resource Reference from URL 
[https://yyy/bin/view/Main/]

description Le serveur a rencontré une erreur interne qui l''a empêché de 
satisfaire la requête.

exception

javax.servlet.ServletException: com.xpn.xwiki.XWikiException: Error number 
11007 in 0: Failed to extract Entity Resource Reference from URL 
[https://yyy/bin/view/Main/]
    
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:520)
    
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:427)
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
    org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:115)
    
org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:127)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
    
org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
    com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:66)
    
org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208

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

2015-02-10 Thread Pascal BASTIEN

 I wil probably add your nice code on this page: 
 http://platform.xwiki.org/xwiki/bin/view/DevGuide/APIGuide#HAccessobjectsinapage

Done!
I paste your code Clemens (I change only doc name) and add image (for kids :-) )
http://platform.xwiki.org/xwiki/bin/view/DevGuide/APIGuide?viewer=changesrev2=15.2
Result: 
http://platform.xwiki.org/xwiki/bin/view/DevGuide/APIGuide#HAccessobjectsfromanypageandloopoverallobjectsofsameClass
Thanks you

Pascal B

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


Re: [xwiki-users] Prevent delete some page

2015-02-16 Thread Pascal BASTIEN
Hello,

the better I found is to hide delete/rename menu with CSS:

/* Hide rename and delete */
#tmActionRename{
  display : none;
}
#tmActionDelete{
  display : none;
}
If I want to display them for a certain group: I call another SSX with 
display:block.
Of course it is not a very good way because owner can typing the right URL to 
delete his doc with ./bin/delete/Spave/Doc

BTW, when a user create a new doc (docSheet with Class), I want redirect him to 
another page if he click on Cancel.
And can I modify default doc when a user try to create a new doc?

Thxs for any help.

Pascal B



En date de : Ven 13.2.15, Pascal BASTIEN pbasnews-xw...@yahoo.fr a écrit :

 Objet: [xwiki-users] Prevent delete some page
 À: XWiki Users users@xwiki.org
 Date: Vendredi 13 février 2015, 19h34
 
 Hello,
 
 In my xwiki application, I want prevent user to delete pages
 (even he is the creator).
 Users create page with my form (some
 class/Sheet/Template/Velocity/API xwiki) and of course I
 want to keep original UserCreator info in the doc.
 
 Is it possible? I didn't manage with right access
 (XWiki.XWikiRights object).
 
 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


[xwiki-users] Howto getprefix in a Sheet?

2015-01-29 Thread Pascal BASTIEN
Hello,I have a docClass with some properties and use a linked Sheet to display 
my data.On this thread 
http://xwiki.475771.n2.nabble.com/Help-with-custom-display-td508630.htmlI saw 
we can get this value in custom display field of docClass properties.- $name 
= the name of the displayed field
- $prefix = a prefix for the form field
- $object = the displayed object
- $type = the intended display mode (view, edit, hidden, search...)
- $value = the property value 

I try to have same value from mydocSheet (in particulary prefix the id of the 
field in edit form)
There Velocity code in my docSheet:

#set($class = $doc.getObject('MySpace.docClass').xWikiClass)

#foreach($prop in $class.properties)
  * $prop.Name  * $prop.?? How to obtain the prefix ???  * $object (it 
doesn't matter)  * $xcontext.action  * $doc.getValue($prop.Name)
  $prop.prettyName $doc.display($prop.getName())
#end
#break
If any have an (or many) idea how I can obtain this prefix in my Sheet
(If not I can concanet MySpace.docClass_0_$prop.Name but I'm not sure about _0_)

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


Re: [xwiki-users] Show hidden spaces

2015-01-06 Thread Pascal BASTIEN
Hello,
(First let me start off by wishing everyone a very Happy New Year.)
You can use somethink like this to find hidden space (even if the user don't 
display hidden doc)

#set ($items = $xwiki.search(select doc.space from XWikiDocument as doc where 
doc.name='WebHome' and doc.hidden = '1'))
#foreach ($item in $items)
* $item
#end

(to avoid multi language problem who's generate some dupplicate entries  
perhaps you can add doc.defaultLanguage='en' parameter in the query?)



Pascal B
  De : Matthias Wegner mic.mat.weg...@web.de
 À : users@xwiki.org 
 Envoyé le : Dimanche 4 janvier 2015 13h36
 Objet : [xwiki-users] Show hidden spaces
   
Hi All,

first of all. A happy new year to everybody.
 
I hide some spaces with the extension
http://extensions.xwiki.org/xwiki/bin/view/Extension/Hide+a+space because my
user should not see my macro-space or some other admin-stuff. But i want to
display for myself a simple page where i can list all hidden spaces and
documents. The displaying of documents is easy with
http://extensions.xwiki.org/xwiki/bin/view/Extension/Display+hidden+pages+from+a+specific+space.

But how can i find the hidden spaces? $xwiki.spaces only gives me the
not-hidden ones.

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Show-hidden-spaces-tp7593554.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] Howto use mvn xar:format ?

2015-01-09 Thread Pascal BASTIEN
Hello,
To clean and Pull Request my patch I need to launch mvn xar:format command 
but I didn't managed to use it and didn't found a simple documentation about it 
(notice, I didn't eat a maven book either)
I don't want rebuild Xwiki package but I want only check/clean xml file (from 
XAR) before to pull request it on github.
Here my manipulation on my debian testing:- I installed current maven package 
(3.0.4 version)
- I create the conf file ~/.m2/settings.xml provided here: 
http://dev.xwiki.org/xwiki/bin/view/Community/Building#HInstallingMaven
(I'm behind a http proxy, then I add 
http://dev.xwiki.org/xwiki/bin/view/Community/Building#HBuildingbehindaproxy 
parameter  in ~/.m2/settings.xm)

I download Xwiki source with theses commands:#Only first time
cd /home/git-wiki/
git clone https://github.com//xwiki-platform.git
cd xwiki-platform/
git remote add upstream https://github.com/xwiki/xwiki-platform.git
git remote -v

# synchro before modify
cd /home/git-wiki/xwiki-platform/
git fetch upstream
git checkout master
git merge upstream/master
#branch creation and modif of files
git checkout -B XWIKI-MaBranche
vi 
/home/git-wiki/xwiki-platform/xwiki-platform-core/xwiki-platform-tag/xwiki-platform-tag-ui/src/main/resources/XWiki/TagCloud.xm

Here my problems, I want to check TagCloud.xm with mvn xar:format:cd 
/home/git-wiki/xwiki-platform/xwiki-platform-core/xwiki-platform-tag/xwiki-platform-tag-ui
 mvn -e xar:formatI obtain the insanity that I paste at the end of this mail!
To resume, howto check my tiny improvment with mvn xar:format?In the same time, 
I want to avoid maven download the entire world each time I launch it :-))

Thxs for yor help.
Pascal B
*
root@buttle:/home/git-wiki/xwiki-platform/xwiki-platform-core/xwiki-platform-tag/xwiki-platform-tag-ui#
 mvn -e xar:format
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] 
[INFO] 
[INFO] Building XWiki Platform - Tag - UI 6.4-SNAPSHOT
[INFO] 
[INFO] 
[INFO] BUILD FAILURE
[INFO] 
[INFO] Total time: 5.962s
[INFO] Finished at: Fri Jan 09 10:24:42 CET 2015
[INFO] Final Memory: 19M/228M
[INFO] 
[ERROR] Failed to execute goal on project xwiki-platform-tag-ui: Could not 
resolve dependencies for project 
org.xwiki.platform:xwiki-platform-tag-ui:xar:6.4-SNAPSHOT: Could not find 
artifact com.sun:tools:jar:1.5.0 at specified path 
/usr/lib/jvm/java-7-openjdk-amd64/jre/../lib/tools.jar - [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal 
on project xwiki-platform-tag-ui: Could not resolve dependencies for project 
org.xwiki.platform:xwiki-platform-tag-ui:xar:6.4-SNAPSHOT: Could not find 
artifact com.sun:tools:jar:1.5.0 at specified path 
/usr/lib/jvm/java-7-openjdk-amd64/jre/../lib/tools.jar
    at 
org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:210)
    at 
org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:117)
    at 
org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:258)
    at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:201)
    at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at 
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at 
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at 

[xwiki-users] wiki syntax for linking to own user profile page?

2015-01-14 Thread Pascal BASTIEN
Hello,
I want to know if there are a wiki syntax  to add an hyperlink to your own user 
profile in wiki syntax (without velocity/grovy tags).With velocity it 
is:{{velocity}}
Here your own profile :  [[$context.user]]
{{/velocity}}
Thxs.
Pascal B

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


Re: [xwiki-users] Add date of account creation (without time) in User Index problem

2015-01-13 Thread Pascal BASTIEN
Thxs a lot to explained me with clarity all of that and help me to understand 
better XWiki.
Then with what you give me, I tried to add a  format_date parameter () (or 
regexp) in columns properties to improve livetable.
I failed because I didn't manage to find where is store livetable macro :-))

Something like this and next add a format date parameter in user index 
customizer.
#set($columns = [_avatar, first_name, last_name, email, 
doc.creationDate, _actions])
#set($columnsProperties = {
   _avatar : { type : none, link : none, html : true, 
sortable:false },
   first_name : { type : text , size : 20, link : view},
   last_name : { type : text, link : view},
   email : { type : text },
    doc.creationDate : { type : date, dateformat:-mm }
})
#set($options = {
  className:XWiki.XWikiUsers,
  translationPrefix : xe.index.users.,
  tagCloud : true,
  rowCount: 10
})
#livetable(userdirectory $columns $columnsProperties $options)
  De : Clemens Klein-Robbenhaar c.robbenh...@espresto.com
 À : users@xwiki.org 
 Envoyé le : Mardi 13 janvier 2015 12h22
 Objet : Re: [xwiki-users] Add date of account creation (without time) in User 
Index problem
   
On 01/13/2015 10:45 AM, Pascal BASTIEN wrote:
 Hello,
 
 To make it work I add this new property in XWiki.XWikiUsers class:
 /bin/edit/XWiki/XWikiUsers?editor=class
 Name: doc.creationDate Type: String
 PrettyName: Creation date
 

I did not know that you can create class properties with a dot in it,
and that this even can be used to get the original document property, but I see 
it indeed works

 Custom Display:
 {{velocity}}
 {{html}}i$value/i{{/html}}
 {{/velocity}}
 
 The problem is that Custom display is not taking into account and not 
 rendering.

This actually does not work, because the livetable ones not use the custom 
displayer at all,
but treats 'doc.creationDate' special

Possible solutions:

 1)
  - create a dummy class property, which does *not* shadow a doc-property,
  e.g. Name : doccreationdate, Type: Date

  CustomDisplay
  {{velocity}}
  $xwiki.formatDate($doc.getCreationDate(),'/MM/dd')
  {{/velocity}}

 so the custom display does not display the value of the property at all, but 
the actual creation date

 - add 'doccreationdate' to the list of columns in the User Directory

This kinda works, except that you cannot sort by that fake creation date, as 
it is not really there.
(The filter searching the database does not know about the custom displayer and 
searches for the empty value in the DB instead.)


2) Another alternative is to edit the place where doc.creationDate is 
actually rendered ...
for this you would have to patch the main livetable rendering.
see:

 http://localhost:8080/xwiki/bin/view/XWiki/LiveTableResultsMacros?viewer=code

around line 230 there is a:
  #set($discard = $row.put('doc_creationDate', 
$xwiki.formatDate($itemDoc.creationDate)))

you could change that to:
  #set($discard = $row.put('doc_creationDate', 
$xwiki.formatDate($itemDoc.creationDate, '/MM/dd')))

and then add doc.creationDate to the list of displayed columns in the user 
directory.

However then all creation dates everywhere (well, everywhere in live tables) 
will be rendered day only.
(Oh, and I see one still needs to add a dummy 'doc.creationDate' field to the 
user class, as otherwise the field is ignored :(


3) Finally the third solution I can think of would be to add a new date 
property to the user class,
and set this property to doc.creationDate whenever a user is created, and show 
this property in the User Directory
.
This might even be the cleanest solution, except that one needs to touch all 
existing users to update this field.

Newly created users then would be set up by writing an event listener that 
listens to a DocumentCreatingEvent
and if the new document has an XWiki.XWikiUsers object, then set the new 
property to doc.creaionDate

Event listener would be components as explained here:
  http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingEventListenerTutorial
  http://extensions.xwiki.org/xwiki/bin/view/Extension/WikiComponent+Module

This is somewhat more effort, but I guess this would be cleaner (no custom 
display needed, just use the date format of that property,
results can be sorted, as value is really stored in the DB, no patching of 
core XWiki pages ...)




 I know HTML is not interpreted but I want to remove time of Creation date 
 field but Custom Display is apparently not used on a database field.
 Here a screenshot on what I want: http://snag.gy/bWnu9.jpg
 Do you have an idea how I must do it?
 Is it normal than Custom Display is not used?
 
 Thxs for any help
 
 Pascal BASTIEN
 
 
 ___
 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

[xwiki-users] Add date of account creation (without time) in User Index problem

2015-01-13 Thread Pascal BASTIEN
Hello,

To make it work I add this new property in XWiki.XWikiUsers class:
/bin/edit/XWiki/XWikiUsers?editor=class
Name: doc.creationDate Type: String
PrettyName: Creation date

Custom Display:
{{velocity}}
{{html}}i$value/i{{/html}}
{{/velocity}}

The problem is that Custom display is not taking into account and not 
rendering.
I know HTML is not interpreted but I want to remove time of Creation date 
field but Custom Display is apparently not used on a database field.
Here a screenshot on what I want: http://snag.gy/bWnu9.jpg
Do you have an idea how I must do it?
Is it normal than Custom Display is not used?

Thxs for any help

Pascal BASTIEN


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


Re: [xwiki-users] Add date of account creation (without time) in User Index problem

2015-01-13 Thread Pascal BASTIEN
Yes I know that format_date parameter doesn't exist for the moment :-), I 
wanted to improve livetable macro (with pull request at the end I hope). I 
think I find where this macro 
is:https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/src/main/resources/flamingo/macros.vmLine
 1261
#macro(livetable $divid $collist $colprops $options)
I saw the Modify the JSON data ... solution but afraid about ...since it 
would slow down your wiki a lot as it loads DocThxs

  De : Clemens Klein-Robbenhaar c.robbenh...@espresto.com
 À : users@xwiki.org 
 Envoyé le : Mardi 13 janvier 2015 16h10
 Objet : Re: [xwiki-users] Add date of account creation (without time) in User 
Index problem
   

On 01/13/2015 03:05 PM, Pascal BASTIEN wrote:
 Thxs a lot to explained me with clarity all of that and help me to understand 
 better XWiki.
 Then with what you give me, I tried to add a  format_date parameter () (or 
 regexp) in columns properties to improve livetable.
 I failed because I didn't manage to find where is store livetable macro :-))
 
 Something like this and next add a format date parameter in user index 
 customizer.
 #set($columns = [_avatar, first_name, last_name, email, 
 doc.creationDate, _actions])
 #set($columnsProperties = {
    _avatar : { type : none, link : none, html : true, 
sortable:false },
    first_name : { type : text , size : 20, link : view},
    last_name : { type : text, link : view},
    email : { type : text },
    doc.creationDate : { type : date, dateformat:-mm }
 })

I am afraid that this does not work.
The supported options are documented here:

  http://extensions.xwiki.org/xwiki/bin/view/Extension/Livetable+Macro

and a 'dateformat' option is unfortunately not part of it.

The problem is that in the end the #livetable macro turns out to make an AJAX 
call
to the code at the page XWiki.LiveTableResults ,  which in turn uses the 
XWiki.LiveTableResultsMacros
and the latter just calls  $xwiki.formatDate($itemDoc.creationDate)) without 
any custom format.

What you can to is:

 - either again patch that line of code in the XWiki.LiveTableResultsMacros 
with a date format of your choice

 - or modify the results afterwards, as explained  
http://extensions.xwiki.org/xwiki/bin/view/Extension/Livetable+Macro#HCustomJSON
  (scroll down to the Starting with XWiki Enterprise 4.0 you can modify the 
default JSON ...)

the later would involve creating your own livetable result page, i.e. 
XWiki.LiveTableResultsNoTime
with e.g. the contents:

{{include reference=XWiki.LiveTableResultsMacros /}}

{{velocity wiki=false}}
#if($!{request.xpage} == 'plain')
 $response.setContentType('application/json')
#end
##==
## Initialize the map that will store the JSON data.
##==
#set($map = {})
##==
## Build the JSON in memory using the previous map
##==
#gridresult_buildJSON($!request.classname $request.collist.split(',') $map)
##==
## Modify the JSON data from the map or add new data.
##==
#foreach($row in $map.get('rows'))
 #if($row.get('doc_creationDate'))
    #set($creation_date = $row.get('doc_creationDate'))
    #set($time_sep_index = $creation_date.indexOf(' '))
    #if($time_sep_index =0)
      #set($creation_date_without_time = $creation_date.substring(0, 
$time_sep_index))
      #set($discard = $row.put('doc_creationDate', $creation_date_without_time 
))
    #end
 #end
#end
##==
## Serialize the map in the JSON format.
##==
$jsontool.serialize($map)
{{/velocity}}

this mostly copy  paste from the LiveTable docs, expect for the Modify the 
JSON data ... part,
where the creation date field is simply cut off after the first space - quite 
hackish, but should work
for most date formats.

Now when calling that page to get the results, everything must be put inside 
the 'url' option
so the $options change to:

#set($options = {
  url : $xwiki.getURL('XWiki.LiveTableResultsNoTime', 'get', 
'outputSyntax=plainclassname=XWiki.XWikiUserstransprefix=xe.userdirectory.collist=_avatar,first_name,last_name,email,doc.creationDate'),
  rowCount: 10
})

Afterwards it is just a matter of a few hours debugging with firebug etc until 
one finds the missing ')' or '' that keeps things from working ;)


Oh, and come to think of it, the simplest solution would be to change
the XWiki date format the XWiki Admin to exclude the time - that would remove
the time everywhere, but I know people who actually like it. ;)




 #set($options = {
  className:XWiki.XWikiUsers,
  translationPrefix : xe.index.users.,
  tagCloud : true,
  rowCount: 10
 })
 #livetable(userdirectory $columns $columnsProperties $options)
[...]
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


  
___
users mailing list
users@xwiki.org

Re: [xwiki-users] Howto use mvn xar:format ?

2015-01-09 Thread Pascal BASTIEN
Yes you are right, then I found this: 
http://stackoverflow.com/questions/26973145/maven-build-error-tools-jar-not-found-in-jre
and mvn -e xar:format work well now.
... but I have a strange think with the result: each lines in TagCloud.xml 
contain (windows'end of line character) ^M on my linux.




 De : Thomas Mortagne thomas.morta...@xwiki.com
 À : Pascal BASTIEN pbasnews-xw...@yahoo.fr; XWiki Users users@xwiki.org 
Cc : devs XWiki d...@xwiki.org 
 Envoyé le : Vendredi 9 janvier 2015 12h11
 Objet : Re: [xwiki-users] Howto use mvn xar:format ?
   
Well you seems to have a Java issue but no idea how you can end up
with the build complaining about
/usr/lib/jvm/java-7-openjdk-amd64/jre/../lib/tools.jar.

What version of Maven are you using ? Most of us (and more importantly
the build agents) are still using 3.0.5.



On Fri, Jan 9, 2015 at 10:40 AM, Pascal BASTIEN pbasnews-xw...@yahoo.fr wrote:
 Hello,
 To clean and Pull Request my patch I need to launch mvn xar:format command 
 but I didn't managed to use it and didn't found a simple documentation about 
 it (notice, I didn't eat a maven book either)
 I don't want rebuild Xwiki package but I want only check/clean xml file (from 
 XAR) before to pull request it on github.
 Here my manipulation on my debian testing:- I installed current maven package 
 (3.0.4 version)
 - I create the conf file ~/.m2/settings.xml provided here: 
 http://dev.xwiki.org/xwiki/bin/view/Community/Building#HInstallingMaven
 (I'm behind a http proxy, then I add 
 http://dev.xwiki.org/xwiki/bin/view/Community/Building#HBuildingbehindaproxy 
 parameter  in ~/.m2/settings.xm)

 I download Xwiki source with theses commands:#Only first time
 cd /home/git-wiki/
 git clone https://github.com//xwiki-platform.git
 cd xwiki-platform/
 git remote add upstream https://github.com/xwiki/xwiki-platform.git
 git remote -v

 # synchro before modify
 cd /home/git-wiki/xwiki-platform/
 git fetch upstream
 git checkout master
 git merge upstream/master
 #branch creation and modif of files
 git checkout -B XWIKI-MaBranche
 vi 
 /home/git-wiki/xwiki-platform/xwiki-platform-core/xwiki-platform-tag/xwiki-platform-tag-ui/src/main/resources/XWiki/TagCloud.xm

 Here my problems, I want to check TagCloud.xm with mvn xar:format:cd 
 /home/git-wiki/xwiki-platform/xwiki-platform-core/xwiki-platform-tag/xwiki-platform-tag-ui
  mvn -e xar:formatI obtain the insanity that I paste at the end of this mail!
 To resume, howto check my tiny improvment with mvn xar:format?In the same 
 time, I want to avoid maven download the entire world each time I launch it 
 :-))

 Thxs for yor help.
 Pascal B
 *
 root@buttle:/home/git-wiki/xwiki-platform/xwiki-platform-core/xwiki-platform-tag/xwiki-platform-tag-ui#
  mvn -e xar:format
 [INFO] Error stacktraces are turned on.
 [INFO] Scanning for projects...
 [INFO]
 [INFO] 
 
 [INFO] Building XWiki Platform - Tag - UI 6.4-SNAPSHOT
 [INFO] 
 
 [INFO] 
 
 [INFO] BUILD FAILURE
 [INFO] 
 
 [INFO] Total time: 5.962s
 [INFO] Finished at: Fri Jan 09 10:24:42 CET 2015
 [INFO] Final Memory: 19M/228M
 [INFO] 
 
 [ERROR] Failed to execute goal on project xwiki-platform-tag-ui: Could not 
 resolve dependencies for project 
 org.xwiki.platform:xwiki-platform-tag-ui:xar:6.4-SNAPSHOT: Could not find 
 artifact com.sun:tools:jar:1.5.0 at specified path 
 /usr/lib/jvm/java-7-openjdk-amd64/jre/../lib/tools.jar - [Help 1]
 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
 goal on project xwiki-platform-tag-ui: Could not resolve dependencies for 
 project org.xwiki.platform:xwiki-platform-tag-ui:xar:6.4-SNAPSHOT: Could not 
 find artifact com.sun:tools:jar:1.5.0 at specified path 
 /usr/lib/jvm/java-7-openjdk-amd64/jre/../lib/tools.jar
        at 
org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:210)
        at 
org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:117)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:258)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:201)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject

Re: [xwiki-users] Howto use mvn xar:format ?

2015-01-09 Thread Pascal BASTIEN
My editor is vi on Linux then I use unix end of line...

I launch mvn -e xar:format for the second time and ^M disapeared... (X-files 
case? :-) )

NB: and the download is not launched at the second time

Thxs a lot both.
Pascal B
  De : Eduard Moraru enygma2...@gmail.com
 À : Pascal BASTIEN pbasnews-xw...@yahoo.fr; XWiki Users users@xwiki.org 
 Envoyé le : Vendredi 9 janvier 2015 13h50
 Objet : Re: [xwiki-users] Howto use mvn xar:format ?
   


On Fri, Jan 9, 2015 at 2:41 PM, Pascal BASTIEN pbasnews-xw...@yahoo.fr wrote:

... erratum
The wrong end of line is not on all TagCloud.xml file lines:I must remove them 
before to commit: with :set ff=unix with vi ?


Not sure about this one. I think it might help if you configure your editor to 
use unix line ending.

In any case, I think it does not matter because when you commit on git, the 
line endings will be converted to unix automatically.

Thanks,
Eduard 




?xml version=1.0 encoding=UTF-8?
!--^M
 * See the NOTICE file distributed with this work for additional^M
 * information regarding copyright ownership.^M
 *^M

...

    classTypecom.xpn.xwiki.objects.classes.StaticListClass/classType
  /use
    /class
    property
  cachelong/cache
    /property
    property
  codeol.tagCloud {^M
  text-align: justify;^M
  /* Overriding of toucan value */^M
  margin: 0;^M
  padding: 0;^M
}^M
^M
div#dashboardleft ol.tagCloud {^M
  /* We re-set this value here on purpose so that uses of the cloud outside of 
the dashboard are not affected */^M
  margin: 0.5em;^M
}^M



      De : Pascal BASTIEN pbasnews-xw...@yahoo.fr
 À : Thomas Mortagne thomas.morta...@xwiki.com; XWiki Users users@xwiki.org
Cc : devs XWiki d...@xwiki.org
 Envoyé le : Vendredi 9 janvier 2015 13h30
 Objet : Re: [xwiki-users] Howto use mvn xar:format ?

Yes you are right, then I found this: 
http://stackoverflow.com/questions/26973145/maven-build-error-tools-jar-not-found-in-jre
and mvn -e xar:format work well now.
... but I have a strange think with the result: each lines in TagCloud.xml 
contain (windows'end of line character) ^M on my linux.




    De : Thomas Mortagne thomas.morta...@xwiki.com
 À : Pascal BASTIEN pbasnews-xw...@yahoo.fr; XWiki Users users@xwiki.org
Cc : devs XWiki d...@xwiki.org
 Envoyé le : Vendredi 9 janvier 2015 12h11
 Objet : Re: [xwiki-users] Howto use mvn xar:format ?
 
Well you seems to have a Java issue but no idea how you can end up
with the build complaining about
/usr/lib/jvm/java-7-openjdk-amd64/jre/../lib/tools.jar.

What version of Maven are you using ? Most of us (and more importantly
the build agents) are still using 3.0.5.



On Fri, Jan 9, 2015 at 10:40 AM, Pascal BASTIEN pbasnews-xw...@yahoo.fr wrote:
 Hello,
 To clean and Pull Request my patch I need to launch mvn xar:format command 
 but I didn't managed to use it and didn't found a simple documentation about 
 it (notice, I didn't eat a maven book either)
 I don't want rebuild Xwiki package but I want only check/clean xml file (from 
 XAR) before to pull request it on github.
 Here my manipulation on my debian testing:- I installed current maven package 
 (3.0.4 version)
 - I create the conf file ~/.m2/settings.xml provided here: 
 http://dev.xwiki.org/xwiki/bin/view/Community/Building#HInstallingMaven
 (I'm behind a http proxy, then I add 
 http://dev.xwiki.org/xwiki/bin/view/Community/Building#HBuildingbehindaproxy 
 parameter  in ~/.m2/settings.xm)

 I download Xwiki source with theses commands:#Only first time
 cd /home/git-wiki/
 git clone https://github.com//xwiki-platform.git
 cd xwiki-platform/
 git remote add upstream https://github.com/xwiki/xwiki-platform.git
 git remote -v

 # synchro before modify
 cd /home/git-wiki/xwiki-platform/
 git fetch upstream
 git checkout master
 git merge upstream/master
 #branch creation and modif of files
 git checkout -B XWIKI-MaBranche
 vi 
 /home/git-wiki/xwiki-platform/xwiki-platform-core/xwiki-platform-tag/xwiki-platform-tag-ui/src/main/resources/XWiki/TagCloud.xm

 Here my problems, I want to check TagCloud.xm with mvn xar:format:cd 
 /home/git-wiki/xwiki-platform/xwiki-platform-core/xwiki-platform-tag/xwiki-platform-tag-ui
  mvn -e xar:formatI obtain the insanity that I paste at the end of this mail!
 To resume, howto check my tiny improvment with mvn xar:format?In the same 
 time, I want to avoid maven download the entire world each time I launch it 
 :-))

 Thxs for yor help.
 Pascal B
 *
 root@buttle:/home/git-wiki/xwiki-platform/xwiki-platform-core/xwiki-platform-tag/xwiki-platform-tag-ui#
  mvn -e xar:format
 [INFO] Error stacktraces are turned on.
 [INFO] Scanning for projects...
 [INFO]
 [INFO] 
 
 [INFO] Building XWiki Platform - Tag - UI 6.4-SNAPSHOT
 [INFO] 
 
 [INFO] 
 
 [INFO] BUILD

Re: [xwiki-users] Howto use mvn xar:format ?

2015-01-09 Thread Pascal BASTIEN
... erratum 
The wrong end of line is not on all TagCloud.xml file lines:I must remove them 
before to commit: with :set ff=unix with vi ?

?xml version=1.0 encoding=UTF-8?
!--^M
 * See the NOTICE file distributed with this work for additional^M
 * information regarding copyright ownership.^M
 *^M

...

    classTypecom.xpn.xwiki.objects.classes.StaticListClass/classType
  /use
    /class
    property
  cachelong/cache
    /property
    property
  codeol.tagCloud {^M
  text-align: justify;^M
  /* Overriding of toucan value */^M
  margin: 0;^M
  padding: 0;^M
}^M
^M
div#dashboardleft ol.tagCloud {^M
  /* We re-set this value here on purpose so that uses of the cloud outside of 
the dashboard are not affected */^M
  margin: 0.5em;^M
}^M



  De : Pascal BASTIEN pbasnews-xw...@yahoo.fr
 À : Thomas Mortagne thomas.morta...@xwiki.com; XWiki Users users@xwiki.org 
Cc : devs XWiki d...@xwiki.org 
 Envoyé le : Vendredi 9 janvier 2015 13h30
 Objet : Re: [xwiki-users] Howto use mvn xar:format ?
   
Yes you are right, then I found this: 
http://stackoverflow.com/questions/26973145/maven-build-error-tools-jar-not-found-in-jre
and mvn -e xar:format work well now.
... but I have a strange think with the result: each lines in TagCloud.xml 
contain (windows'end of line character) ^M on my linux.




    De : Thomas Mortagne thomas.morta...@xwiki.com
 À : Pascal BASTIEN pbasnews-xw...@yahoo.fr; XWiki Users users@xwiki.org 
Cc : devs XWiki d...@xwiki.org 
 Envoyé le : Vendredi 9 janvier 2015 12h11
 Objet : Re: [xwiki-users] Howto use mvn xar:format ?
  
Well you seems to have a Java issue but no idea how you can end up
with the build complaining about
/usr/lib/jvm/java-7-openjdk-amd64/jre/../lib/tools.jar.

What version of Maven are you using ? Most of us (and more importantly
the build agents) are still using 3.0.5.



On Fri, Jan 9, 2015 at 10:40 AM, Pascal BASTIEN pbasnews-xw...@yahoo.fr wrote:
 Hello,
 To clean and Pull Request my patch I need to launch mvn xar:format command 
 but I didn't managed to use it and didn't found a simple documentation about 
 it (notice, I didn't eat a maven book either)
 I don't want rebuild Xwiki package but I want only check/clean xml file (from 
 XAR) before to pull request it on github.
 Here my manipulation on my debian testing:- I installed current maven package 
 (3.0.4 version)
 - I create the conf file ~/.m2/settings.xml provided here: 
 http://dev.xwiki.org/xwiki/bin/view/Community/Building#HInstallingMaven
 (I'm behind a http proxy, then I add 
 http://dev.xwiki.org/xwiki/bin/view/Community/Building#HBuildingbehindaproxy 
 parameter  in ~/.m2/settings.xm)

 I download Xwiki source with theses commands:#Only first time
 cd /home/git-wiki/
 git clone https://github.com//xwiki-platform.git
 cd xwiki-platform/
 git remote add upstream https://github.com/xwiki/xwiki-platform.git
 git remote -v

 # synchro before modify
 cd /home/git-wiki/xwiki-platform/
 git fetch upstream
 git checkout master
 git merge upstream/master
 #branch creation and modif of files
 git checkout -B XWIKI-MaBranche
 vi 
 /home/git-wiki/xwiki-platform/xwiki-platform-core/xwiki-platform-tag/xwiki-platform-tag-ui/src/main/resources/XWiki/TagCloud.xm

 Here my problems, I want to check TagCloud.xm with mvn xar:format:cd 
 /home/git-wiki/xwiki-platform/xwiki-platform-core/xwiki-platform-tag/xwiki-platform-tag-ui
  mvn -e xar:formatI obtain the insanity that I paste at the end of this mail!
 To resume, howto check my tiny improvment with mvn xar:format?In the same 
 time, I want to avoid maven download the entire world each time I launch it 
 :-))

 Thxs for yor help.
 Pascal B
 *
 root@buttle:/home/git-wiki/xwiki-platform/xwiki-platform-core/xwiki-platform-tag/xwiki-platform-tag-ui#
  mvn -e xar:format
 [INFO] Error stacktraces are turned on.
 [INFO] Scanning for projects...
 [INFO]
 [INFO] 
 
 [INFO] Building XWiki Platform - Tag - UI 6.4-SNAPSHOT
 [INFO] 
 
 [INFO] 
 
 [INFO] BUILD FAILURE
 [INFO] 
 
 [INFO] Total time: 5.962s
 [INFO] Finished at: Fri Jan 09 10:24:42 CET 2015
 [INFO] Final Memory: 19M/228M
 [INFO] 
 
 [ERROR] Failed to execute goal on project xwiki-platform-tag-ui: Could not 
 resolve dependencies for project 
 org.xwiki.platform:xwiki-platform-tag-ui:xar:6.4-SNAPSHOT: Could not find 
 artifact com.sun:tools:jar:1.5.0 at specified path 
 /usr/lib/jvm/java-7-openjdk-amd64/jre/../lib/tools.jar - [Help 1]
 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
 goal on project xwiki-platform-tag-ui: Could not resolve dependencies for 
 project org.xwiki.platform:xwiki

[xwiki-users] Global user and local user with Xwiki 6.4 Sub wiki + LDAP account

2015-02-09 Thread Pascal BASTIEN
Hello,

Is it possible to force all user in Global user?
I (a friend Admin) use LDAP account and 3 subwiki.
If new LDAP user log in on a sub wiki (sub wiki URL), unfortunaly a local user 
is created.

Perhaps he must remove subscribe right for new user on sub wiki?

Thxs for your help (again :) )

Pascal B


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


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

2015-02-09 Thread Pascal BASTIEN


--- En date de : Lun 9.2.15, Jeremie BOUSQUET jeremie.bousq...@gmail.com a 
écrit :

 De: Jeremie BOUSQUET jeremie.bousq...@gmail.com
 Objet: Re: [xwiki-users] Fw : Re: Fw : Re: Need doc about access object in a 
 page (and use doc)
 À: Pascal BASTIEN pbasnews-xw...@yahoo.fr, XWiki Users users@xwiki.org
 Date: Lundi 9 février 2015, 16h36
 Hi,
 
 2015-02-09 15:37 GMT+01:00
 Pascal BASTIEN pbasnews-xw...@yahoo.fr:
 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

Yes thxs you I knew this page :-)
About he doc I use frequently this one 
http://platform.xwiki.org/xwiki/bin/view/SRD/Navigation end 
https://network.xwiki.com/xwiki/bin/view/DocXE542Fr/XWikiDocTable, but examples 
miss me.
I failed often to guess object type/collection, etc. in my loop or methods.

  
 
 

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


Re: [xwiki-users] Global user and local user with Xwiki 6.4 Sub wiki + LDAP account

2015-02-09 Thread Pascal BASTIEN
Thanks you it is exactly what my friend need :-)


En date de : Lun 9.2.15, Thomas Mortagne thomas.morta...@xwiki.com a écrit :

 Objet: Re: [xwiki-users] Global user and local user with Xwiki 6.4 Sub wiki + 
LDAP account
 À: Pascal BASTIEN pbasnews-xw...@yahoo.fr, XWiki Users users@xwiki.org
 Date: Lundi 9 février 2015, 16h52
 
 See 
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/LDAPAuthenticationUseCases#HI27minamultiwikienvironmentandIwantmyLDAPuserstoregisteronlyonthemainwiki
 
 On Mon, Feb 9, 2015 at 4:31 PM, Pascal BASTIEN
 pbasnews-xw...@yahoo.fr
 wrote:
  Hello,
 
  Is it possible to force all user in Global
 user?
  I (a friend Admin) use LDAP
 account and 3 subwiki.
  If new LDAP user
 log in on a sub wiki (sub wiki URL), unfortunaly a local
 user is created.
 
 
 Perhaps he must remove subscribe right for new
 user on sub wiki?
 
 
 Thxs for your help (again :) )
 
  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


[xwiki-users] Prevent delete some page

2015-02-13 Thread Pascal BASTIEN
Hello,

In my xwiki application, I want prevent user to delete pages (even he is the 
creator).
Users create page with my form (some class/Sheet/Template/Velocity/API xwiki) 
and of course I want to keep original UserCreator info in the doc.

Is it possible? I didn't manage with right access (XWiki.XWikiRights object).

thxs

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


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

2015-02-09 Thread Pascal BASTIEN


--- En date de : Lun 9.2.15, Clemens Klein-Robbenhaar 
c.robbenh...@espresto.com a écrit :

 De: Clemens Klein-Robbenhaar c.robbenh...@espresto.com
 Objet: Re: [xwiki-users] Need doc about access object in a page (and use doc)
 À: users@xwiki.org
 Date: Lundi 9 février 2015, 13h29
 On 02/09/2015 10:15 AM,
 Pascal BASTIEN wrote:
  Hello,
  I read/apply this doc with succcess:
  http://platform.xwiki.org/xwiki/bin/view/DevGuide/APIGuide#HAccessobjectsinapage
  
  With this code I can
 display all objects ATTACHED to THIS page.
  ***
 
 #set($class = $obj.xWikiClass) ## access the class object
 representing SomeSpace.SomeClass
 
 #foreach($prop in $class.properties) ## go through all
 properties
  ...
 
 ***
  but if I attached some
 class to another page, how can I list properties?
 
 the $xwiki object has a method
 to access the class if you know the name
 
  #set( $someClass =
 $xwiki.getClass(SomeSpace.SomeClass))
 
 http://maven.xwiki.org/site/docs/xwiki-javadoc-4.1.x/com/xpn/xwiki/api/XWiki.html#getClass%28java.lang.String%29

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

 
  Another question:
  I have a page with 3 same Class, how to
 list them (like ?editor=class did)?
 
  you can get a list of of objects of a certain
 class via
 $doc.getObjects(SomeSpace.SomeClass)
 
  
 http://maven.xwiki.org/site/docs/xwiki-javadoc-4.1.x/com/xpn/xwiki/api/Document.html#getObjects%28java.lang.String%29

$doc.getObjects(SomeSpace.SomeClass)

I failed to :-(

The thing I don't understand is, my values are stored in a doc with attached 
class. I need theses value from another doc but all method have Class name 
parameter ... Class name contain only field (properties) name?


(Hope I will understand how find answer in javadoc to avoid disturbed nice 
people of user list)

Thxs


 
  An example:
 
 MySpaceMyClass contain this Class properties:
  - My Field ID (IdField: String)
  - My Lib Field (LibField: String)
  I create MySpace.MyNiceDoc and add my
 previous Class MySpace/MyNiceDoc?editor=object
  and contain:
  Objets
 de type MySpace.MyClass (2)
  * MyClass
 0
   - My Field ID
   - My Lib Field
 
 *MyClass 1:
   - My Field ID
   - My Lib Field
  
  With it I like to fill a select list from
 this doc (but from another doc to).
  How
 can I proceed? because on MySpace.MyNiceDoc I can only
 display one/First Lib values with this code:
  {{velocity}}
  ##
 Retrieve the first object (index [0]) among all objects
 attached to this page and of a certain class 
  #set($obj =
 $doc.getObject('MySpace.MyClass'))
  #set($class = $obj.xWikiClass) ## access
 the class object representing SomeSpace.SomeClass
  #foreach($prop in $class.properties) ## go
 through all properties
   *
 ${prop.prettyName} : $doc.display($prop.getName())
  #end
  {{/velocity}}
  I guess i need a loop but which one?
  
  And the big question
 (who I think it will interest everyone), how can I use
 documentation
  ( http://platform.xwiki.org/xwiki/bin/view/SRD/Navigation?xpage=embed
 and or 
 http://nexus.xwiki.org/nexus/service/local/repositories/releases/archive/org/xwiki/platform/xwiki-platform-oldcore/6.4/xwiki-platform-oldcore-6.4-javadoc.jar/!/index.html
 )
  to guess xWikiClass (or my loop)
 by example?
  
  A
 doc/example to use documentation will be welcome. :-)
  
  thxs for any
 help.
  
  Pascal
 B
 
 ___
  users mailing list
  users@xwiki.org
  http://lists.xwiki.org/mailman/listinfo/users
  
 
 
 
 mit freundlichen Grüßen
 Clemens Klein-Robbenhaar
 
 -- 
 Clemens Klein-Robbenhaar
 Software Development
 EsPresto
 AG
 Breite Str. 30-31
 10178
 Berlin/Germany
 Tel: +49.(0)30.90 226.763
 Fax: +49.(0)30.90 226.760
 robbenh...@espresto.com
 
 HRB 77554 B -
 Berlin-Charlottenburg
 Vorstand: Maya
 Biersack, Peter Biersack
 Vorsitzender des
 Aufsichtsrats: Dipl.-Wirtsch.-Ing. Winfried Weber
 Zertifiziert nach ISO 9001:2008
 ___
 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] Fw : Re: Fw : Re: Need doc about access object in a page (and use doc)

2015-02-09 Thread Pascal BASTIEN
Thxs god! xwiki is a wonderfull world ... when we manage to do what we want (or 
we can understand javadoc) ... hum!

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 c.robbenh...@espresto.com
 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


[xwiki-users] Fw : Re: HQL selected index of combo box list

2015-02-12 Thread Pascal BASTIEN
 to respond, the
 support you guys give is SUPER valuable to me and keeps me
 moving forward in most cases, so I really appreciate it.
 
+1
(Valentine's Day soon ? :-) )

(+1 too for hiding Save button question/answer for  Xwiki app)

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


Re: [xwiki-users] Howto include a link to a page in edit mode+inline mode

2015-01-08 Thread Pascal BASTIEN

  
 Anyway, it is strange than this URL below working well except for inline 
 mode: [[Panels.TagCloud||queryString=xpage=editeditor=wiki]] open directly 
 the target in edit mode and wiki editor
 [[Panels.TagCloud||queryString=xpage=editeditor=wysiwyg]]
 [[Panels.TagCloud||queryString=xpage=editeditor=rights]]
 [[Panels.TagCloud||queryString=xpage=editeditor=object]]
 [[Panels.TagCloud||queryString=xpage=editeditor=class]] 

  These will generate a URL with the “view” action!
Yes and ... no: the generated URL contain view but xpage parameter make it 
edit action.(Perhaps it is an old functionality who doesn't work with inline 
because it didn't exist?)
  For example: http://.../xwiki/bin/view/Space/Page

  And not an edit action as in: http://.../xwiki/bin/edit/Space/Page

For example: http://.../xwiki/bin/view/Space/Page?xpage=editeditor=wiki open 
directly the target in edit mode and wiki editor (even if URL contain view 
action)... like Angelo said in XWiki- Users - Link to page in edit mode without 
using full url?
  


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


Re: [xwiki-users] Howto include a link to a page in edit mode+inline mode

2015-01-07 Thread Pascal BASTIEN
I'm looking for a simpliest way without velocity but your answer working 
well:{{velocity}}
[[Panels.TagCloudpath:$xwiki.getURL(Panels.TagCloud,'edit','editor=inline')]]
{{/velocity}}
Anyway, it is strange than this URL below working well except for inline 
mode:[[Panels.TagCloud||queryString=xpage=editeditor=wiki]] open directly 
the target in edit mode and wiki editor
[[Panels.TagCloud||queryString=xpage=editeditor=wysiwyg]]
[[Panels.TagCloud||queryString=xpage=editeditor=rights]]
[[Panels.TagCloud||queryString=xpage=editeditor=object]]
[[Panels.TagCloud||queryString=xpage=editeditor=class]]
[[Panels.TagCloud||queryString=xpage=editeditor=inline]]  doesn't work.
Thxs anyway.

  De : vinc...@massol.net vinc...@massol.net
 À : XWiki Users users@xwiki.org 
Cc : Pascal BASTIEN pbasnews-xw...@yahoo.fr 
 Envoyé le : Mercredi 7 janvier 2015 18h44
 Objet : Re: [xwiki-users] Howto include a link to a page in edit mode+inline 
mode
   
#yiv3248285401 * {font-family:Menlo, Arial;} Hi Pascal,
Not sure I understand your question but you can use the following syntax:
[[labelpath:…]]
for example: 
{{velocity}}[[labelpath:$xwiki.getURL(…)]]{{/velocity}}
Thanks-Vincent



On 7 Jan 2015 at 18:40:19, Pascal BASTIEN 
(pbasnews-xw...@yahoo.fr(mailto:pbasnews-xw...@yahoo.fr)) wrote:

 Hello,
 Is it possible to include a link to a page in edit mode WITH inline editor 
 rather than view mode without using the full URL?
 I applied this answer XWiki- Users - Link to page in edit mode without using 
 full url?
 but unfortunaly it doesn't work for inline editor 
 :-((xpage=editeditor=inline)
 
 Thxs
 Pascal B


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


[xwiki-users] Howto include a link to a page in edit mode+inline mode

2015-01-07 Thread Pascal BASTIEN
Hello,
Is it possible to include a link to a page in edit mode WITH inline editor 
rather than view mode without using the full URL?
I applied this answer XWiki- Users - Link to page in edit mode without using 
full url?
but unfortunaly it doesn't work for inline editor :-((xpage=editeditor=inline)

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


[xwiki-users] ajax example

2015-03-20 Thread Pascal BASTIEN
Hello,

Here, I provided an simple Ajax example to use in xwiki application:
http://extensions.xwiki.org/xwiki/bin/view/Extension/AJAX+example#Attachments
This mail on this list to validate that what I wrote is the best way (like 
suggest Vincent)

Thxs.

Pascal BASTIEN

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


Re: [xwiki-users] Xwiki Appli: how can I remove bold in view mode?

2015-03-09 Thread Pascal BASTIEN
Nope it is not the cause of the problem.
By default, in view mode,  $doc.display($prop.getName()) displayed between 
strong tag.

Keep looking...


En date de : Sam 7.3.15, Eduard Moraru enygma2...@gmail.com a écrit :

 Objet: Re: [xwiki-users] Xwiki Appli: how can I remove bold in view mode?
 À: Pascal BASTIEN pbasnews-xw...@yahoo.fr, XWiki Users users@xwiki.org
 Date: Samedi 7 mars 2015, 21h08
 
 Hi,
 
 You have probably entered the bold
 styling by mistake. Have a look at the stored content of
 that property ($doc.getValue($fieldName)) and you will
 probably notice that there are instructions (**something**)
 in it to make it bold. If this is true, edit the property
 accordingly... select all the text, bold it and then un-bold
 it again in an effort to get rid of all traces of bold
 styling in your content.
 
 Hope this helps,
 Eduard
 
 On Fri, Mar 6, 2015 at
 12:41 PM, Pascal BASTIEN pbasnews-xw...@yahoo.fr
 wrote:
 Hello,
 
 In my XWiki application, I have a Sheet + Class with a
 property with textArea/wysiwyg type.
 
 I use public String display(String fieldname, String
 mode)
 
 
http://maven.xwiki.org/site/docs/xwiki-javadoc-5.0.x/com/xpn/xwiki/api/Document.html#display%28java.lang.String,%20java.lang.String%29
 
 
 
 Unfortunaly in view mode all values are rendering between
 strong /strong.
 
 How can I remove them?
 
 
 
 An example, in edit mode, in my  textArea/wysiwyg, I
 have
 
 -
 
 Some text bold
 
 
 
    1. first
 
    2. second
 
 -
 
 
 
 In view mode I obtein:
 
 Some text bold
 
 
 
   2. first
 
   3. second
 
 (I must reinit counter list too)
 
 
 
 HTML code:
 
 strong/strong
 
 p
 
 strong
 
 Some text
 
 strongbold/strong
 
 /strong
 
 /p
 
 ol
 
 li style=list-style-type: none
 
 strong/strong
 
 /li
 
 li
 
 strongfirst/strong
 
 /li
 
 li
 
 /ol
 
 Of course i cannot remove strong/strong or
 modify style because I want to keep this one:
 strongbold/strong
 
 
 
 Thxs for any help
 
 
 
 
 
 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


[xwiki-users] Xwiki Appli: how can I remove bold in view mode?

2015-03-06 Thread Pascal BASTIEN
Hello,
In my XWiki application, I have a Sheet + Class with a property with 
textArea/wysiwyg type.
I use public String display(String fieldname, String mode)
http://maven.xwiki.org/site/docs/xwiki-javadoc-5.0.x/com/xpn/xwiki/api/Document.html#display%28java.lang.String,%20java.lang.String%29

Unfortunaly in view mode all values are rendering between strong /strong.
How can I remove them?

An example, in edit mode, in my  textArea/wysiwyg, I have
-
Some text bold

   1. first
   2. second
-

In view mode I obtein:
Some text bold

  2. first
  3. second
(I must reinit counter list too)

HTML code:
strong/strong
p
strong
Some text
strongbold/strong
/strong
/p
ol
li style=list-style-type: none
strong/strong
/li
li
strongfirst/strong
/li
li
/ol
Of course i cannot remove strong/strong or modify style because I want to 
keep this one: strongbold/strong

Thxs for any help


Pascal B

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


[xwiki-users] Fw : Re: ajax example

2015-03-24 Thread Pascal BASTIEN

 Some comments:
Thxs
 
 For step 1: Don't print
 the JSON directly. You'll have escaping
 issues. In order to ensure the generated JSON
 is valid you should
 build the JSON in memory
 (using Velocity/Java maps, arrays and basic
 types) and then serialize it:
 
 $jsontool.serialize({
   greeting: Hello,
   location: World
 })

I agree but the purpose was to use  Vincent example on this page: 
http://extensions.xwiki.org/xwiki/bin/view/Extension/Output+JSON
Perhaps we (who?) need to modify both pages?


 
 For step 4:
 Don't hard-code the page URL and use the 'get'
 action
 instead of 'view' to avoid
 adding view statistics entries.
 
 var url = new
 XWiki.Document('JsonHello',
 'Sandbox').getURL('get');

Thxs I was too lazy to take too long time to find JS function. :-)

 
 Also, to avoid the need to
 URL-encode the request parameters you
 should
 pass them using an object not a string.
 
 var params = {
  
 'xpage': 'plain',
  
 'outputSyntax': 'plain'
 };
 $.get(url, params,
 function(data) {
   ...
 });

Yes thxs you
= I uploaded/update my page

(The worst is that I hate JS) :-)



Pascal B

 
 Hope this
 helps,
 Marius
 
 
 On Fri, Mar 20, 2015 at 8:26 PM, Pascal BASTIEN
 pbasnews-xw...@yahoo.fr
 wrote:
  Hello,
 
  Here, I provided an simple Ajax example to
 use in xwiki application:
  http://extensions.xwiki.org/xwiki/bin/view/Extension/AJAX+example#Attachments
  This mail on this list to validate that
 what I wrote is the best way (like suggest Vincent)
 
  Thxs.
 
  Pascal
 BASTIEN
 
 
 ___
  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] Fw : Re: Fight with ActivityStreamPluginApi

2015-03-25 Thread Pascal BASTIEN
I found correct syntax to indicate user :-)
#foreach ($MonEvent in 
$xwiki.activitystream.getEventsForUser('xwiki:XWiki.Admin', false, 1500, 0))
I will open a tiny bug for filter - if true, group the matched events by 
priority parameter.


En date de : Mar 24.3.15, Pascal BASTIEN pbasnews-xw...@yahoo.fr a écrit :

 Objet: [xwiki-users] Fw : Re:  Fight with ActivityStreamPluginApi
 À: XWiki Users users@xwiki.org, Thomas Mortagne 
thomas.morta...@xwiki.com
 Date: Mardi 24 mars 2015, 19h09
 
 
   Do you mean $xwiki.activitystream. API is
  broken?
  

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


Re: [xwiki-users] [ANN] CKEditor Integration in XWiki

2015-03-26 Thread Pascal BASTIEN
Hello,

Thanks you for your great extension.

I found a tiny bug with copy/paste from LibreOffice Writer:
- I copy/paste some Bold text in CKeditor
- I switch with button Source (HTML code blinking a brief instant)
or I Save and view
- this code are displayed in view mode

/**/p { margin-bottom: 0.25cm; line-height: 120%; }
/**/

Some Bold text

The wiki source of the page:
/~*~*/p { margin-bottom: 0.25cm; line-height: 120%; }
/~*~*/


(% style=margin-bottom: 0cm; line-height: 100% %)
Some **Bold** text

If I use Paste from Word button, it's working well.



It's shame than macro shortcut missing.

I tested on fresh Xwiki 6.4.3 jetty package.

Pascal B



En date de : Lun 16.2.15, Marius Dumitru Florea 
mariusdumitru.flo...@xwiki.com a écrit :

 Objet: [xwiki-users] [ANN] CKEditor Integration in XWiki
 À: XWiki Users users@xwiki.org, XWiki Developers d...@xwiki.org
 Date: Lundi 16 février 2015, 17h31
 
 Hi guys,
 
 FYI I published an extension [1] that integrates the
 CKEditor [2] in
 XWiki. It can be installed through the Extension Manager and
 should
 work with any version greater than or equal to 6.2.5. I hope
 to add
 support for the missing features soon.
 
 Thanks,
 Marius
 
 [1] http://extensions.xwiki.org/xwiki/bin/view/Extension/CKEditor+Integration
 [2] http://ckeditor.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] [ANN] CKEditor Integration in XWiki

2015-03-26 Thread Pascal BASTIEN
Done! :-)
Your extension is a big improvement  (especially for table)


En date de : Jeu 26.3.15, Marius Dumitru Florea 
mariusdumitru.flo...@xwiki.com a écrit :

 Objet: Re: [xwiki-users] [ANN] CKEditor Integration in XWiki
 À: Pascal BASTIEN pbasnews-xw...@yahoo.fr, XWiki Users users@xwiki.org
 Date: Jeudi 26 mars 2015, 12h45
 
 Hi Pascal,
 
 I just created a project in
 JIRA for the CKEditor Integration. Would
 be
 great if you can report the issue at
 http://jira.xwiki.org/browse/CKEDITOR
 with the steps to reproduce.
 
 Thanks,
 Marius
 
 On Thu, Mar 26, 2015 at 12:53 PM, Pascal
 BASTIEN
 pbasnews-xw...@yahoo.fr
 wrote:
  Hello,
 
  Thanks you for your great extension.
 
  I found a tiny bug
 with copy/paste from LibreOffice Writer:
  - I copy/paste some Bold text in
 CKeditor
  - I switch with button Source
 (HTML code blinking a brief instant)
  or
 I Save and view
  - this code are
 displayed in view mode
 
  /**/p { margin-bottom: 0.25cm;
 line-height: 120%; }
  /**/
 
  Some Bold text
 
  The wiki source of
 the page:
  /~*~*/p { margin-bottom:
 0.25cm; line-height: 120%; }
  /~*~*/
 
 
 
 (% style=margin-bottom: 0cm; line-height: 100%
 %)
  Some **Bold** text
 
  If I use Paste
 from Word button, it's working well.
 
  
 
  It's shame than
 macro shortcut missing.
 
  I tested on fresh Xwiki 6.4.3 jetty
 package.
 
  Pascal
 B
 
 
 
 
  En date de : Lun 16.2.15, Marius Dumitru
 Florea mariusdumitru.flo...@xwiki.com
 a écrit :
 
  
 Objet: [xwiki-users] [ANN] CKEditor Integration in XWiki
   À: XWiki Users users@xwiki.org,
 XWiki Developers d...@xwiki.org
   Date: Lundi 16 février 2015, 17h31
 
   Hi guys,
 
   FYI I published an
 extension [1] that integrates the
  
 CKEditor [2] in
   XWiki. It can be
 installed through the Extension Manager and
   should
   work with
 any version greater than or equal to 6.2.5. I hope
   to add
   support
 for the missing features soon.
 
   Thanks,
   Marius
 
   [1] 
 http://extensions.xwiki.org/xwiki/bin/view/Extension/CKEditor+Integration
   [2] http://ckeditor.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


[xwiki-users] livetable with multiple class?

2015-03-27 Thread Pascal BASTIEN
If I understand documentation, to use Livetable with multiple Class (with 3 or 
4 common properties: same name) I must use 
Parameter $options:
resultPage  The full name of the page to use as a JSON data provider for 
the table. This option allows to use a different data source than the default 
one (XWiki.LiveTableResults) for specific needs not handled by LiveTableResults 
(for example: complex cross-classes queries, external data retrieved with a 
groovy script, etc.).

with an HQL query like this one (for 2 class: FormSMQ.EAClass and 
FormSMQ.PiacJ2Class ):
#set($hqlstatement=, BaseObject as obj where (doc.fullName = obj.name and 
obj.className = 'FormSMQ.EAClass') or (doc.fullName = obj.name and 
obj.className = 'FormSMQ.PiacJ2Class'))
$services.query.hql($hqlstatement).execute()
(http://extensions.xwiki.org/xwiki/bin/view/Extension/Query+Module)

My query list all documents with my 2 Class. To provide JSON source of 
LiveTable, I must displayed all my column.

Can I do it with query in one (or two) shots or I must use a foreach loop to 
rendering my JSON data?

Thxs




En date de : Mer 25.2.15, Pascal BASTIEN pbasnews-xw...@yahoo.fr a écrit :

 Objet: [xwiki-users] livetable with multiple class?
 À: XWiki Users users@xwiki.org
 Date: Mercredi 25 février 2015, 16h20
 
 Hello,
 
 Livetable is somehow magic but ... (there are always a
 'but') is it possible to use multiple Class?
 
 I read XWiki.LiveTableResultsMacros
 #macro(gridresultwithfilter_buildQuery $className ...
 #set($class =
 $xwiki.getDocument($className).getxWikiClass())
 = livetable use getxWikiClass method (and not
 getxWikiClasses :-( )
 
 Here my problem in my nice xwiki 6.4.0 application:
 I created some Class/Sheet/Template with 2 common
 properties/field: I mean on each document Class I created
 this common property (same name, same source): this one by
 example
 - Name:P1_DgMoa_req Type: Database List
 - XWiki Class Name: FormSMQ.ListeDGClass
 - Id Field: Name DGId
 - Value Field: Name DGLib
 
 On my WebHome I paste this livetable:
 
 #set ($columnsProperties = {
  'TypeFiche_RO': {type:list,size:10},
  'P1_DgMoa_req': {type:list,size:10},
   'doc.name': {type:text,size:10,link:view},
   'doc.date': {type:text,size:10},
   'doc.creator':
 {type:text,size:10,link:creator},
   '_actions':
 {sortable:false,filterable:false,html:true,actions:[edit]}
 })
 #set ($options = {
   'className': 'MySpace.MyClass',
   'translationPrefix' : 'FormSMQ.livetable.',
   'tagCloud': true,
   'rowCount': 15,
   'maxPages': 10,
   'selectedColumn': 'doc.name',
   'defaultOrder': 'asc',
   'extraParams': space=${doc.space}
 })
 
 With one class ( 'className': 'MySpace.MyClass',) my
 livetable work perfectly but display only documents 'linked'
 with this class (doc with 'MySpace.MyClass' object)
 If I use 'className': ''  (empty), livetable show all
 document on the space but my select list are not filled.
 I tried  'TypeFiche_RO':
 {type:list,size:10,'class': 'MySpace.MyClass' } with
 empty 'classname', but if I select a value in my select
 list, only  document 'linked' with this class are
 displayed.
 I tried topFilters    options (HTML fragment
 that will be placed in a top filter area in the same
 fashion as the Tag Cloud filter) 'topFilters': 'input
 type=text size=15 name=doc.name value=', but no
 document will displayed. I didn't managed either (I don't
 know how to choose the field who is filtered by the new
 input tag)
 
 I don't know if someone understand my problem ( livetable
 with multiple class source), but every magics tricks are
 welcome to help me.
 
 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


[xwiki-users] Fw : Which Separator in properties name I can use?

2015-03-03 Thread Pascal BASTIEN


 Unfortunaly in my application I use same prefixe in my
 properties name (_) to add some dynamic bootstrap tab (and
 another things)! An example: CodeH_Deb_P1 or
 P1_EaAutrDO_Cond_Invisi
 I suppose _ is hardecoded in xwiki, then I must replace all
 my _ character in my properties name and Sheets code but
 could you suggest a character I can use without problem?
 
 This one ~ perhaps?

Finally I think I can use _ separator. I was worried for nothing.
I didn't understant how construct my 'dynamic facet' like this 
Main.SolrUserFacet because I don't know how it is working:
There are a macro
#macro (displaySearchFacetValue_user $user)
but we use single quote without parameter: 
#displaySearchFacetValuesLimited($facetValues {} 'displaySearchFacetValue_user')

I tried to understand the example of 
 this code on xwiki 6.4+Expense Report Application:
 http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingCustomSolrSearchForAWM
but it doesn't working in jetty xwiki 6.4

 
 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


[xwiki-users] Fw : Re: Which Separator in properties name I can use?

2015-03-04 Thread Pascal BASTIEN

 
  By the way: I didn't manage to make
 this example work with this code on xwiki 6.4+Expense Report
 Application:
  http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingCustomSolrSearchForAWM
 
 What exactly didn't work.
 It works for me. I made some small changes
 to make it more clear.
 
Ok it is working now on my 6.4 jetty package (must typing some field to see 
correct right screen :-/).

I don't understand how ExpenseReport.ListFacet working: wich values in entry 
(if they are some) and which values are returned? 
In ExpenseReport.ListFacet we found this macro
#macro (displaySearchFacetValue_list $value)
with $value parameters but it seems you  call it with:
#displaySearchFacetValuesLimited($facetValues {} 'displaySearchFacetValue_list')
??  the macro is the parameter of #displaySearchFacetValuesLimited
didn't found displaySearchFacetValuesLimited macro source.
Have you some docs about this case or could you brievly explain me?

There are an error here I think in  ExpenseReport.ListFacet
 'facetFields': 
['property.ERCode.ERCodeClass.status_string','property.ERCode.ERCodeClass.organisation_string',
 'property.ERCode.ERCodeClass.currency_string', 
'property.ERCode.ERCodeClass.status_client', 
'property.ERCode.ERCodeClass.user_string', 'author', 'creator', 'date',
 'creationdate'],

 'property.ERCode.ERCodeClass.status_client' must be probably  
'property.ERCode.ERCodeClass.client_string' 
but a search return at right screen (redefine search):
Client: $prop.getMapValues().get($value).val...

Thxs

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


Re: [xwiki-users] cell borders in tables

2015-02-28 Thread Pascal BASTIEN
Hello,
If you want table like old Colibri skin (with cell borders) you must add a 
StyleSheetExtension object with this and applied it on current wiki:

/* Modif CSS de flamingo - ver 1.1 - 23/05/2014 */
th {
background-color: #F3F3F3;
font-weight: 700;
}
.main th, .main td, .wiki-table th, .wiki-table td {
border: 1px solid #E8E8E8;
padding: 3px 4px;
}
/* écrasement de table{width:100% de style.css  */
table {
  width: auto;
}

Pascal B




En date de : Ven 27.2.15, shouldbe q931 shouldbeq...@gmail.com a écrit :

 Objet: [xwiki-users] cell borders in tables
 À: XWiki Users users@xwiki.org
 Date: Vendredi 27 février 2015, 15h21
 
 Seem to have vanished, is there as
 way to bring them back ?
 
 I'm loving the copy and paste from Excel to create a table,
 but I
 would love to see the cell borders, it makes it much easier
 when
 navigating a larger table.
 
 Cheers
 ___
 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] Which Separator in properties name I can use?

2015-03-03 Thread Pascal BASTIEN
Hello,

I'm writing an xwiki application and I start fighting with solr search.
On 
http://extensions.xwiki.org/xwiki/bin/view/Extension/Solr+Search+Query+API#HCustomSearchParameters
 I read
The list of typed (non-string) dynamic fields that will be expanded in the 
search query. The names of these fields are suffixed with the name of their 
data type (e.g. *_int is a dynamic integer field).

Unfortunaly in my application I use same prefixe in my properties name (_) to 
add some dynamic bootstrap tab (and another things)! An example: CodeH_Deb_P1 
or P1_EaAutrDO_Cond_Invisi
I suppose _ is hardecoded in xwiki, then I must replace all my _ character in 
my properties name and Sheets code but could you suggest a character I can use 
without problem?

This one ~ perhaps?

By the way: I didn't manage to make this example work with this code on xwiki 
6.4+Expense Report Application:
http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingCustomSolrSearchForAWM

Thxs.
Pascal B

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


[xwiki-users] livetable with multiple class?

2015-02-25 Thread Pascal BASTIEN
Hello,

Livetable is somehow magic but ... (there are always a 'but') is it possible to 
use multiple Class?

I read XWiki.LiveTableResultsMacros
#macro(gridresultwithfilter_buildQuery $className ...
#set($class = $xwiki.getDocument($className).getxWikiClass())
= livetable use getxWikiClass method (and not getxWikiClasses :-( )

Here my problem in my nice xwiki 6.4.0 application:
I created some Class/Sheet/Template with 2 common properties/field: I mean on 
each document Class I created this common property (same name, same source): 
this one by example
- Name:P1_DgMoa_req Type: Database List
- XWiki Class Name: FormSMQ.ListeDGClass
- Id Field: Name DGId
- Value Field: Name DGLib

On my WebHome I paste this livetable:

#set ($columnsProperties = {
 'TypeFiche_RO': {type:list,size:10},
 'P1_DgMoa_req': {type:list,size:10},
  'doc.name': {type:text,size:10,link:view},
  'doc.date': {type:text,size:10},
  'doc.creator': {type:text,size:10,link:creator},
  '_actions': 
{sortable:false,filterable:false,html:true,actions:[edit]}
})
#set ($options = {
  'className': 'MySpace.MyClass',
  'translationPrefix' : 'FormSMQ.livetable.',
  'tagCloud': true,
  'rowCount': 15,
  'maxPages': 10,
  'selectedColumn': 'doc.name',
  'defaultOrder': 'asc',
  'extraParams': space=${doc.space}
})

With one class ( 'className': 'MySpace.MyClass',) my livetable work perfectly 
but display only documents 'linked' with this class (doc with 'MySpace.MyClass' 
object)
If I use 'className': ''  (empty), livetable show all document on the space but 
my select list are not filled.
I tried  'TypeFiche_RO': {type:list,size:10,'class': 'MySpace.MyClass' } 
with empty 'classname', but if I select a value in my select list, only  
document 'linked' with this class are displayed.
I tried topFilters  options (HTML fragment that will be placed in a top 
filter area in the same fashion as the Tag Cloud filter) 'topFilters': 'input 
type=text size=15 name=doc.name value=', but no document will 
displayed. I didn't managed either (I don't know how to choose the field who is 
filtered by the new input tag)

I don't know if someone understand my problem ( livetable with multiple class 
source), but every magics tricks are welcome to help me.

Thxs.

Pascal B



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


[xwiki-users] Fw : livetable with multiple class?

2015-03-27 Thread Pascal BASTIEN


--- En date de : Ven 27.3.15, Pascal BASTIEN pbasnews-xw...@yahoo.fr a écrit :

 De: Pascal BASTIEN pbasnews-xw...@yahoo.fr
 Objet: [xwiki-users]  livetable with multiple class?
 À: XWiki Users users@xwiki.org
 Date: Vendredi 27 mars 2015, 14h19
 If I understand documentation, to use
 Livetable with multiple Class (with 3 or 4 common
 properties: same name) I must use 
 Parameter $options:
 resultPage    The full name of the page to
 use as a JSON data provider for the table. This option
 allows to use a different data source than the default one
 (XWiki.LiveTableResults) for specific needs not handled by
 LiveTableResults (for example: complex cross-classes
 queries, external data retrieved with a groovy script,
 etc.).
 
...
 Can I do it with query in one (or two) shots or I must use a
 foreach loop to rendering my JSON data?

I found my query, something like this:
#set($hql = select obj.name, prop.value from BaseObject obj, StringProperty 
prop where ( obj.className='FormSMQ.EAClass' or 
obj.className='FormSMQ.PiacJ2Class' ) and prop.id.id=obj.id and 
prop.name='TypeFiche_RO')

Now I need the JSON format of my JSON data provider (resultPage parameter: full 
name of the page to use as a JSON data provider for the table)


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


[xwiki-users] Fight with ActivityStreamPluginApi

2015-03-24 Thread Pascal BASTIEN
Hello,

A user want to rename lot of page in Xwiki and I don't want this op displayed 
on WebHome Activity Stream.

Then, I found these API to use:

http://tiny.cc/2fb0vx
public void deleteActivityEvent(ActivityEvent event)
Delete the passed event form the database.
and
http://tiny.cc/gkb0vx
public ListActivityEvent getEventsForUser(String streamName,
   String user,
   boolean filter,
   int nb,
   int start)
 throws ActivityStreamException
Return the latest events recorded for the given stream name and the given user.

Unfortunaly, my code return only old activity events (probably some old events 
before my Xwiki upgrade ... I guess?). I obtain this
XWiki.MyUser - 2014/09/24 13:27 - 2014-09-24 13:27:44.0 - update - 20
MySpace.MyPage - 2014/09/22 17:14 - 2014-09-22 17:14:17.0 - deleteAttachment - 
20
BacASable.Tableau filtré - 2014/09/19 15:37 - 2014-09-19 15:37:31.0 - update - 
20

Here my code:
{{velocity}}
#set ($MonStream=$xwiki.activitystream.getStreamName(Encyclopédie))
#foreach ($MonEvent in $xwiki.activitystream.getEventsForUser($MonStream, 
XWiki.christianchambon, false, 1500, 0))
1. $MonEvent.getPage() - $MonEvent.getDisplayDate() - $MonEvent.getDate() - 
$MonEvent.getType() - $MonEvent.getPriority()
#end
{{/velocity}}

With this, it is the same thing :#foreach ($MonEvent in 
$xwiki.activitystream.getEventsForUser(XWiki.christianchambon, false, 1500, 
0)): only old events :-(

Activity stream working well on my Xwiki WebHome

Thxs for any helps

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


[xwiki-users] Fw : Re: Fight with ActivityStreamPluginApi

2015-03-24 Thread Pascal BASTIEN

  Do you mean $xwiki.activitystream. API is
 broken?
 
 I don't
 remember talking about the activity stream API :) I

probably because you didn't talk about it :-))

 don't
 really know it well enough to give
 advices on it.

Finally, I used another method who's working like I want:

{{velocity}}
#set ($MonStream=$xwiki.activitystream.getStreamName(Sandbox))
##foreach ($MonEvent in $xwiki.activitystream.getEventsForUser(XWiki.Admin, 
false, 1500, 0))
#foreach ($MonEvent in $xwiki.activitystream.getEvents($MonStream, false, 1500, 
0))
1. $MonEvent.getPage() - $MonEvent.getDisplayDate() - $MonEvent.getDate() - 
$MonEvent.getType() - $MonEvent.getPriority()
  #if ($MonEvent.getPage() == Sandbox.test3)
* Je supprime l'event
 $xwiki.activitystream.deleteActivityEvent($MonEvent)
  #end
#end



{{/velocity}}

Like I chatted with Vincent I know groovy is powerfull (except the fact that 
With great power comes great responsibility ;-) ), full example application 
in groovy missing (because required PR) and templates contains tons of nice 
velocity code. :-)

Thxs for your help / works :-)


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


[xwiki-users] Fw : Fw : Re: ajax example

2015-03-24 Thread Pascal BASTIEN

  For step 1: Don't print
  the JSON directly. You'll have escaping
  issues. In order to ensure the generated JSON
  is valid you should
  build the JSON in memory
  (using Velocity/Java maps, arrays and basic
  types) and then serialize it:
  
  $jsontool.serialize({
    greeting: Hello,
    location: World
  })
 
 I agree but one* purpose was to use  Vincent example on
 this page: http://extensions.xwiki.org/xwiki/bin/view/Extension/Output+JSON
 Perhaps we (who?) need to modify both pages?

Anyway, do you prefer this code?

{{velocity wiki=false}}
## If AJAX call
#if($!request.outputSyntax != '')
  $response.setContentType('application/json')
#end
#set($MyJsonData = {'greeting': 'Hello', 'location': 'World'})
$jsontool.serialize($MyJsonData)

{{/velocity}}


 
 
  
  For step 4:
  Don't hard-code the page URL and use the 'get'
  action
  instead of 'view' to avoid
  adding view statistics entries.
  
  var url = new
  XWiki.Document('JsonHello',
  'Sandbox').getURL('get');
 
 Thxs I was too lazy to take too long time to find JS
 function. :-)
 
  
  Also, to avoid the need to
  URL-encode the request parameters you
  should
  pass them using an object not a string.
  
  var params = {
   
  'xpage': 'plain',
   
  'outputSyntax': 'plain'
  };
  $.get(url, params,
  function(data) {
    ...
  });
 
 Yes thxs you
 = I uploaded/update my page
 
 (The worst is that I hate JS) :-)
 
 
 
 Pascal B
 
  
  Hope this
  helps,
  Marius
  
  
  On Fri, Mar 20, 2015 at 8:26 PM, Pascal BASTIEN
  pbasnews-xw...@yahoo.fr
  wrote:
   Hello,
  
   Here, I provided an simple Ajax example to
  use in xwiki application:
   http://extensions.xwiki.org/xwiki/bin/view/Extension/AJAX+example#Attachments
   This mail on this list to validate that
  what I wrote is the best way (like suggest Vincent)
  
   Thxs.
  
   Pascal
  BASTIEN
  
  
  ___
   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] Need help with xwiki search engine

2015-03-26 Thread Pascal BASTIEN
Hello

I created an application:
- my Class EAClass contain a field DG MOA * : (P1_DgMoa: Database List) 
Display Type: select
Sort: Id
XWiki Class Name: FormSMQ.ListeDGClass
Id Field Name: DGId
Value Field Name: DGLib

My Class (source of select list) FormSMQ.ListeDGClass have 2 fields:
DG Id (DGId: String): contain l'Id of my list
DG Lib (DGLib: String): contain lib (pretty name like) who is displayed on my 
list select.
My data are:
DGId:20_dgaln / DGLib: DGALN
DGId:25_dgec / DGLib: DGEC
DGId:30_dgitm / DGLib: DGITM
...

Everything going well:
-all pages based on  EAClass displayed Lib Value in view mode and in edit mode 
too (the id value is stored in the page)...

Except for search engine: I have some problems:
- search page searching only Id value and not lib value (of course because it 
is the id value that is stored in EAClass object)
i.e. I found pages, if I search 25_dgec but not if I search DGEC
- Result search page displayed property name (and not the pretty name) FAQ 
have same issue.
- my solr facet displayed my id value too.

Do you know how can I fix this issue (if someone understand my problem ;-) )?
Here I paste a nice screenchot: http://snag.gy/Joa7q.jpg

Thanks.

Pascal B




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


Re: [xwiki-users] How to get XWiki Class Name with velocity/xwiki API ?

2015-04-03 Thread Pascal BASTIEN
Finally, I found this nice snippet:
http://extensions.xwiki.org/xwiki/bin/view/Extension/Display+Static+List+Elements
to obtain all values from my Database List properties. :-)


En date de : Jeu 2.4.15, Pascal BASTIEN pbasnews-xw...@yahoo.fr a écrit :

 Objet: [xwiki-users] How to get XWiki Class Name with velocity/xwiki API 
?
 À: XWiki Users users@xwiki.org
 Date: Jeudi 2 avril 2015, 18h42
 
 Hello,
 
 I have a Class with multiple properties. In my velocity
 script I can loop over all properties to get their name and
 pretty name.
 I have some properties with Database List type and I want
 to get:
 - especially XWiki Class Name
 - Id Field Name 
 - and Value Field Name 
 Is it possible?
 I didn't found documentation section.
 
 Thxs
 Pascal BASTIEN
 
 ___
 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] A way to add some tags on saved page with class

2015-04-03 Thread Pascal BASTIEN
Finally I added some CSS Id on my inline form (in my Sheet) and getProperty 
value with JS and document.observe(xwiki:actions:save).
I call my   TagUpdater Page with AJAX
var request=$.ajax({method: POST,
  url: Url,
  data: UrlParams,
  dataType: html,
  async: false});
My Ajax requests are sent synchronous if not sometimes my page is recorded 
before Tag added, and sometimes not, ...
I know it is ugly way but I haven't choice.

(Anyway, I will schedule some batch to fix my tags)


En date de : Jeu 2.4.15, Pascal BASTIEN pbasnews-xw...@yahoo.fr a écrit :

 Objet: [xwiki-users] A way to add some tags on saved page with class
 À: XWiki Users users@xwiki.org
 Date: Jeudi 2 avril 2015, 15h51
 
 Hello,
 
 I'm looking for advice about a way to add some tags on saved
 page with class.
 What I have:
 - a sheet page with an object Class ( with an object class +
 properties) + a template page
 - a velocity code in a page AddMyTag to add some tags
 on  some page with this URL parameters:
 $!request.PageSource, $!request.ClassName
 
 What I'm trying to do, is: when a user save a page, a tag is
 added. The tag to add is coming from a properties value
 (last character on property name is _Tag).
 If I call my 'AddMyTag' page, tags are correctly added on
 PageSource.
 
 To resume:
 - the user save HisPage
 - HisPage add tags from a properties value (name xxx_Tag) 
 
 My problem is how can I launch automaticelly my 'AddMyTag'
 page when a user record PageSource?
 I tried with Ajax with
 document.observe(xwiki:actions:save, function(event){ 
(http://platform.xwiki.org/xwiki/bin/view/DevGuide/JavaScriptAPI#HActionevents28actionButtons.js29)
 but the problem is: sometime  xxx_Tag property value is
 updated after my AJAX call (and the old tag is attached on
 page).
 
 A the moment, I'm looking for another way, I read 
http://extensions.xwiki.org/xwiki/bin/view/Extension/WikiComponent+Module
 But documentation indicate: The goal is to listen ...
 DocumentUpdatingEvent events (note that these events are
 fired before the page is saved and thus our code doesn't
 need to perform the save itself ...
 Then I can not use this method either because I must add tag
 from new value from my _Tag properties.
 
 How can I launch a velocity script on a document after
 document is saved (to add some tag from the document
 itself)?
 
 Thxs for any help
 
 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


[xwiki-users] Fw : Re: A way to add some tags on saved page with class

2015-04-03 Thread Pascal BASTIEN

 
  A the
 moment, I'm looking for another way, I read 
 http://extensions.xwiki.org/xwiki/bin/view/Extension/WikiComponent+Module
  But documentation indicate: The goal
 is to listen ... DocumentUpdatingEvent events (note that
 these events are fired before the page is saved and thus our
 code doesn't need to perform the save itself
 ...
 
  Then I can
 not use this method either because I must add tag from new
 value from my _Tag properties.
 
 It doesn't say the document doesn't
 have the changes. But that the
 event is
 fired before the changes are saved. So if you listen to
 this
 event you should be able to get the new
 property value and add the
 tag. Just
 don't call save() in the event handled because this is
 done
 automatically after the event is passed
 to all handlers (including
 yours).

Ok thxs.
Then I must try this method, I must found the way to execute my velocity script 
to add/remove some tags (all is ready, I need to pass this parameter on my 
velocity code:
$request.PageSourceTo applyMyTag (and eventually) 
$!request.MyClassAttachedOnMyPage
but I'm affraid than there will be some conflict (or loop) because my velocity 
script use $xwiki.tag.addTagToDocument(String tag, String documentName) : this 
method save document...
Why I don't use full groovy script? Because I know API xwiki with velocity only 
 (it is simple and groovy doc missing)
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] A way to add some tags on saved page with class

2015-04-03 Thread Pascal BASTIEN
FI with JS  document.observe(xwiki:actions:save). method my script doesn't 
work well...
When I save and close my page: my tag is added OR my field are update OR the 
script going well OR I obtain a nice error message:
Information détaillée:

Error number 3201 in 3: Exception while saving document 
xwiki:FormSMQ.SMQ-P3-FPIAC-Jolie Fiche
com.xpn.xwiki.XWikiException: Error number 3201 in 3: Exception while saving 
document xwiki:FormSMQ.SMQ-P3-FPIAC-Jolie Fiche
at 
com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:780)
at 
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:178)
at 
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:171)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.hibernate.HibernateException: Failed to commit or rollback 
transaction. Root cause []
at 
com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:1022)
at 
com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:770)
... 69 more
Caused by: org.hibernate.StaleStateException: Batch update returned unexpected 
row count from update [1]; actual row count: 0; expected: 1
at 
org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:85)
at 
org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:70)



En date de : Ven 3.4.15, Pascal BASTIEN pbasnews-xw...@yahoo.fr a écrit :

 Objet: Re : [xwiki-users] A way to add some tags on saved page with class
 À: XWiki Users users@xwiki.org
 Date: Vendredi 3 avril 2015, 11h00
 
 Finally I added some CSS
 Id on my inline form (in my Sheet) and getProperty value
 with JS and
 document.observe(xwiki:actions:save).
 I call my   TagUpdater Page with
 AJAX
     var request=$.ajax({method:
 POST,
                  
         url: Url,
              
             data: UrlParams,
      
                     dataType: html,
                           async:
 false});
 My Ajax requests are sent
 synchronous if not sometimes my page is recorded before Tag
 added, and sometimes not, ...
 I know it is
 ugly way but I haven't choice.
 
 (Anyway, I will schedule some batch to fix my
 tags)
 
 
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Fw : Re: Question about Page type property (and an issue) in a Class (resolved)

2015-04-21 Thread Pascal BASTIEN
FYI, feel free to correct it, modify it, addon it, laughthing about it, etc... 
: 
http://www.xwiki.org/xwiki/bin/view/FAQ/Which+variables+I+can+use+in+%22Custom+Display%22+field
:-)
Thxs again.
Pascal B
  De : Pascal BASTIEN pbasnews-xw...@yahoo.fr
 À : Marius Dumitru Florea mariusdumitru.flo...@xwiki.com 
Cc : XWiki Users users@xwiki.org 
 Envoyé le : Vendredi 17 avril 2015 17h53
 Objet : Fw : Re: [xwiki-users] Question about Page type property (and an 
issue) in a Class (resolved)
   

  I create MyClass/Sheet/Template and in
 another AnotherClass I add a Page type property with:
  - Display Type : select
  - XWiki Class Name: MyClass
  - Id Field Name: doc.fullName
  - Value Field Name : doc.name
 
  My purpose is to
 display a list of page (with MyClass object): this point is
 working well but ...
 
 
  I want that the user
 select in my select list: one page OR nothing.
 
...

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


Re: [xwiki-users] DBList and Custom Display

2015-04-22 Thread Pascal BASTIEN
Great you can test my new FAQ:  
http://www.xwiki.org/xwiki/bin/view/FAQ/Which+variables+I+can+use+in+%22Custom+Display%22+field
   :-)
Pascal B
  De : Peter Huisman p.huis...@ximm.nl
 À : users@xwiki.org 
 Envoyé le : Mercredi 22 avril 2015 16h01
 Objet : [xwiki-users] DBList and Custom Display
   


Hi guys,

I have a class containing a property type DBList. The Query is something 
like this:

SELECT idVarProp.value, CONCAT(codeVarProp.value, ' - ', 
naamVarProp.value, ' (', codeProdProp.value, ' - ', naamProdProp.value, 
')')
FROM  etc. etc.

This works fine if I use displayView; the CONCAT value is displayed on 
screen. I now want to use a custom displayer to access this CONCAT part. 
I guess I should have access to some kind of Map value, but I do not 
know how to get to it.

Any ideas or is this not possible at all?

Peter
___
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] Clear them all! :p

2015-04-22 Thread Pascal BASTIEN
Hello,I'm sorry, I'm not agree with you : a powerfull system must hide the 
systems complexity... And it is a wiki : it's mean if there aren't enough 
simple documentation then anybody (high ueser AND normal people with non 
computer vision) must write a page to contribute and make more available for 
simple user. :-)
IMO we can use a simple xwiki and/or use higher  level xwiki and/or a 
customized one. :-)

Pascal B.


  De : Mahomed Hussein maho...@custodiandc.com
 À : Maciej Fokt maciek.f...@taxi123.pl; XWiki Users users@xwiki.org 
 Envoyé le : Mercredi 22 avril 2015 18h37
 Objet : Re: [xwiki-users] Clear them all! :p
   
That's just the way technology is. The more powerful a system is, and the more 
options it has, then the more technical it is. If you want something that's 
easy for no computer people then I'm afraid you need to use something which 
has less features and power. A jumbo jet pilot needs to have more experience 
and knowledge than a Cessna pilot. The jumbo jet has more buttons and features 
and probably cannot be easily or ever flown by a Cessna pilot. That's just the 
way things are.

XWiki actually has VERY good documentation (some of the best I've seen, and 
I've seen a lot of systems). It also has a helpful mailing list. Unfortunately 
it's not XWiki' s fault if you can't understand the documentation or the help 
that you have been offered several times here.

I genuinely hope you manage to find a system that you like and works for you.


Kind regards,

Mahomed




-Original Message-
From: Maciej Fokt [mailto:maciek.f...@taxi123.pl]
Sent: 22 April 2015 17:27
To: XWiki Users; Mahomed Hussein
Subject: Re: [xwiki-users] Clear them all! :p

No way... I have back to the 1.1 version and now i haven't settings...

Why XWiki (good, big and helpful toll) can be so hard for no computer
people...

Thanks all for help, but XWiki is too hard for me, I think.


W dniu .04.2015 o 18:00 Mahomed Hussein maho...@custodiandc.com pisze:

 He has a problem with his install and I believe he wants to reset the
 system so it will be the same as when he installed it for the first
 time. I don't think this is possible without uninstalling, then
 searching and deleting all files/folders related and then installing
 from the beginning.


 Kind regards,




 -Original Message-
 From: users [mailto:users-boun...@xwiki.org] On Behalf Of Ecaterina
 Moraru (Valica)
 Sent: 22 April 2015 16:30
 To: XWiki Users
 Subject: Re: [xwiki-users] Clear them all! :p

 I guess you could revert the WebPreferences history to version 1.1.

 For example, in the Administration you have this URL:
 - xwiki/bin/admin/XWiki/XWikiPreferences
 You could do:
 - xwiki/bin/view/XWiki/XWikiPreferences?viewer=history
 and then on the version 1.1 use Rollback.

 Not sure if this is what you meant.
 Thanks,
 Caty


 On Wed, Apr 22, 2015 at 6:01 PM, Maciej Fokt maciek.f...@taxi123.pl
 wrote:


 Hello,

 Is there option to return to the first contain and settings? I mean, I
 want to clear everything. I would like to back to the settings after
 installation.

 Greetings,
 Maciek.
 ___
 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


[xwiki-users] Fw : RE: Clear them all! :p

2015-04-23 Thread Pascal BASTIEN
Do not get me wrong, I love Xwiki: what I mean it is always possible to make it 
easyer (like distribution wizard by example). Wizard and advanced doc to goes 
further is perfect. :-)

To answer at fisrt problem: a database dump (+ DW launched) will be enough to 
reinit xwiki, no? I don't know if there are one provided in xwiki.org?

(sorry about this mess: it wasn't my goal) :-/


--- En date de : Jeu 23.4.15, Mahomed Hussein maho...@custodiandc.com a écrit 
:

 De: Mahomed Hussein maho...@custodiandc.com

...
 
 Anyway I don’t think this is too constructive for the
 mailing list so I will stop here. You are entitled to your
 opinion and I am to mine (I think XWiki is great). If you
 don't like XWiki then I hope you find something that suits
 you better. That's the beauty of the internet and open
 source. You can always find something that suits you or make
 your own :)
 
...
 
  On Wed, Apr 22, 2015 at 6:01 PM, Maciej Fokt maciek.f...@taxi123.pl
  wrote:
 
 
  Hello,
 
  Is there option to return to the first contain and
 settings? I mean, I
  want to clear everything. I would like to back to
 the settings after
  installation.
 
  Greetings,
  Maciek.

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


Re: [xwiki-users] struggling with encoding

2015-05-06 Thread Pascal BASTIEN
Helle,
May I?

i think it is not a xwiki problem because encoding_vowels.txt file is an 
attachment of a web page (it is like a file on FTP site). Xwiki ( fortunely) 
doesn't change attachment file content.
If I download your file, file command indicate of course: UTF-8 Unicode text, 
with no line terminators
I think it is more a browser problem (chrome doesn't detect UTF8 encoding of 
your file)
If your attachment is a PDF file, it is the same, it depend of browser (if PDF 
reader are included in it or not)
Htttpheader is for web page an not attachment IMO

Pascal B.


En date de : Mer 6.5.15, Marius Dumitru Florea mariusdumitru.flo...@xwiki.com 
a écrit :

 Objet: Re: [xwiki-users] struggling with encoding
 À: XWiki Users users@xwiki.org
 Date: Mercredi 6 mai 2015, 14h34
 
 On Wed, May 6, 2015 at
 2:08 PM, [IDIS Technical Secretariat] Ricardo
 Rodríguez ricardo.rodrig...@idisantiago.es
 wrote:
  Hi!
 
  I've set up a XWiki Enterprise 7.0.1
 installation to use UTF-8 as per...
 
  http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Encoding
 
  In spite of this,
 only Chrome (both in Windows and Mac OS X platforms) is
  able to correctly show the five accented
 vowels contained in an attached
  file
 UTF-8 encoded available here...
 
 
  http://portal.idisantiago.es/xwiki/bin/download/ICT/Encoding/encoding_vowels.txt
 
 If I inspect the HTTP headers
 of the response I see:
 
 Content-Type: text/plain;charset=
 
 I guess it should have been
 
 Content-Type:
 text/plain;charset=utf8
 
 I
 can reproduce with a fresh XWiki 7.1M1 (Jetty+HSQLDB). Can
 you
 report an issue?
 
 Thanks,
 Marius
 
 
 
 Firefox (Windows and Mac OS X), Safari and Omniweb in Mac OS
 X and Internet
  Explorer show them
 wrongly by default as...
 
  http://portal.idisantiago.es/xwiki/bin/download/ICT/Encoding/badRendering.png
 
  I've to manually
 select UTF-8 encoding the read it correctly or select
  UTF-8 as default encoding for the
 browser.
 
  Please,
 is it possible to control the encoding used by a browser to
 display
  an attached text file from
 XWiki server side?
 
 
 Thanks!
 
  Ricardo
 
  --
  Ricardo Rodríguez
 
 Research Management and Promotion Technician
  Technical Secretariat
 
 Health Research Institute of Santiago de Compostela
 (IDIS)
  http://www.idisantiago.es
 
 ___
  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] Need tabs on xwiki application ?

2015-05-06 Thread Pascal BASTIEN
Hello,

Feel free to comment, modify, criticize, playing with, add features, etc...
http://extensions.xwiki.org/xwiki/bin/view/Extension/Application+example+to+display+data+with+bootstrap+tabs+and+tooltips

Every feedback are welcome :-)


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


[xwiki-users] Question about Page type property (and an issue) in a Class

2015-04-15 Thread Pascal BASTIEN
Hello,

I create MyClass/Sheet/Template and in another AnotherClass I add a Page type 
property with:
- Display Type : select
- XWiki Class Name: MyClass
- Id Field Name: doc.fullName
- Value Field Name : doc.name

My purpose is to display a list of page (with MyClass object): this point is 
working well but ...

I want that the user select in my select list: one page OR nothing.

Do you have an idea, how can I do that?

I found a issue too: my select list list all page (with MyClass object) ... 
even my Template with MyClass object who is hidden.

Thxs.

Pascal B (xWiki 6.4)





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


[xwiki-users] Fw : Re: Question about Page type property (and an issue) in a Class

2015-04-16 Thread Pascal BASTIEN
 
  My purpose is to
 display a list of page (with MyClass object): this point is
 working well but ...
 
 
  I want that the user
 select in my select list: one page OR nothing.
 
 The HTML select element
 supports either single selection (exactly one
 item selected) or multiple selection (0..*). To
 achieve 0..1 you need
 to have a special item
 Nothing with value '' (empty string) and
 in
 order to add this item to a Page
 (actually DatabaseList) property you
 have to
 write a custom displayer. Another solution may be to create
 a
 special page with a MyClass object that
 represents the nothing value
 (when selected), but you still need to hack
 something in order to have
 this option
 displayed first.
 

Yes thxs I though about custom display field.
Then I can use a String type with custom display or perhaps with database 
list+custom display  I can catch HTML rendering of select list  to add my 
empty option value line...
Anyway Do you know where is source code of Page type to improve it (IMA view 
mode must display a link to the target)?

 
  Do you have an idea, how can I do that?
 
 
  I
 found a issue too: my select list list all page (with
 MyClass object) ... even my Template with MyClass object who
 is hidden.
 
 Does it behave
 the same with a DatabaseList property? The Page
 property is nothing more than a wrapper for the
 DatabaseList property.

Yes it is the same: I just tested. hidden filter is not applied (of course I 
checked that user preference is don't show hidden doc)
Do you know where is query to check it?


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


[xwiki-users] Fw : Re: Fw : Re: Question about Page type property (and an issue) in a Class

2015-04-16 Thread Pascal BASTIEN

 Anyway Do you know where is source code of Page type to
 improve it (IMA view mode must display a link to the
 target)?
 
 https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/objects/classes/PageClass.java
 https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/objects/meta/PageMetaClass.java
 
 but I would rather create a
 default custom displayer,
 http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWikiEnterprise42M2#HDefaultcustomdisplayersforEasiercustomizationofthewayobjectfieldsaredisplayed
Yes maybe I must understand this way (I must think if I must use java stuff or 
not)
Ok thxs (it's a shame it is not on developper doc). The same about catch an 
error on velocity code: it is hiding in a Release note


  found a issue too: my select list list
 all page (with
  MyClass object) ...
 even my Template with MyClass object who
  is hidden.
 
  Does it behave
  the same with a DatabaseList property?
 The Page
  property is nothing more
 than a wrapper for the
  DatabaseList
 property.
 
  Yes it
 is the same: I just tested. hidden filter is not applied (of
 course I checked that user preference is don't
 show hidden doc)
  Do you know
 where is query to check it?
 
 https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/objects/classes/DBListClass.java

Here you are: http://jira.xwiki.org/browse/XWIKI-12031
(it is java code: not for me :-) )

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


Re: [xwiki-users] A way to add some tags on saved page with class

2015-04-03 Thread Pascal BASTIEN
How silly am I!
I was dealing with the problem in the wrong way.
Instead to add some tag on saving page, some piece of velocity code in my Sheet 
(in view mode) must doing the right thinks...
(I will paste the code when I finish it)

(Anyway my batch working :-/)


En date de : Ven 3.4.15, Pascal BASTIEN pbasnews-xw...@yahoo.fr a écrit :

 Objet: Re: [xwiki-users] A way to add some tags on saved page with class
 À: XWiki Users users@xwiki.org
 Date: Vendredi 3 avril 2015, 15h45
 
 FI with JS 
 document.observe(xwiki:actions:save). method my
 script doesn't work well...
 When I save
 and close my page: my tag is added OR my field are update OR
 the script going well OR I obtain a nice error message:
 Information détaillée:
 
     Error number 3201 in 3: Exception while
 saving document xwiki:FormSMQ.SMQ-P3-FPIAC-Jolie Fiche
 com.xpn.xwiki.XWikiException: Error number 3201
 in 3: Exception while saving document
 xwiki:FormSMQ.SMQ-P3-FPIAC-Jolie Fiche
 
 
 
 En date de : Ven 3.4.15, Pascal BASTIEN pbasnews-xw...@yahoo.fr
 a écrit :
 
  Objet: Re :
 [xwiki-users] A way to add some tags on saved page with
 class
  À: XWiki Users users@xwiki.org
 
 Date: Vendredi 3 avril 2015, 11h00
  
  Finally I added some CSS
  Id
 on my inline form (in my Sheet) and getProperty value
  with JS and
 
 document.observe(xwiki:actions:save).
  I call my   TagUpdater Page with
  AJAX
      var
 request=$.ajax({method:
 
 POST,
                 
  
          url: Url,
 
              
             
 data: UrlParams,
       
 
                     dataType: html,
                           
 async:
  false});
  My Ajax
 requests are sent
  synchronous if not
 sometimes my page is recorded before Tag
 
 added, and sometimes not, ...
  I know it
 is
  ugly way but I haven't choice.
  
  (Anyway, I will schedule
 some batch to fix my
  tags)
 
 
  
 ___
 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] A way to add some tags on saved page with class (resolved)

2015-04-06 Thread Pascal BASTIEN
Here my working well :-) code to add a tag from a property ( database list) of 
my Class attached on my doc :
          ## Début section pour checker les tags
          ## Si champ x_CssTag alors rajout du tag et/ou suppression des 
anciens tags 
        #if (($xcontext.action == 'view')  
($prop.Name.endsWith(_$!{SufxTag})=='true'))
          #set ($NouveauTag=$doc.getValue($prop.Name))
          #if ($!NouveauTag!='')
            ## Array de tous les tags du document
            #set ($TagsInMyDoc=$xwiki.tag.getTagsFromDocument($doc))
            ## si tag n'est pas vide et n'est pas un tag du doc alors check des 
tags
            #if ($listtool.contains($TagsInMyDoc, $!NouveauTag)==false)
          ## Récup de toutes les valeurs de la liste
          #set($list = $class.get($prop.Name).getListValues())
  ## $list $class.getName() $prop.Name
          #foreach($ATagFromClass in $list)
            ## * value: $ATagFromClass displayed
            ##Enlève tous les tags de la liste dans la page
            ## $ATagFromClass
            ## *** $listtool.isList($TagsInMyDoc) : $ATagFromClass est dans 
la liste: $TagsInMyDoc
            ##  $listtool.contains($TagsInMyDoc, $ATagFromClass)
            ## efface les anciens tags si présents
            #if ($listtool.contains($TagsInMyDoc, $ATagFromClass)==true)
          #if ($!ATagFromClass!=$!NouveauTag)
            #set 
($discard=$xwiki.tag.removeTagFromDocument($ATagFromClass, $doc))
            ## = je supprime le tag $ATagFromClass =
          #end
            #elseif ($!ATagFromClass==$!NouveauTag)
          ## =  j'ajoute le tag $NouveauTag sur $doc =
          ## Ajoute le nouveau Tag
          #set ($discard=$xwiki.tag.addTagToDocument($NouveauTag, $doc))
            #end
          #end
          ## Fin à insérer
            #end
        ##     #set($ClassTag=$ClassName)
          #end
        #end


  De : Pascal BASTIEN pbasnews-xw...@yahoo.fr
 À : XWiki Users users@xwiki.org 
 Envoyé le : Samedi 4 avril 2015 0h11
 Objet : Re: [xwiki-users] A way to add some tags on saved page with class
   
How silly am I!
I was dealing with the problem in the wrong way.
Instead to add some tag on saving page, some piece of velocity code in my Sheet 
(in view mode) must doing the right thinks...
(I will paste the code when I finish it)

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


[xwiki-users] A way to add some tags on saved page with class

2015-04-02 Thread Pascal BASTIEN
Hello,

I'm looking for advice about a way to add some tags on saved page with class.
What I have:
- a sheet page with an object Class ( with an object class + properties) + a 
template page
- a velocity code in a page AddMyTag to add some tags on  some page with this 
URL parameters:
$!request.PageSource, $!request.ClassName

What I'm trying to do, is: when a user save a page, a tag is added. The tag to 
add is coming from a properties value (last character on property name is _Tag).
If I call my 'AddMyTag' page, tags are correctly added on PageSource.

To resume:
- the user save HisPage
- HisPage add tags from a properties value (name xxx_Tag) 

My problem is how can I launch automaticelly my 'AddMyTag' page when a user 
record PageSource?
I tried with Ajax with
document.observe(xwiki:actions:save, function(event){ 
(http://platform.xwiki.org/xwiki/bin/view/DevGuide/JavaScriptAPI#HActionevents28actionButtons.js29)
 but the problem is: sometime  xxx_Tag property value is updated after my AJAX 
call (and the old tag is attached on page).

A the moment, I'm looking for another way, I read 
http://extensions.xwiki.org/xwiki/bin/view/Extension/WikiComponent+Module
But documentation indicate: The goal is to listen ... DocumentUpdatingEvent 
events (note that these events are fired before the page is saved and thus our 
code doesn't need to perform the save itself ...
Then I can not use this method either because I must add tag from new value 
from my _Tag properties.

How can I launch a velocity script on a document after document is saved (to 
add some tag from the document itself)?

Thxs for any help

Pascal B




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


[xwiki-users] Fw : Re: Need help with xwiki search engine

2015-04-03 Thread Pascal BASTIEN

 
  -
 search page searching only Id value and not lib
 value (of course because it is the id value that is stored
 in EAClass object)
  i.e. I found pages,
 if I search 25_dgec but not if I search
 DGEC
 
 Yes, this
 is 'normal' because ATM only the raw value (id) is
 indexed
 for Database List properties.
 
  - Result search
 page displayed property name (and not the pretty name)
 FAQ have same issue.
  - my solr facet
 displayed my id value too.
 
  Do you know how can I fix this issue (if
 someone understand my problem ;-) )?
 
  Here I paste a nice screenchot: http://snag.gy/Joa7q.jpg
 
 ATM there's no solution
 for the search results highlights. The
 property name displayed there is part of the
 highlight (the matched
 text) and it cannot
 be parsed (if the property value is large enough
 and the match is somewhere at the end then the
 property name is not
 even included in the
 match).
 

To resolve the problem I use lib column to display correct value (and not the 
id)

 Regarding the raw
 value (id) displayed in the facet, you can write a
 custom facet that displays the label
 corresponding to the raw value.
 
Yes I manage to did this solution, but I was confronted at multi class problem 
(again)

Thxs anyway, I store pretty name in my Page with Class.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Fw : Re: Fw : livetable with multiple class?

2015-04-03 Thread Pascal BASTIEN

  I found my
 query, something like this:
  #set($hql =
 select obj.name, prop.value from BaseObject obj,
 StringProperty prop where (
 obj.className='FormSMQ.EAClass' or
 obj.className='FormSMQ.PiacJ2Class' ) and
 prop.id.id=obj.id and
 prop.name='TypeFiche_RO')
 
 
  Now
 I need the JSON format of my JSON data provider (resultPage
 parameter: full name of the page to use as a JSON data
 provider for the table)
 
 You
 can use 
 https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-linkchecker/xwiki-platform-linkchecker-ui/src/main/resources/XWiki/ExternalLinksJSON.xml
 as an example of a custom results page.

Thanks, I will give a try.
With ResultPage, I wonder if I could use select list of livetable.

Thanks you VERY much to make my week-end busy ;-)
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Fw : Re: Content

2015-06-01 Thread Pascal BASTIEN

 
 My problem is probably rare :p I would like to
 add as attachment .csr file, I mean Java certificate so...
 when I click I see many numbers and words. I need window
 with button Download.

Hello,
It is a not a xwiki specific problem i think.
Maybe you should use one on this way:
http://www.tipsandtricks-hq.com/forum/topic/force-a-file-to-download-instead-of-showing-up-in-the-browser

Pascal B

 
 
 Sorry you’re still not being clear for me. I
 can’t help you if I don’t understand what you need :)
 
 Maybe someone else
 understands?

Yes I think I understood :-)

 
 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


[xwiki-users] Fw : Re: Need help with velocity+json (resolved)

2015-07-28 Thread Pascal BASTIEN
After one fastidious debuging day ;-)) , here some snippet to edit map with 
velocity with put and/or velocity variable (with space character):

#set ($MyArray1={})
* $jsontool.serialize($MyArray1)
#set ($indexNiv1='Index 2')
##set ($discard=$MyArray1.put('Index2',{}))
#set ($MyArray1[$indexNiv1]={})
* $jsontool.serialize($MyArray1)
##set ($discard=$MyArray2.put('Index2',{'Field1':'Addon value'}))
#set ($field1='Field 1')
##set ($discard=$MyArray1.put($indexNiv1,{$field1:'Addon value'}))
#set ($MyArray1[$indexNiv1][$field1]='Addon value')
* $jsontool.serialize($MyArray1)
#set ($field2=Field 2)
##set ($discard=$MyArray1[$indexNiv1].put($field2,'Another value'))
#set ($MyArray1[$indexNiv1][$field2]='Another value')
* $jsontool.serialize($MyArray1)
#set ($discard=$MyArray1.put('Index 2',{'Field1':'Addon value','field 
2':'Another addon value'}))
* Values in one shot:  $jsontool.serialize($MyArray1)
$MyArray1.keySet()


--- En date de : Lun 27.7.15, Pascal BASTIEN pbasnews-xw...@yahoo.fr a écrit :

 De: Pascal BASTIEN pbasnews-xw...@yahoo.fr
 Objet: Re: [xwiki-users] Need help with velocity+json
 À: XWiki Users users@xwiki.org, Marius Dumitru Florea 
 mariusdumitru.flo...@xwiki.com
 Date: Lundi 27 juillet 2015, 15h48
 By the way, are there a
 xwiki tricks to pass a variable from velocity to
 javascript ?
 
 Anyways, this
 way working well (replace MyArray by MyMap ;-) ) :
 
 {{velocity}}
 {{html}}
 #set ($MyArray={
  
 'Index1':{'Field1':'value1','field2':'value2'},
   'Index3':{'Field1':'A
 value','field2':'Another value'}
 })
  script
 type=text/javascript
    var
 MaVariable=$jsontool.serialize($MyArray);
 
 /script
 {{/html}}
 {{/velocity}}
 
 And in my XWiki.JavaScriptExtension object:
 
 function change_value(bouton,
 idTarget) {
    
 require(['jquery'], function ($) {
     // x
     var obj
 = MaVariable;
    
 alert(obj[Index2][field2]);
 
     });
 };
 
 
 En date de : Lun 27.7.15, Pascal BASTIEN
 pbasnews-xw...@yahoo.fr
 a écrit :
 
  Objet: Re:
 [xwiki-users] Need help with velocity+json
 
 À: XWiki Users users@xwiki.org,
 Marius Dumitru Florea mariusdumitru.flo...@xwiki.com
 
 Date: Lundi 27 juillet 2015, 12h01
  
  Thxs a lot:
  put
 is my new friend :-)
  
  Here
 the answer:
  #set
 
 ($MyArray={
   
 
 'Index1':{'Field1':'value1','field2':'value2'},
   
 'Index3':{'Field1':'A
 
 value','field2':'Another value'}
  })
 
 $MyArray.getClass().getName()
  *
  Original map
 
 $jsontool.serialize($MyArray)
  *
  I Modify the 'Index3' entrie:
  #set
 
 ($discard=$MyArray.put('Index3',{'Field1':'A
  modified
 value','field2':'Another modified
  value'}))
 
 $jsontool.serialize($MyArray)
  *
  I add the 'Index2' entrie:
  #set
 
 ($discard=$MyArray.put('Index2',{'Field1':'Addon
  value','field2':'Another
 addon
  value'}))
 
 $jsontool.serialize($MyArray)
  
 ___
 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] Need help with velocity+json

2015-07-27 Thread Pascal BASTIEN
By the way, are there a xwiki tricks to pass a variable from velocity to 
javascript ?

Anyways, this way working well (replace MyArray by MyMap ;-) ) :

{{velocity}}
{{html}}
#set ($MyArray={
  'Index1':{'Field1':'value1','field2':'value2'},
  'Index3':{'Field1':'A value','field2':'Another value'}
})
 script type=text/javascript
   var MaVariable=$jsontool.serialize($MyArray);
 /script
{{/html}}
{{/velocity}}

And in my XWiki.JavaScriptExtension object:

function change_value(bouton, idTarget) {
require(['jquery'], function ($) {
// x
var obj = MaVariable;
alert(obj[Index2][field2]);

});
};


En date de : Lun 27.7.15, Pascal BASTIEN pbasnews-xw...@yahoo.fr a écrit :

 Objet: Re: [xwiki-users] Need help with velocity+json
 À: XWiki Users users@xwiki.org, Marius Dumitru Florea 
mariusdumitru.flo...@xwiki.com
 Date: Lundi 27 juillet 2015, 12h01
 
 Thxs a lot:
 put is my new friend :-)
 
 Here the answer:
 #set
 ($MyArray={
  
 'Index1':{'Field1':'value1','field2':'value2'},
   'Index3':{'Field1':'A
 value','field2':'Another value'}
 })
 $MyArray.getClass().getName()
 *
 Original map
 $jsontool.serialize($MyArray)
 *
 I Modify the 'Index3' entrie:
 #set
 ($discard=$MyArray.put('Index3',{'Field1':'A
 modified value','field2':'Another modified
 value'}))
 $jsontool.serialize($MyArray)
 *
 I add the 'Index2' entrie:
 #set
 ($discard=$MyArray.put('Index2',{'Field1':'Addon
 value','field2':'Another addon
 value'}))
 $jsontool.serialize($MyArray)
 
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Need help with velocity+json

2015-07-27 Thread Pascal BASTIEN
Thxs a lot: put is my new friend :-)

Here the answer:
#set ($MyArray={
  'Index1':{'Field1':'value1','field2':'value2'},
  'Index3':{'Field1':'A value','field2':'Another value'}
})
$MyArray.getClass().getName()
* Original map
$jsontool.serialize($MyArray)
* I Modify the 'Index3' entrie:
#set ($discard=$MyArray.put('Index3',{'Field1':'A modified 
value','field2':'Another modified value'}))
$jsontool.serialize($MyArray)
* I add the 'Index2' entrie:
#set ($discard=$MyArray.put('Index2',{'Field1':'Addon value','field2':'Another 
addon value'}))
$jsontool.serialize($MyArray)


En date de : Lun 27.7.15, Marius Dumitru Florea 
mariusdumitru.flo...@xwiki.com a écrit :

 Objet: Re: [xwiki-users] Need help with velocity+json
 À: Pascal BASTIEN pbasnews-xw...@yahoo.fr, XWiki Users users@xwiki.org
 Date: Lundi 27 juillet 2015, 10h47
 
 Hi Pascal,
 
 On Mon, Jul 27, 2015 at 11:42
 AM, Pascal BASTIEN
 pbasnews-xw...@yahoo.fr
 wrote:
  Hello,
 
  My goal is to send array json variable
 from velocity to javacript or more precisely I want loop
 over all objects of same Class of a page and put them in a
 json array 
(http://platform.xwiki.org/xwiki/bin/view/DevGuide/APIGuide#HAccessobjectsfromanypageandloopoverallobjectsofsameClass)
 
  But I didn't
 manage to edit an velocity array variable (add an entries or
 modify one) AND
 
 
 With velocity I declare my array like this:
 
 
  #set
 ($MyArray={
    'Index1':{'Field1':'value1','field2':'value2'},
    'Index3':{'Field1':'A
 value','field2':'Another value'}
  })
 
 This
 is not an array but a Map
 http://docs.oracle.com/javase/7/docs/api/java/util/Map.html
 , which is
 quite different. In any case,
 when you're not sure about the type of a
 Velocity variable you should print
 $myVar.getClass().getName() to see
 the real
 Java type and then you should check the Javadoc for that
 type
 to see what methods you can call on the
 variable.
 
 I'll let you
 discover how to modify a Java map object.
 
 Hope this helps,
 Marius
 
 
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Need help with velocity+json

2015-07-27 Thread Pascal BASTIEN
Hello,

My goal is to send array json variable from velocity to javacript or more 
precisely I want loop over all objects of same Class of a page and put them in 
a json array 
(http://platform.xwiki.org/xwiki/bin/view/DevGuide/APIGuide#HAccessobjectsfromanypageandloopoverallobjectsofsameClass)

But I didn't manage to edit an velocity array variable (add an entries or 
modify one) AND

With velocity I declare my array like this:

#set ($MyArray={
  'Index1':{'Field1':'value1','field2':'value2'},
  'Index3':{'Field1':'A value','field2':'Another value'}
})

How can I add an Index2 entrie by example:

'Index2':{'Field1':'A new value','field2':'Another new value'}

and/or can how can I modify a value ('Index 1'.field2' by example)?

I tried to generate arraw velocity variable from a string like this,

but unfortunaly generate a unique ... string :-(

Here my code:

{{velocity}}

#set ($MyArray={
  'Index1':{'Field1':'value1','field2':'value2'},
  'Index3':{'Field1':'A value','field2':'Another value'}
})
$jsontool.serialize($MyArray)

Correct json arraw but I can NOT edit it :-(
{Index1:{Field1:value1,field2:value2},Index3:{Field1:A 
value,field2:Another value}}



#set ($MyArrayString={)
#set ($MyArrayString=$MyArrayString 
+'Index1':{'Field1':'value1','field2':'value2'},)
#set ($MyArrayString=$MyArrayString +'Index3':{'Field1':'A 
value','field2':'Another value'})
#set ($MyArrayString=$MyArrayString +})
$jsontool.serialize($MyArrayString)

I can edit this json arraw but it as wrong json arraw because the  characters 
:-(
{'Index1':{'Field1':'value1','field2':'value2'},'Index3':{'Field1':'A 
value','field2':'Another value'}}

{{/velocity}}



Thxs for any help

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


[xwiki-users] Fw : (About XWIKI-12570:Access right doesn't work well with subgroups) Try to remove some version from document with groovy

2015-11-10 Thread Pascal BASTIEN


--- En date de : Ven 6.11.15, Pascal BASTIEN <pbasnews-xw...@yahoo.fr> a écrit :

> De: Pascal BASTIEN <pbasnews-xw...@yahoo.fr>
> Objet: [xwiki-users] (About XWIKI-12570:Access right doesn't work well
> with subgroups) Try to remove some version from document with groovy
> À: "XWiki Users" <users@xwiki.org>
> Date: Vendredi 6 novembre 2015, 16h19
> Hi,
> 
> I try without success to remove some version from document
> with groovy :-(
> 
> To refresh group cache I add & remove a member in a user
> group but I don't want my group be poluted by this
> operation.
> 
Here correct code with Thomas help :-)

{{groovy}}

// My group to update
def MyGroup = xwiki.getDocument('XWiki.GF_PiloteP3')
print("Current Version : " + MyGroup.getVersion()+ " \n")
// My temp user
udoc = xwiki.getDocument('XWiki.xwikilecteur')
// Add this temp user
gObj = MyGroup.newObject('XWiki.XWikiGroups')
gObj.set('member',udoc.fullName)
MyGroup.save()
// Remove this temp user
MyGroup.removeObject(gObj)
MyGroup.save()

// get document Archive
def gArch = MyGroup.getDocumentArchive()
print("Prev version: " + gArch.getPrevVersion(gArch.getLatestVersion()) + " \n")
print("Last version: " + gArch.getLatestVersion() + " \n")

//remove 2 previous version archive
//gArch.removeVersions(gArch.getLatestVersion(), 
gArch.getPrevVersion(gArch.getLatestVersion()), xcontext.context)
// must remove 3 version because last saved add one version
gArch.removeVersions(gArch.getLatestVersion(), 
gArch.getPrevVersion(gArch.getPrevVersion(gArch.getLatestVersion())), 
xcontext.context)
MyGroup.save()
print("Current Version : " + MyGroup.getVersion()+ " \n")

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


Re: [xwiki-users] Full form statements requires programming right issue?

2015-11-16 Thread Pascal BASTIEN
Hello,

I think I resoved my issue with an include to launch my query:
In my Class in "Computed Field" to display a query in "Custom Display", I 
simply inserted an include function

#set ($HqlQuery ="select distinct doc.fullName, doc.name, doc.creationDate, 
CategorieProp.value, ProcessusProp.value from XWikiDocument as doc
, xxx
 order by doc.creationDate  desc")
##
#includeInContext("FormSMQ.MyQuery")
## set ($ResultQuery=$services.query.hql("$HqlQuery").execute())
#if ($listtool.isEmpty($!ResultQuery) || ! $ResultQuery )
  * //(Aucune amélioration)//
#else
  yyy

and FormSMQ.MyQuery, who's belong to Admin user, contains
{{velocity}}
#set ($ResultQuery=$services.query.hql("$HqlQuery").execute())
{{/velocity}}

Pascal

--------
En date de : Lun 16.11.15, Pascal BASTIEN <pbasnews-xw...@yahoo.fr> a écrit :

 Objet: Full form statements requires programming right issue?
 À: "XWiki Users" <users@xwiki.org>
 Date: Lundi 16 novembre 2015, 11h36
 
 Hi,
 
 I writed an application form with template + class + sheet
 (owner is admin).
 In my Class I use a "Computed Field" to display a query
 result with "Custom Display".
 It is an hql query with select. I know that we must have PR
 to launch a hql query with select but my template + class +
 sheet owner is admin.
 If a "simple" user create a new form (with myClass object)
 he obtain a naughty velocity error: <>
 
 How can I resolve this problem? It it a bug?
 
 Thxs for any help
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Full form statements requires programming right issue?

2015-11-16 Thread Pascal BASTIEN
Hi,

I writed an application form with template + class + sheet (owner is admin).
In my Class I use a "Computed Field" to display a query result with "Custom 
Display".
It is an hql query with select. I know that we must have PR to launch a hql 
query with select but my template + class + sheet owner is admin.
If a "simple" user create a new form (with myClass object) he obtain a naughty 
velocity error: <>

How can I resolve this problem? It it a bug?

Thxs for any help
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Need help to find a hql query

2015-11-03 Thread Pascal BASTIEN
Yes thxs (gdelhumeau helped me on irc).
 => I update doc: 
http://extensions.xwiki.org/xwiki/bin/view/Extension/Query+Module
I used wrong value like you found too :-)


En date de : Mar 3.11.15, Marius Dumitru Florea 
<mariusdumitru.flo...@xwiki.com> a écrit :

 Objet: Re: [xwiki-users] Need help to find a hql query
 À: "Pascal BASTIEN" <pbasnews-xw...@yahoo.fr>
 Date: Mardi 3 novembre 2015, 11h01
 
 On Mon,
 Nov 2, 2015 at 5:15 PM, Pascal BASTIEN <pbasnews-xw...@yahoo.fr>
 wrote:
 I didn't manage to
 use blog example on xwiki 7.0.1
 
 
 
 (I replace 'XWiki.ArticleClass' by 
 'Blog.BlogPostClass' : we must fix doc if it is
 ok)
 
 The query example don't work (or maybe I don't know
 how to use it ;-) )
 
  select distinct
 doc.fullName, doc.creationDate from XWikiDocument as doc,
 BaseObject as obj, DBStringListProperty as prop join
 prop.list list where obj.name=doc.fullName and
 obj.className='Blog.BlogPostClass' and obj.id=prop.id.id and 
prop.id.name='category' 
 and list='${category}' order by doc.creationDate
 desc
 
 This works fine for me:
 
 select distinct doc.fullName,
 doc.creationDate from XWikiDocument as doc, BaseObject as
 obj, DBStringListProperty as prop join prop.list list where
 obj.name=doc.fullName and
 obj.className='Blog.BlogPostClass' and obj.id=prop.id.id and 
prop.id.name='category'
 and list='Blog.News' order by doc.creationDate
 desc
 
 You
 probably don't have the right value in $category.
 
 Hope this helps,
 Marius
  
 
 
 If I remove category parameter
 
 
 
 #set ($query ="select distinct doc.fullName,
 doc.creationDate from XWikiDocument as doc, BaseObject as
 obj, DBStringListProperty as prop join prop.list list where
 obj.name=doc.fullName and
 obj.className='Blog.BlogPostClass' order by
 doc.creationDate desc")
 
 
 
 the query return all doc with blog class
 
 
 
 
 
 
 
 
 
 En date de : Lun 2.11.15, Marius Dumitru Florea 
<mariusdumitru.flo...@xwiki.com>
 a écrit :
 
 
 
  Objet: Re: [xwiki-users] Need help to find a hql query
 
  À: "Pascal BASTIEN" <pbasnews-xw...@yahoo.fr>,
 "XWiki Users" <users@xwiki.org>
 
  Date: Lundi 2 novembre 2015, 13h47
 
 
 
  On Mon,
 
  Nov 2, 2015 at 1:00 PM, Pascal BASTIEN <pbasnews-xw...@yahoo.fr>
 
  wrote:
 
  Hello,
 
 
 
 
 
 
 
  I have a xwiki doc class with some properties: 
 'Static
 
  List' type and 'Page' (multiselect) type.
 
 
 
  I try to write a query to retrieve document in one
 query
 
  shot but I encoutered problem with 'Page' type.
 
 
 
  This query working well based on 
http://platform.xwiki.org/xwiki/bin/view/DevGuide/velocityHqlExamples#HGettingdocumentswhereobjects27propertiesequalssomevalue
 
 
 
 
 
 
 
  select distinct doc.name,
 
  doc.creationDate from XWikiDocument as doc, BaseObject
 as
 
  obj, StringProperty prop where (doc.fullName=obj.name and
 
  obj.className='FormSMQ.ACClass' and
 
  doc.space='FormSMQ' and doc.hidden=false  and prop.id.id=obj.id
 
  and prop.name='P1_Processus'
 
  and prop.value='M3') order by doc.creationDate
 
  desc
 
 
 
 
 
 
 
  'P1_Processus' is a static list type
 
 
 
 
 
 
 
  But this query doesn't work:
 
 
 
   select distinct doc.name,
 doc.creationDate from
 
  XWikiDocument as doc, BaseObject as obj, StringProperty
 prop
 
  where (doc.fullName=obj.name and
 
  obj.className='FormSMQ.ACClass' and
 
  doc.space='FormSMQ' and doc.hidden=false  and prop.id.id=obj.id
 
  and prop.name='MY_PAGE_TYPE_PROPERTY_NAME'
 
  and prop.value='MYVALUE') order by
 doc.creationDate
 
  desc
 
 
 
  I suppose the 'P1_Processus'
 
  property has single selection, which means
 
  'prop.value' is a string and thus you can write
 
  "prop.value='M3'". If the Page type
 
  property is multiple select then it's value is a
 list.
 
  You should check the
 
 
 
  "List all blog posts, published and not
 
  hidden (filter by multiple properties of an
 object)"
 
 
 
  example from 
http://extensions.xwiki.org/xwiki/bin/view/Extension/Query+Module#HQueryLanguageExamples
 
  . Look for :
 
 
 
  :category member of blog.category (in
 
  the XWQL version)
 
 
 
  DBStringListProperty as categoryProp
 
  join categoryProp.list list (in the HQL version)
 
   
 
  Hope this helps,
 
  Marius
 
 
 
 
 
 
 
 
 
  Ididn't find some "PageProperty" in 
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/resources/xwiki.hbm.xml,
 
  then I must use DBStringListProperty ?
 
 
 
 
 
 
 
  Any help will be welcome.
 
 
 
 
 
 
 
  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


[xwiki-users] Fw : Re: Need help to find a hql query

2015-11-04 Thread Pascal BASTIEN

> I read this example:
> http://xwiki.markmail.org/message/e2mi4odgpucsd3cu
> #set ($hql ="select distinct doc.fullName, otherprop.value,
> doc.creationDate from XWikiDocument as doc, BaseObject as
> obj, StringProperty otherprop, DBStringListProperty as prop
> join prop.list list
>  where obj.name=doc.fullName  and
> obj.className='Blog.BlogPostClass' and obj.id=prop.id.id and
> prop.id.name='category' and list='Blog.Autres'
>  and obj.id=otherprop.id.id and otherprop.id.name='title'
>  order by doc.creationDate  desc")
> 
> (must try with category property now)
> 

Nope: I didn't managed to have multiselect category values with hql query :-(
maybe I must uncheck database relationnel storage  (and use this filter "list 
like '%Blog.Autres%'")?
because like sergio said in 
http://xwiki.markmail.org/message/c6s5wofs24q62qjd?q=query+Property+DBStringList
<>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] (About XWIKI-12570:Access right doesn't work well with subgroups) Try to remove some version from document with groovy

2015-11-06 Thread Pascal BASTIEN
Hi,

I try without success to remove some version from document with groovy :-(

To refresh group cache I add & remove a member in a user group but I don't want 
my group be poluted by this operation.

I want to launch this groovy script but unfortunaly this one crash with
gArch.removeVersions("EndVersionToDel", "StartVersionToDel", context) 

I use
http://maven.xwiki.org/site/docs/xwiki-javadoc-4.1.x/com/xpn/xwiki/doc/XWikiDocumentArchive.html#removeVersions%28Version,%20Version,%20com.xpn.xwiki.XWikiContext%29
but I obtain this error:
Caused by: javax.script.ScriptException: javax.script.ScriptException: 
groovy.lang.MissingMethodException: No signature of method: 
com.xpn.xwiki.doc.XWikiDocumentArchive.removeVersions() is applicable for 
argument types: (java.lang.String, java.lang.String, 
javax.script.SimpleScriptContext) values: [EndVersionToDel, StartVersionToDel, 
javax.script.SimpleScriptContext@4ee56e53]
Possible solutions: removeVersions(org.suigeneris.jrcs.rcs.Version, 
org.suigeneris.jrcs.rcs.Version, com.xpn.xwiki.XWikiContext)

If someone can help me?
NB: groovy is complicated for me (and I don't understand what is context and 
how to get it)

Thxs
Pascal B

{{groovy}}
// My group to refresh
def MyGroup = xwiki.getDocument('XWiki.GF_PiloteP3')
// My temp user
udoc = xwiki.getDocument('XWiki.xwikilecteur')
// Add this temp user
gObj = MyGroup.newObject('XWiki.XWikiGroups')
gObj.set('member',udoc.fullName)
MyGroup.save()

// Store version to delete
def StartVersionToDel = MyGroup.getVersion()
print(MyGroup.getVersion() + "' \n")

// Remove this temp user
MyGroup.removeObject(gObj)
MyGroup.save()

// Store new version to delete
def EndVersionToDel = MyGroup.getVersion()
print(MyGroup.getVersion() + " \n")

// get document Archive
def gArch = MyGroup.getDocumentArchive()

//try to remove 2 previous version archive
gArch.removeVersions("EndVersionToDel", "StartVersionToDel", context) 

print(MyGroup.getVersion()+ " \n context: " + context + " \n")

{{/groovy}}

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


Re: [xwiki-users] How to add a button with confirmation to save my page?

2015-10-07 Thread Pascal BASTIEN
Hi,
I think I found a way to do what i want but I identify some issue (probably due 
to my ugly code)

- my button SaveAndStuff launch this JS
  $('#inline').attr('action','/bin/save/FormSMQ/MyCurrentPage');
  // I save my CurrentPage
  $('#inline').submit();
  // I reopen my CurrentPage in view mode with param to launch my velocity 
script
   window.location = 
"https://xx/bin/view/FormSMQ/MyCurrentPage?docName=LauchNextProcess;;  
//Open MyCurrentPage with parameters

In FormSMQ/MyCurrentPage I have this velocity script:
#if("$!request.docName"=='LauchNextProcess'')
  ## I add a value in a field (list) of MyClass object of currenpage
  #set($MyListActions=$MonObj.getValue($ListActionsField))
  #set($Discard=$MyListActions.add("$!MonPrefX${docName}"))
  #set ($discard=$MonObj.set($ListActionsField,$!MyListActions))

  ## I save my CurrentPage to save my previous new value
  #set ($discard=$doc.save("Nouvelle action => $!MonPrefX${docName}",false))

  ##Finally I redirect to another page
  #$response.sendRedirect($xwiki.getURL("FormSMQ.CaFonctionneOuPas", 'edit', 
"template=FormSMQ.ACTemplate=FormSMQ.WebHome=FormSMQ.CaFonctionneOuPas=FormSMQ.ACClass"))
  ## Stop processing, since we already sent a redirect.
  #stop

My problem is: when I use "$doc.save", all modifications of my page are lost 
(except the new value added)!
If I don't use "$doc.save" all page modifications are saved but of course my 
new value is not added :-(

It is a "bit" confused but if someone understand...


En date de : Mar 6.10.15, Pascal BASTIEN <pbasnews-xw...@yahoo.fr> a écrit :

 Objet: [xwiki-users] Fw : Re: Fw : Re: How to add a button with
confirmation to save my page?
 À: "Marius Dumitru Florea" <mariusdumitru.flo...@xwiki.com>
 Cc: "XWiki Users" <users@xwiki.org>
 Date: Mardi 6 octobre 2015, 18h22
 
 I manage to launch save process of my
 page but I didn't manage to pass parameter in this process
 :-(
 
 On my page in edit mode, I add a button with this JS code:
 function SaveCurrentPage(MyForm, MyParam) {
   require(['jquery'], function ($) {
  
 
$('#inline').attr('action','/bin/save/FormSMQ/SMQ-M2-FAM-Mon+am%C3%A9lioration');
   //$('#inline').attr('method','get');
   $('#inline').submit();
   });
 };
 this code save current page and go in the view mode BUT I
 can NOT pass some parameters to my velocity code and update
 myClass object :-(
 
 In the other way when I submit to view mode with
 
$('#inline').attr('action','/bin/view/FormSMQ/SMQ-M2-FAM-Mon+am%C3%A9lioration');
 My current page is NOT saved but I can pass some parameter
 with hidden input (I can catch them with $request. in
 velocity code)
 
 
 
 
 --- En date de : Mar 6.10.15, Marius Dumitru Florea 
<mariusdumitru.flo...@xwiki.com>
 a écrit :
 
 > De: Marius Dumitru Florea <mariusdumitru.flo...@xwiki.com>
 > Objet: Re: [xwiki-users] Fw : Re: How to add a button
 with confirmation to save my page?
 > À: "XWiki Users" <users@xwiki.org>
 > Date: Mardi 6 octobre 2015, 12h23
 > On Tue, Oct 6, 2015 at
 > 1:01 PM, Pascal BASTIEN <pbasnews-xw...@yahoo.fr>
 > wrote:
 > > First thxs both  but it is not
 > what I want try to do.
 > >
 > > I want to keep default button "Save,
 > save and contine and Cancel" like usual.
 > > With velocity I added a button  to update
 > my class object on my page and redirect to another one.
 My
 > button working well in view mode but I want to use it
 in
 > edit mode, then I must save my page before my class
 object
 > update and redirection if not all page modifications
 will be
 > lost.
 > >
 > > My main
 > problem if I rewrite my code in JS is that I can not
 update
 > my class object field attached on my page.
 > >
 > > (It's a shame it
 > doesn't exist an $xwiki.LaunchSaveCurrentPage)
 > >
 > > Can I launch
 > "save page" with javascript? My idea: i launch
 > save my page in JS from edit mode to view mode with
 param
 > (do redirect on another page). With this way I can keep
 my
 > nice existant velocity code.
 > > Do you
 > know how if I can launch "save page" in JS
 > then?
 > 
 > > I see that a
 > submit in JS go to preview mode, maybe I must modify
 the
 > action target of #inline before submit?
 > 
 > The submit button name (e.g.
 > name="action_save") is not included by
 > default when you submit the form using
 > JavaScript (because the form
 > may have
 > multiple submit buttons, like in your case, and the
 > JavaScript code wouldn't know what button
 > to indicate in the submit
 > form unless you
 > explicitly indicate it). You need to add the button
 > name to the submit parameters when you make the
 > AJAX save request.
 > 
 > Hope
 > this helps,
 > Marius
 > 
 
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Fw : Re: How to add a button with confirmation to save my page?

2015-10-06 Thread Pascal BASTIEN
First thxs both  but it is not what I want try to do.

I want to keep default button "Save, save and contine and Cancel" like usual.
With velocity I added a button  to update my class object on my page and 
redirect to another one. My button working well in view mode but I want to use 
it in edit mode, then I must save my page before my class object update and 
redirection if not all page modifications will be lost.

My main problem if I rewrite my code in JS is that I can not update my class 
object field attached on my page.

(It's a shame it doesn't exist an $xwiki.LaunchSaveCurrentPage)

Can I launch "save page" with javascript? My idea: i launch save my page in JS 
from edit mode to view mode with param (do redirect on another page). With this 
way I can keep my nice existant velocity code.
Do you know how if I can launch "save page" in JS then?
I see that a submit in JS go to preview mode, maybe I must modify the action 
target of #inline before submit? 




--- En date de : Lun 5.10.15, Eduard Moraru <enygma2...@gmail.com> a écrit :

> De: Eduard Moraru <enygma2...@gmail.com>
> Objet: Re: [xwiki-users] How to add a button with confirmation to save my 
> page?
> À: "XWiki Users" <users@xwiki.org>
> Date: Lundi 5 octobre 2015, 17h35
> Hi,
> 
> You might want to have a look at the javascript
> [1] events that are thrown
> when pressing the
> standard save / save & continue buttons that you
> might
> want to catch and insert a
> confirmation to the user. Depending on the
> user's answer, you can either cancel the
> event or modify the dom (to add
> some
> xredirect input) then let the event finish.
> 
> Hope this helps,
> Eduard
> 
> P.S.:
> remember to use the event bridge module [2] to be able to
> listen to
> PrototypeJS events from jQuery.
> 
> --
> [1]
> https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-web/src/main/webapp/resources/js/xwiki/actionbuttons/actionButtons.js
> [2]
> http://platform.xwiki.org/xwiki/bin/view/DevGuide/JavaScriptAPI#HBridgingcustomXWikieventsbetweenPrototypeandjQuery
> 
> 
> On Mon, Oct
> 5, 2015 at 6:08 PM, Marius Dumitru Florea <
> mariusdumitru.flo...@xwiki.com>
> wrote:
> 
> > I think the
> Save action supports an 'xredirect' parameter. So if
> your
> > form has a hidden input field with
> name='xredirect' then the user will
> > be redirected to the specified URL after
> the page is saved. So what
> > you can do
> is:
> >
> > * catch the
> click event on the button
> > * ask for
> confirmation
> > https://developer.mozilla.org/en-US/docs/Web/API/Window/confirm
> > * cancel/prevent the event if no, set the
> value of the 'xredirect'
> >
> parameter otherwise
> >
> > Hope this helps,
> >
> Marius
> >
> >
> > On Mon, Oct 5, 2015 at 5:35 PM, Pascal
> BASTIEN <pbasnews-xw...@yahoo.fr>
> > wrote:
> > > Hi,
> > >
> > > I have my
> application with MyClass, MySheet and MyTemplate.
> > > When I have a new page (based on
> MySheet/Class), in edit mode I can
> >
> modify all my fields of Myclass Object but I want to add a
> button to save
> > my page after
> confirmation...
> > >
> > > For the moment I have a button to
> redirect in a new page BUT I want to
> >
> save current page before redirect if the user agreed a
> confirmation box.
> > >
> > > More precisely on my nice appli, on
> new page in edit mode, I have
> > standard
> Save, Save and continue and cancel button and I want another
> one
> > to ask on clik: "are you sure
> to save current fields modified on current
> > page and open this another page"?
> > > - if yes save current page, add a
> value in a field with velocity and
> > save
> and redirect to another one.
> > > - if
> No stay in edit mode
> > >
> > > Do you have a way to recommend?
> > > (perhaps I must try 
> $('#form').submit(function() { with jquery)  but
> I
> > don't know if this save my
> page?
> > >
> > >
> Thxs for any help.
> > >
> > > 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
> 
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Include & Co board effect

2015-09-10 Thread Pascal BASTIEN
Hello,

In my velocity script I try to include some velocity code from another page.
I want similare function like "source" in bash, it's like copy/paste some code 
in main script from another file.
I read https://network.xwiki.com/xwiki/bin/view/DocXE31Fr/IncludeInVelocity and 
use #includeInContext("mySpace.myPage") but there are board effect:
#includeInContext return HTML code like this
I call MyMacroMy color is Red...
Then to obtain what I want I must user html tag:
{{html}}
  #includeInContext("mySpace.myPage") 
{{/html}}

Is it normal?


Thxs,

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


[xwiki-users] Fw : Include & Co board effect

2015-09-10 Thread Pascal BASTIEN
NB: new include function {{include reference="BacASable.Page" type="document" 
/}} doesn't work well when target page contains a velocity macro
If target page contains a macro velocity (#macro( foo $color ), the main page 
containing "include reference" can't call foo macro.
(with includeInContext it's working)

--- En date de : Jeu 10.9.15, Pascal BASTIEN <pbasnews-xw...@yahoo.fr> a écrit :

> De: Pascal BASTIEN <pbasnews-xw...@yahoo.fr>
> Objet: [xwiki-users] Include & Co board effect
> À: "XWiki Users" <users@xwiki.org>
> Date: Jeudi 10 septembre 2015, 10h33
> Hello,
> 
> In my velocity script I try to include some velocity code
> from another page.
> I want similare function like "source" in bash, it's like
> copy/paste some code in main script from another file.
> I read https://network.xwiki.com/xwiki/bin/view/DocXE31Fr/IncludeInVelocity
> and use #includeInContext("mySpace.myPage") but there
> are board effect:
> #includeInContext return HTML code like this
> I call MyMacroMy color is
> Red...
> Then to obtain what I want I must user html tag:
> {{html}}
>   #includeInContext("mySpace.myPage") 
> {{/html}}
> 
> Is it normal?
> 
> 
> 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


[xwiki-users] Fw : Re: Fw : Include & Co board effect

2015-09-14 Thread Pascal BASTIEN
Nope: both method doesn't work with velocity macro...
Do you want a nice xar to check? Then where I can upload it? in Jira?

--- En date de : Lun 14.9.15, vinc...@massol.net <vinc...@massol.net> a écrit :

> De: vinc...@massol.net <vinc...@massol.net>
> Objet: Re: [xwiki-users] Fw : Include & Co board effect
> À: "XWiki Users" <users@xwiki.org>
> Cc: pbasnews-xw...@yahoo.fr
> Date: Lundi 14 septembre 2015, 14h00
> #yiv5668446636
> body{font-family:Helvetica,
> Arial;font-size:13px;}Hi Pascal,
> You should use {{include}}
> for transclusions and {{display}} for inserting the result
> of the execution of some page. 
> Thanks-Vincent
>   
> On 10 Sep 2015 at 11:26:25,
> Pascal BASTIEN (pbasnews-xw...@yahoo.fr)
> wrote: NB: new
> include function {{include
> reference="BacASable.Page"
> type="document" /}} doesn't work well when
> target page contains a velocity macro
> 
> If target page contains a macro velocity
> (#macro( foo $color ), the main page containing
> "include reference" can't call foo macro.
> 
> (with includeInContext it's working)
> 
> 
> 
> --- En date de : Jeu 10.9.15, Pascal
> BASTIEN <pbasnews-xw...@yahoo.fr> a écrit :
> 
> 
> 
> > De: Pascal BASTIEN
> <pbasnews-xw...@yahoo.fr>
> 
> > Objet: [xwiki-users] Include & Co
> board effect
> 
> > À: "XWiki Users"
> <users@xwiki.org>
> 
> > Date: Jeudi 10 septembre 2015, 10h33
> 
> > Hello,
> 
> >  
> 
> > In my velocity script I try to include
> some velocity code
> 
> > from another page.
> 
> > I want similare function like
> "source" in bash, it's like
> 
> > copy/paste some code in main script
> from another file.
> 
> > I read
> https://network.xwiki.com/xwiki/bin/view/DocXE31Fr/IncludeInVelocity
> 
> > and use
> #includeInContext("mySpace.myPage") but there
> 
> > are board effect:
> 
> > #includeInContext return HTML code
> like this
> 
> > I call
> MyMacroMy color is
> 
> > Red...
> 
> > Then to obtain what I want I must user
> html tag:
> 
> > {{html}}
> 
> >  
> #includeInContext("mySpace.myPage")  
> 
> > {{/html}}
> 
> >  
> 
> > Is it normal?
> 
> >  
> 
> >  
> 
> > 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] Fw : Re: Fw : Include & Co board effect

2015-09-14 Thread Pascal BASTIEN
Ok thxs for your answer, but in fact I (try to)  explain 2 problems with 
include functions with velocity:
- main problem with include: in a main doc you can not call a custom velocity 
macro  (ie foo) with include if this macro is declared in another page.

Main doc containing something like this:
{{include reference="BacASable.PageWithACustomMacro" /}}
#foo('blue'') doesn't work


BacASable.PageWithACustomMacro containing:
#macro( foo $color)
My Color is $color
#end

In old doc: 
https://network.xwiki.com/xwiki/bin/view/DocXE31Fr/IncludeInVelocity you 
recommanded #includeInContext but new doc recommand include instead.

- second "problem" , when I want to avoid main problem with #includeInContext
Main doc containing something like this:
$xwiki.includeForm("BacASable.PageWithACustomMacro")
## or #includeInContext("BacASable.PageWithACustomMacro")
{{html}}
#foo('blue'') work well
{{/html}}

BacASable.PageWithACustomMacro containing:
#macro( foo $color)
My Color is $color
#end

I though wrongly then that #includeInContext working like #parse... and doesn't 
render the content.

Thxs

Pascal B.


En date de : Lun 14.9.15, vinc...@massol.net <vinc...@massol.net> a écrit :

 Objet: Re: Fw : Re: [xwiki-users] Fw : Include & Co board effect
 À: "XWiki Users" <users@xwiki.org>
 Cc: pbasnews-xw...@yahoo.fr
 Date: Lundi 14 septembre 2015, 15h15
 
 
 On 14
 Sep 2015 at 15:02:40, Pascal BASTIEN 
(pbasnews-xw...@yahoo.fr(mailto:pbasnews-xw...@yahoo.fr))
 wrote:
 
 > Nope: both
 method doesn't work with velocity macro...
 > Do you want a nice xar to check? Then
 where I can upload it? in Jira?
 
 In your example below you were not inside a
 velocity macro!
 
 You
 said:
 
 > Then to obtain
 what I want I must user
 > html tag:
 >
 > {{html}}
 >
 #includeInContext("mySpace.myPage") 
 > {{/html}}
 
 The {{html}} macro cannot work inside a
 velocity macro…
 
 Now,
 #include* macros all render the content, which is why you
 get HTML.
 
 Thanks
 -Vincent
 
 
 > --- En date de : Lun 14.9.15, vinc...@massol.net
 a écrit :
 >  
 > >
 De: vinc...@massol.net 
 
 > > Objet: Re: [xwiki-users] Fw :
 Include & Co board effect
 > > À:
 "XWiki Users"  
 > > Cc: pbasnews-xw...@yahoo.fr
 > > Date: Lundi 14 septembre 2015,
 14h00
 > > #yiv5668446636
 > > body{font-family:Helvetica,
 > > Arial;font-size:13px;}Hi Pascal,
 > > You should use {{include}}
 > > for transclusions and {{display}} for
 inserting the result
 > > of the
 execution of some page.
 > >
 Thanks-Vincent
 > >  
 > > On 10 Sep 2015 at 11:26:25,
 > > Pascal BASTIEN (pbasnews-xw...@yahoo.fr)
 > > wrote: NB: new
 >
 > include function {{include
 > >
 reference="BacASable.Page"
 >
 > type="document" /}} doesn't work well
 when
 > > target page contains a
 velocity macro
 > >
 > > If target page contains a macro
 velocity
 > > (#macro( foo $color ),
 the main page containing
 > >
 "include reference" can't call foo macro.
 > >
 > > (with
 includeInContext it's working)
 >
 >
 > >
 > >
 > > --- En date de : Jeu 10.9.15,
 Pascal
 > > BASTIEN a écrit :
 >
 >
 > >
 > >
 > > > De: Pascal BASTIEN
 > >  
 > >
 > > > Objet: [xwiki-users] Include
 & Co
 > > board effect
 > >
 > > > À:
 "XWiki Users"
 > >  
 > >
 > > > Date:
 Jeudi 10 septembre 2015, 10h33
 > >
 > > > Hello,
 >
 >
 > > >  
 >
 >
 > > > In my velocity script I
 try to include
 > > some velocity
 code
 > >
 > >
 > from another page.
 > >
 > > > I want similare function like
 > > "source" in bash, it's
 like
 > >
 > >
 > copy/paste some code in main script
 > > from another file.
 > >
 > > > I
 read
 > > https://network.xwiki.com/xwiki/bin/view/DocXE31Fr/IncludeInVelocity
 > >
 > > > and
 use
 > >
 #includeInContext("mySpace.myPage") but there
 > >
 > > > are
 board effect:
 > >
 >
 > > #includeInContext return HTML code
 > > like this
 >
 >
 > > >
 I
 call
 > > MyMacro
 
 My color is
 > >
 > > > Red
 
 ...
 > >
 > > > Then to obtain what I want I
 must user
 > > html tag:
 > >
 > > >
 {{html}}
 > >
 > >
 >  
 > >
 #includeInContext("mySpace.myPage")  
 > >
 > > >
 {{/html}}
 > >
 >
 > >  
 > >
 >
 > > Is it normal?
 > >
 > > >  
 > >
 > > >  
 > >
 > > > Thxs,
 >
 >
 > > >  
 >
 >
 > > > Pascal B
 
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Fw : Re: Fw : Re: Fw : Include & Co board effect

2015-09-14 Thread Pascal BASTIEN


--- En date de : Lun 14.9.15, Thomas Mortagne <thomas.morta...@xwiki.com> a 
écrit :

> De: Thomas Mortagne <thomas.morta...@xwiki.com>
> Objet: Re: [xwiki-users] Fw : Re: Fw : Include & Co board effect
> À: "Pascal BASTIEN" <pbasnews-xw...@yahoo.fr>, "XWiki Users" <users@xwiki.org>
> Cc: "vinc...@massol.net" <vinc...@massol.net>
> Date: Lundi 14 septembre 2015, 16h40
> On Mon, Sep 14, 2015 at
> 4:02 PM, Pascal BASTIEN <pbasnews-xw...@yahoo.fr>
> wrote:
> > Ok thxs for your answer, but in
> fact I (try to)  explain 2 problems with include functions
> with velocity:
> > - main problem with
> include: in a main doc you can not call a custom velocity
> macro  (ie foo) with include if this macro is declared in
> another page.
> >
> > Main
> doc containing something like this:
> >
> {{include
> reference="BacASable.PageWithACustomMacro" /}}
> > #foo('blue'') doesn't
> work
> 
> Why do you need to
> include this page inside the {{velocity}} macro ?
> If it's just some definition of velocity
> macros you should include it
> before the
> {{velocity}} macro.
> 
Yes you are right this code working well :-)
{{include reference="BacASable.PageWithACustomMacro" /}}

{{velocity}}
#foo('Red')
{{/velocity}}

I put include in my velocity code because this include is in an #if #then #else 
condition (because I have another stuff in my child doc included)
but anyway I can cut/separate my code. and fill a distinct doc with all my 
not'so'nice macros :-)

Thxs

Pascal B

> >
> >
> >
> BacASable.PageWithACustomMacro containing:
> > #macro( foo $color)
> >
> My Color is $color
> > #end
> >
> > In old doc: 
> > https://network.xwiki.com/xwiki/bin/view/DocXE31Fr/IncludeInVelocity
> you recommanded #includeInContext but new doc recommand
> include instead.
> >
> > -
> second "problem" , when I want to avoid main
> problem with #includeInContext
> > Main doc
> containing something like this:
> >
> $xwiki.includeForm("BacASable.PageWithACustomMacro")
> > ## or
> #includeInContext("BacASable.PageWithACustomMacro")
> > {{html}}
> >
> #foo('blue'') work well
> >
> {{/html}}
> >
> >
> BacASable.PageWithACustomMacro containing:
> > #macro( foo $color)
> >
> My Color is $color
> > #end
> >
> > I though wrongly then
> that #includeInContext working like #parse... and
> doesn't render the content.
> >
> > Thxs
> >
> > Pascal B.
> >
> >
> 
> > En date de : Lun 14.9.15, vinc...@massol.net
> <vinc...@massol.net>
> a écrit :
> >
> > 
> Objet: Re: Fw : Re: [xwiki-users] Fw : Include & Co
> board effect
> >  À: "XWiki
> Users" <users@xwiki.org>
> >  Cc: pbasnews-xw...@yahoo.fr
> >  Date: Lundi 14 septembre 2015, 15h15
> >
> >
> >  On 14
> >  Sep 2015 at
> 15:02:40, Pascal BASTIEN 
> (pbasnews-xw...@yahoo.fr(mailto:pbasnews-xw...@yahoo.fr))
> >  wrote:
> >
> >  > Nope: both
> > 
> method doesn't work with velocity macro...
> >  > Do you want a nice xar to check?
> Then
> >  where I can upload it? in
> Jira?
> >
> >  In your
> example below you were not inside a
> > 
> velocity macro!
> >
> > 
> You
> >  said:
> >
> >  > Then to obtain
> >  what I want I must user
> >  > html tag:
> > 
> >
> >  > {{html}}
> >  >
> > 
> #includeInContext("mySpace.myPage")
> >  > {{/html}}
> >
> >  The {{html}} macro cannot work inside
> a
> >  velocity macro…
> >
> >  Now,
> >  #include* macros all render the content,
> which is why you
> >  get HTML.
> >
> >  Thanks
> >  -Vincent
> >
> >
> >  > --- En date de
> : Lun 14.9.15, vinc...@massol.net
> >  a écrit :
> > 
> >
> >  > >
> > 
> De: vinc...@massol.net
> >
> >  > > Objet:
> Re: [xwiki-users] Fw :
> >  Include &
> Co board effect
> >  > > À:
> >  "XWiki Users"
> >  > > Cc: pbasnews-xw...@yahoo.fr
> >  > > Date: Lundi 14 septembre
> 2015,
> >  14h00
> > 
> > > #yiv5668446636
> >  > >
> body{font-family:Helvetica,
> >  > >
> Arial;font-size:13px;}Hi Pascal,
> >  >
> > You should use {{include}}
> >  >
> > for transclusions and {{disp

Re: [xwiki-users] Right access with sub group and ldap authentication

2015-09-16 Thread Pascal BASTIEN
Hello,

FYI I open an issue http://jira.xwiki.org/browse/XWIKI-12570 because to 
retablish write acces, I simply remove/replace a user in subgroup, that's all 
:-/

Thxs


En date de : Mar 15.9.15, Pascal BASTIEN <pbasnews-xw...@yahoo.fr> a écrit :

 Objet: [xwiki-users] Right access with sub group and ldap authentication
 À: "XWiki Users" <users@xwiki.org>
 Date: Mardi 15 septembre 2015, 10h18
 
 Hello,
 
 I try to resolve an right access issu with our xwiki 7.0.1.
 I use LDAP authentication to access at our xwiki. Everyone
 have read access and a main group have write access on a
 space (unfortunaly big boss is "afraid?" about wiki spirit:
 'everyone can edit').
 Main editor group contains some subgroup (like manager,
 comm, etc.) with users in it.
 I encountered a strange behaviours: on my developpment
 platform, rights access work well but on production platform
 (behind a reverse proxy), right acces working randomly:
 sometimes main group editors lose write access.
 
 I tested with a test ldap user with exactly same
 rights/groups on same space with same rights access, on my
 developpment platform and on production platform. Main
 editor group can write only on my developpment platform :-(
 
 Do you have an idea of my problem or a way to identify the
 source of this problem?
 I can try to restart production platform in last resort...
 Maybe the poblem come from some wrong cache on web server?
 
 Note: If I don't use sub group and fill main editors groups
 with users account I haven't problems.
 
 Thxs for any help
 
 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


[xwiki-users] Right access with sub group and ldap authentication

2015-09-15 Thread Pascal BASTIEN
Hello,

I try to resolve an right access issu with our xwiki 7.0.1.
I use LDAP authentication to access at our xwiki. Everyone have read access and 
a main group have write access on a space (unfortunaly big boss is "afraid?" 
about wiki spirit: 'everyone can edit').
Main editor group contains some subgroup (like manager, comm, etc.) with users 
in it.
I encountered a strange behaviours: on my developpment platform, rights access 
work well but on production platform (behind a reverse proxy), right acces 
working randomly: sometimes main group editors lose write access.

I tested with a test ldap user with exactly same rights/groups on same space 
with same rights access, on my developpment platform and on production 
platform. Main editor group can write only on my developpment platform :-(

Do you have an idea of my problem or a way to identify the source of this 
problem?
I can try to restart production platform in last resort... Maybe the poblem 
come from some wrong cache on web server?

Note: If I don't use sub group and fill main editors groups with users account 
I haven't problems.

Thxs for any help

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


[xwiki-users] StyleSheetExtension doesn't work on myxwiki.org ?

2015-09-30 Thread Pascal BASTIEN
Hello,

I attached a page with StyleSheetExtension object on 
http://coc.myxwiki.org/xwiki/bin/view/Sandbox/style but it doesn't work.
http://coc.myxwiki.org/xwiki/bin/view/Sandbox/style
http://coc.myxwiki.org/xwiki/bin/edit/Sandbox/style?editor=object
with simple CSS instructions:
p {
  color:red;
}

My "admin" user account need PR to use StyleSheetExtension object?

Thxs

Pascal B

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


[xwiki-users] Fw : Re: StyleSheetExtension doesn't work on myxwiki.org ?

2015-10-01 Thread Pascal BASTIEN
> > Indeed, when using “Always on this
> wiki” we currently require PR. I think we should allow it
> if you’re the owner of the wiki or have admin permissions.
> Maybe you could start a discussion thread on this or create
> a jira issue?
> >
> > For
> now, you can use “On demand” or “only on this page”
> and it should work fine.
> >

Then for the moment, do you have another way I can use to apply a css 
instruction on all my site ?

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


[xwiki-users] Fw : Re: About programming Rights on myxwiki.org...

2015-10-01 Thread Pascal BASTIEN

> 
> On 1 Oct 2015 at 08:51:01, vinc...@massol.net
> (vinc...@massol.net(mailto:vinc...@massol.net)) wrote:
> 

> > I’m ok on
> my side to allow Owner to be able to use the “Always on
> this wiki” visibility for JSX/SSX.
> Allowing PR is another matter and
> I’m -1 for that, it’s too dangerous. With PR you can do
> anything: hack the OS, delete all the wikis of the farm, etc
> (voluntarily or not!).

Yes I'm agree with you. It's too dangerous for groovy code and JAR...
But are there same risk if you allow only full velocity code+xwiki API?
(I don't know if some methods need PR anyway)


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


[xwiki-users] About programming Rights on myxwiki.org...

2015-10-01 Thread Pascal BASTIEN
Hi,

Like Vincent suggest, here a new discussion thread about PR for owner on 
myxwiki.org.

On my new fresh myxwiki.org site, I wanted apply a nice CSS on all the site 
with a StyleSheetExtension object, but without PR it is impossible (or more 
complicated: I must find a way).

I think that allow PR right on creator account (or user with admin right) will 
be helpful.
I think allow PR for only one member (creator ) will be fine because if 
something going wrong he will be the only interlocutor and responsable for his 
site deletion (if he is naughty one).
Another way to give some PR,  you can give them at github or Jirah contributors?
"We hosting your nice xwiki but if you want more you can give us a few pieces 
of code)"

Could you think/discuss about it?

Thxs


Pascal B.


En date de : Mer 30.9.15, vinc...@massol.net  a écrit :

 Objet: Re: [xwiki-users] StyleSheetExtension doesn't work on myxwiki.org ?
 À: "XWiki Users" 
 Cc: pbasnews-xw...@yahoo.fr
 Date: Mercredi 30 septembre 2015, 19h23
 
 > 
 > My "admin" user account need PR
 to use StyleSheetExtension object?
 Indeed, when using “Always on this
 wiki” we currently require PR. I think we should allow it
 if you’re the owner of the wiki or have admin permissions.
 Maybe you could start a discussion thread on this or create
 a jira issue?
 For now,
 you can use “On demand” or “only on this page” and
 it should work fine.
 Thanks-Vincent
 > Thxs
 > 
 > Pascal B
 
 
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Fw : Fw : Re: StyleSheetExtension doesn't work on myxwiki.org ?

2015-10-02 Thread Pascal BASTIEN
> > >
> 
> Then for the moment, do you have another way I can use to
> apply a css instruction on all my site ?
> 

I found a 2 way:
- simply one (working well): on  
http://.myxwiki.org/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin=Elements=XWiki
Add this line on HTML header:
  Custom/MyCss containing SSX 
object.
- and maybe (not tested): add an XWikiSkins objet on 
http://.myxwiki.org/xwiki/bin/edit/XWiki/XWikiPreferences?editor=object
and filled "style" field
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] How to add a button with confirmation to save my page?

2015-10-05 Thread Pascal BASTIEN
Hi,

I have my application with MyClass, MySheet and MyTemplate.
When I have a new page (based on MySheet/Class), in edit mode I can modify all 
my fields of Myclass Object but I want to add a button to save my page after 
confirmation...

For the moment I have a button to redirect in a new page BUT I want to save 
current page before redirect if the user agreed a confirmation box.

More precisely on my nice appli, on new page in edit mode, I have standard 
Save, Save and continue and cancel button and I want another one to ask on 
clik: "are you sure to save current fields modified on current page and open 
this another page"?
- if yes save current page, add a value in a field with velocity and save and 
redirect to another one.
- if No stay in edit mode

Do you have a way to recommend?
(perhaps I must try  $('#form').submit(function() { with jquery)  but I don't 
know if this save my page?

Thxs for any help.

Pascal B.


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


[xwiki-users] Fw : Re: Fw : Re: How to add a button with confirmation to save my page?

2015-10-06 Thread Pascal BASTIEN
I manage to launch save process of my page but I didn't manage to pass 
parameter in this process :-(

On my page in edit mode, I add a button with this JS code:
function SaveCurrentPage(MyForm, MyParam) {
  require(['jquery'], function ($) {
  
$('#inline').attr('action','/bin/save/FormSMQ/SMQ-M2-FAM-Mon+am%C3%A9lioration');
  //$('#inline').attr('method','get');
  $('#inline').submit();
  });
};
this code save current page and go in the view mode BUT I can NOT pass some 
parameters to my velocity code and update myClass object :-(

In the other way when I submit to view mode with
$('#inline').attr('action','/bin/view/FormSMQ/SMQ-M2-FAM-Mon+am%C3%A9lioration');
My current page is NOT saved but I can pass some parameter with hidden input (I 
can catch them with $request. in velocity code)




--- En date de : Mar 6.10.15, Marius Dumitru Florea 
<mariusdumitru.flo...@xwiki.com> a écrit :

> De: Marius Dumitru Florea <mariusdumitru.flo...@xwiki.com>
> Objet: Re: [xwiki-users] Fw : Re: How to add a button with confirmation to 
> save my page?
> À: "XWiki Users" <users@xwiki.org>
> Date: Mardi 6 octobre 2015, 12h23
> On Tue, Oct 6, 2015 at
> 1:01 PM, Pascal BASTIEN <pbasnews-xw...@yahoo.fr>
> wrote:
> > First thxs both  but it is not
> what I want try to do.
> >
> > I want to keep default button "Save,
> save and contine and Cancel" like usual.
> > With velocity I added a button  to update
> my class object on my page and redirect to another one. My
> button working well in view mode but I want to use it in
> edit mode, then I must save my page before my class object
> update and redirection if not all page modifications will be
> lost.
> >
> > My main
> problem if I rewrite my code in JS is that I can not update
> my class object field attached on my page.
> >
> > (It's a shame it
> doesn't exist an $xwiki.LaunchSaveCurrentPage)
> >
> > Can I launch
> "save page" with javascript? My idea: i launch
> save my page in JS from edit mode to view mode with param
> (do redirect on another page). With this way I can keep my
> nice existant velocity code.
> > Do you
> know how if I can launch "save page" in JS
> then?
> 
> > I see that a
> submit in JS go to preview mode, maybe I must modify the
> action target of #inline before submit?
> 
> The submit button name (e.g.
> name="action_save") is not included by
> default when you submit the form using
> JavaScript (because the form
> may have
> multiple submit buttons, like in your case, and the
> JavaScript code wouldn't know what button
> to indicate in the submit
> form unless you
> explicitly indicate it). You need to add the button
> name to the submit parameters when you make the
> AJAX save request.
> 
> Hope
> this helps,
> Marius
> 

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


[xwiki-users] Looking for Carousel on Xwiki

2015-11-20 Thread Pascal BASTIEN
Hello,

i want to tuse some Carousel/slider on Xwiki.
I find 2 of them:
- http://www.xwiki.org/xwiki/bin/view/Carousel/Slider I don't know if it is 
simple to use it
- and totem extension: 
http://extensions.xwiki.org/xwiki/bin/view/Extension/TotemApplication
but totem doesn't work on my xwiki 7.0.1 version :-(
A nice working xar example will be welcome to test :-)
Totem documentation is  clear except one important point: last step missing: 
howt to display our new totem page? with include but which one?

Thxs for your help or any carousel you use on your xwiki.

Pascal B

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


[xwiki-users] bootstrap and multiselect list + add livetable feature

2016-05-27 Thread Pascal BASTIEN
Hello,

With livetable on top of column we can use select list to choose one value to 
filter our table.

I use 'resultPage' option to use a custom query and I try to add a multiselect 
list to filter data with OR condition.

On top of column I wanted a multiselect list like this one:
 http://davidstutz.github.io/bootstrap-multiselect/#further-examples
but I have difficult to make it work (probably because prototype vs jquery).

I can add some option in my list (I modify ./skins/flamingo/macros.vm) but I 
didn't manage to display my multiselect list.

Do you have a js recommanded framework to use a multiselect list? It seem 
bootstrap don't have this kind of list.

Thxs.


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


[xwiki-users] need help about JS/webjar integration

2016-06-21 Thread Pascal BASTIEN
Hi,

about http://jira.xwiki.org/browse/XWIKI-13470

I can use https://silviomoreto.github.io/bootstrap-select/ JS if I copy js 
content in a JSX object between this stuff:
require(['jquery'], function ($) {
});

To PullRequesting I need to writing cleaner code: I mean "use RequireJS and 
WebJars API to load and use the bootstrap-select widget"

Then I copied bootstrap-select JAR to WEB-INF/lib and add add this 2 lines in 
./skins/flamingo/javascript.vm:
(bootstrap-select requires jQuery v1.8.0+, Bootstrap’s dropdown.js component, 
and Bootstrap's CSS.)
--
require.config({
  paths: {
'jquery': '#removeJsSuffix($services.webjars.url("jquery", 
"jquery${jsExtension}"))',
'bootstrap': '#removeJsSuffix($services.webjars.url("bootstrap", 
"js/bootstrap${jsExtension}"))',
'bootstrap-select': 
'#removeJsSuffix($services.webjars.url("bootstrap-select/1.10.0/js/bootstrap-select.js"))',


 shim: {
'bootstrap' : ['jquery'],
'bootstrap-select' : ['jquery'],
(or 'bootstrap-select' : ['jquery', 'bootstrap'],


I tested with minify version too with
shim: {
'bootstrap' : ['jquery'],
'bootstrap-select': {
  deps: ['jquery', 'bootstrap'],
  exports: 'bootstrap-select'
  },
http://requirejs.org/docs/api.html#config-shim
--

Unfortunaly when I use the webjar with this config, bootstrap-select doesn't 
work.

Do I miss something? 

(Source Page generated contain:
'bootstrap-select': 
'/xwiki/webjars/wiki%3Axwiki/bootstrap-select/1.10.0/js/bootstrap-select.js?r=1',
and my browser can read bootstrap-select.js content at this URL.)


(I tried to enables this too:

pluginsToDisable = ['collapse', 'dropdown', 'modal', 'tooltip', 'tab', 
'popover'] => pluginsToDisable = ['collapse',  'modal', 'tooltip', 'tab', 
'popover'] 

Any help are welcome.
Thxs


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


<    1   2   3   4   >