Re: [xwiki-users] Custom display

2014-06-19 Thread Marius Dumitru Florea
On Tue, Jun 17, 2014 at 2:00 PM, Gerritjan Koekkoek
gerritjankoekk...@gmail.com wrote:
 Hi
 Op 17 jun. 2014, om 07:59 heeft Marius Dumitru Florea 
 mariusdumitru.flo...@xwiki.com het volgende geschreven:

 On Mon, Jun 16, 2014 at 4:53 PM, Gerritjan Koekkoek
 gerritjankoekk...@gmail.com wrote:
 Hi,
 Yes, this surely helps but i fail to get it work as I hope it can.
 I have generated a app with App Within Minutes.

 In the sheet there is a construct like this:
 {{velocity}}
 {{html wiki=true}}
 #set ($discard = $doc.use('TestStarRating.TestStarRatingClass'))
 #set ($discard = $services.localization.use('document', 
 'TestStarRating.TestStarRatingTranslations'))
 (% class=xform %)
 (((
  ; label 
 for=TestStarRating.TestStarRatingClass_0_Rating$escapetool.xml($doc.displayPrettyName('Rating',
  false, false))/label
  : $doc.display('Rating')
 )))
 {{/html}}
 {{/velocity}}

 :$doc.display(‘Rating’) is ‘smart’ as it knows when in ‘View’ and ‘Edit’ 
 mode.

 If I would go to the class and modify Custom Display

 How can I keep the ‘smartness’ of $doc.display?

 Have you really looked at the code of the existing custom displayers
 found on extensions.xwiki.org ? i.e. did you download the source XAR
 and imported it in your wiki to check the code? It doesn't seem so,
 because you would have seen something like:

 #if ($type == 'edit’)
 Yes, have looked at it and this is what puzzles me…
 In the generated sheet code from app-within minutes there is no notion of 
 this…
 I think basically my question is:

 If I keep $doc.display(‘rating’) in the sheet
 And build a IF then else for different behavior in View and Edit mode…will 
 this work?

If it works for the custom displayers published on
extensions.xwiki.org then it should work for you too. Have you tried
to use one of them? You don't have to do anything in the sheet except
calling $doc.display('propertyThatHasACustomDisplayer') . There are a
couple of Velocity variables available to the code of the custom
displayer. $type is one of them. Check the code of existing custom
displayers for the rest (if you don't see any #set for a variable then
it means it's predefined).

 Or do I need to replace in the sheet $doc.display(‘rating’) with something 
 else.
 In the sheet I know I can get the ‘old’ value (if any) and display it since I 
 have the context of $doc
 In the Class i’m not knowing to what context variable I should refer to 
 present the old value?

 Does my question/struggle make sense?

 I have the feeling that a velocity script in the custom display does not 
 have notion of $doc? Or can I use this context variable?

 The important change I want to achieve is change the ‘radio button’ 
 behavior’ in a star-rating behavior.
 Important is that this should stay visible in Read-mode as the numeric 
 result 3 is less informative as seeing three stars.

 I’m inspired by this code:
 http://codepen.io/lsirivong/pen/ekBxI

 It uses CSS to style radiobuttons as star rating (and a small javascript)
 But it requires radiobuttons to stay visible in view mode…


 Op 10 jun. 2014, om 14:33 heeft Marius Dumitru Florea 
 mariusdumitru.flo...@xwiki.com het volgende geschreven:

 I don't think there is a documentation unfortunately, but there are 3
 examples on 
 http://extensions.xwiki.org/xwiki/bin/view/Main/WebHome#|t=extensionsp=1l=30s=doc.creationDated=descname=custom+display
 .

 Hope this helps,
 Marius

 On Thu, Jun 5, 2014 at 11:06 AM, Gerritjan Koekkoek
 gerritjankoekk...@gmail.com wrote:
 Hi

 We are trying to develop questionnaires within xwiki.
 In order to get clear answers from people we prefer static lists above 
 text
 fields which would be more difficult to analyze.

 As a approach we start with appWithinMinutes and add attributes of type
 static list

 Use case 1:
 When we want the user to select one of a limited set of options we typical
 use radio button as input control.

 In edit mode this works fine.
 But in collaborative mode this does not work very well for us.
 What we mean by collaborative mode?
 We have patients discussing the questionnaire with the expert.
 Over the internet they both look at the page which holds the questionnaire
 already completed by the patient...
 But since default XWiki is showing only the value selected discussions
 about why the patient chose the one option above the other are too
 difficult.
 We would like the radiobuttons view in edit mode, but disabled for
 modification; especially since in view mode changing the elected option...

 Would it be possible to modify the class and add something in the Custom
 Display?
 Is there a useful document on how the custom display option for classes
 works?

 Use case 2:
 Some questions are of the type How much would you agree
 Then the user can select between totally disagree, somewhat disagree,
 neutral, somewhat agree totally agree.
 We have now selected a static list with 5 options labeled as above...
 But on the internet we often see sliders that can be put in 5 positions
 (from 

Re: [xwiki-users] I can not relaunch distribution wizard with xwiki 6.0

2014-06-19 Thread Pascal BASTIEN
My problem was that I transfer my database and my permanentDirectory to my 
dataserver, they change the path and forget to install UI on DW.
I manage to relaunch the DW: I delete /home/data_xwiki/extension to
Thxs.




 De : Thomas Mortagne thomas.morta...@xwiki.com
À : Pascal BASTIEN pbasnews-xw...@yahoo.fr; XWiki Users users@xwiki.org 
Envoyé le : Mercredi 18 juin 2014 12h08
Objet : Re: [xwiki-users] I can not relaunch distribution wizard with xwiki 6.0
 

DW steps are enabled only when there is something to do, if you
already installed the UI you will not get that step again.


On Wed, Jun 18, 2014 at 11:27 AM, Pascal BASTIEN
pbasnews-xw...@yahoo.fr wrote:
 Hello,

 deletion of /home/data_xwiki/jobs/status/distribution/status.xml doesn't 
 relaunch distribuution wizard on tomcat restart


 Note: /webapps/xwiki/WEB-INF/xwiki.propertie indicate:
 environment.permanentDirectory=/home/data_xwiki/

 Is it a bug or are they a new method?


 NB:  deletion of /home/data_xwiki/jobs/status/distribution subdirectory ever 
 doesn't work

 Thxs

 Pascal BASTIEN
 ___
 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] [myxwiki] new wiki request

2014-06-19 Thread Ronald D . Smith
Hi,

• description: Bristol Action of Bristol Township near Canandaigua, NY USA.  
Bristol Action is an unofficial non-profit group working to protect the 
environment in Bristol Township.  We want to create a web site that augments 
our page on FaceBook.  This site will contain information regarding the latest 
issues regarding High Volume Hydrofracturing, HVHF or ‘Fracking’  in our 
township and New York State.  It will also contain information about 
alternative energy sources available in our area. Ron Smith will be the 
technical person as he has developed computer software for over 40 years.  We 
will also have several people (no more than 5) updating content on the site.  
We would like to use the mywiki community farm to host this web site.

• owner name: smithrond

• wiki name: bristolaction(if this is not available, then usany 
bristolaction)

Please let me know what else you need to set up a wiki on .myxwiki.org.

Thanks, 

Ronald D. Smith
ron.rdssoftw...@gmail.com

PS: my apologies for not understanding the instructions on the mywiki.org page, 
http://myxwiki.org/xwiki/bin/view/Main/WebHome.  I was expecting a link in step 
1, Register on myxwiki.org (this wiki), that would take me to the page where I 
could register.  Not finding anywhere to register, I followed the link in step 
2 to the XWiki user mailing list where I registered.  Today, I registered on 
the XWiki Enterprise as smithrond and experimented with the sandbox.  I found 
it would meet our needs.  So I hope smithrond is what was meant by registering 
in step 1.  Please accept this PS as feedback, not criticism. I maintain web 
sites myself and find it is hard to learn what the visitors are experiencing 
unless they tell me what confused them.  Thanks.




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