[xwiki-users] profile in a pop up

2010-03-04 Thread raphaelle

Hi everyone,

I'm working on a XEM platform 2.2.1 and I need to display the page of the
profile in a pop-up.
I know it's possible because I have this pop-up at the adress:
http://mydomain/xwiki/bin/admin/XWiki/XWikiPreferences?section=Users,
there's a table with the list of all my users, and I can edit them by
clickink on an icon, the edition is in a pop-up.
Problem is I can't find out where's the URL of this pop-up, because the code
of this page is based on the javascript:
   var ta = new XWiki.widgets.LiveTable($url, userstable,
displayUsers); 

I've read the documentation on XWiki.widgets.LiveTanle at his adress: 
http://svn.xwiki.org/svnroot/xwiki/platform/web/trunk/standard/src/main/webapp/resources/js/xwiki/table/livetable.js
http://svn.xwiki.org/svnroot/xwiki/platform/web/trunk/standard/src/main/webapp/resources/js/xwiki/table/livetable.js
 
but I haven't found what I was looking for: the part of code to display the
popup.

If anyone could give me some help...

In advance thanks

Raphaelle
  
-- 
View this message in context: 
http://n2.nabble.com/profile-in-a-pop-up-tp4675477p4675477.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


[xwiki-users] LDAP users with dot in username

2010-03-04 Thread Dilipkumar Jadhav
Hello folks,
Returning to the xwiki mailing list after a long time with a question
about LDAP authentication.
Our active directory has usernames with a dot (.) character. Would it
be possible to sync our XWiki with the active directory under this
scenario. If I am not mistaken, we would need to create equivalent
users in the XWiki for each user in the active directory.
And, XWiki does not accept a dot in the username field.
Any insight will be greatly appreciated. Thank you guys.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Livetable macro, custom classes, sorting

2010-03-04 Thread Hans-Peter Zorn
Hi,
I am using xwiki 2.1.1 and i am having problem with livetable and a simple
custom class.
Here is my code:

#set($collist = [Customer, Responsible, TargetDate, Activities, 
priority, _actions])
#set($colprops = {

  Customer : { type : text , size : 20, link : edit},
 Responsible : { type : list , class: XWiki.XWikiUsers},
 TargetDate: { type : date ,sortable:true, 
displayName:Target Date},
 Activities : { type : text },
  priority: {type: number },
 _actions : {actions: [copy,delete,rename,inline]}
  })
#set($options = { className:Task.TasksClass,
   rowCount: 15 })
#livetable(alldocs $collist $colprops $options)

It displays three documents, but as soon as I click on one of the other 
columns to sort the table, it gets empty.

For the allDocumentsSnippet it works.
I have no carriage returns or quotes in the fields that are to be displayed.
I tried with different options and also only two fields (customer and 
priority): the same happens.

Is this a known bug or did I misunderstand the livetable macro?
Thanks,
Hans-Peter




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


Re: [xwiki-users] LDAP users with dot in username

2010-03-04 Thread Thomas Mortagne
On Thu, Mar 4, 2010 at 17:46, Dilipkumar Jadhav
jadhav.dilipku...@gmail.com wrote:
 Hello folks,
 Returning to the xwiki mailing list after a long time with a question
 about LDAP authentication.
 Our active directory has usernames with a dot (.) character. Would it
 be possible to sync our XWiki with the active directory under this
 scenario. If I am not mistaken, we would need to create equivalent
 users in the XWiki for each user in the active directory.
 And, XWiki does not accept a dot in the username field.
 Any insight will be greatly appreciated. Thank you guys.

XWiki does not accept a dot in the page but LDAP authenticator has a
special handling of username with . so you will not have issue.

In short don't worry about . in ldap user name it's working ;)

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




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


Re: [xwiki-users] Livetable macro, custom classes, sorting

2010-03-04 Thread Jeremie BOUSQUET
Hi,

I think it's the same issue I encountered (see my other posts Still issue
in livetable...).

I did investigate a little, and in my understanding the sort query generated
by XWiki.LiveTableResultsMacros is broken when type of field is not text
(StringProperty).
It seems to me that the macro in this case do not properly retrieve the
field type, and so puts the default, StringProperty. Of course the query
returns no answer, and your livetable is empty.

In my case I corrected it in a very ugly way, for my particular use-case on
Dates properties. I did not find, though, exactly why the macro do not find
the correct type, but I think it might be linked to how the resultsmacros
page is called (with parameters like TargetDate_class=${propClassName}),
in this case it would more be a bug in the #livetable macro or in the
javascript.

I wanted to create a JIRA on this but I'd like some feedback from the wiki
team before :)

Jeremie

2010/3/4 Hans-Peter Zorn h...@gmx.org

 Hi,
 I am using xwiki 2.1.1 and i am having problem with livetable and a simple
 custom class.
 Here is my code:

 #set($collist = [Customer, Responsible, TargetDate, Activities,
 priority, _actions])
 #set($colprops = {

  Customer : { type : text , size : 20, link : edit},
 Responsible : { type : list , class: XWiki.XWikiUsers},
 TargetDate: { type : date ,sortable:true,
 displayName:Target Date},
 Activities : { type : text },
  priority: {type: number },
 _actions : {actions: [copy,delete,rename,inline]}
  })
 #set($options = { className:Task.TasksClass,
   rowCount: 15 })
 #livetable(alldocs $collist $colprops $options)

 It displays three documents, but as soon as I click on one of the other
 columns to sort the table, it gets empty.

 For the allDocumentsSnippet it works.
 I have no carriage returns or quotes in the fields that are to be
 displayed.
 I tried with different options and also only two fields (customer and
 priority): the same happens.

 Is this a known bug or did I misunderstand the livetable macro?
 Thanks,
 Hans-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


[xwiki-users] RSS feed on Tags

2010-03-04 Thread Jeremie BOUSQUET
Hello,

By browsing on Main.Tags in my 2.2.1 instance, I found that there was a RSS
Feed link for a specific tag, on each tag page.

But practically it seems not implemented, as what was returned was the
global wiki RSS, not restricted to a particular tag.

So I implemented it in Main.WebRss. Here is an extract of Main.WebRSS page
that treats tag parameter. As you can see it misses a correct $description
setting, because I don't know where is the translation ...

  #if($!{request.space} == ''  $!{request.tag} == '')
## RSS feed for the whole wiki
#set ($request = 'where 1=1 order by doc.date desc')
#set ($description = $msg.get('xe.rss.feed.description'))
  #elseif($!{request.tag} != '')
## RSS feed for a single tag
#set ($request = , BaseObject as obj, DBStringListProperty as tags,
IN(tags.list) tagsvalue where obj.name=doc.fullName and
obj.className='XWiki.TagClass' and tags.id.id=obj.id and tags.id.name='tags'
and tagsvalue='${request.tag}' order by doc.date desc)
#set ($description = RSS Feed for a specific tag)
  #else
## RSS feed for a single space
#set ($request = where doc.space='${request.space}' order by doc.date
desc)
#set ($description = $msg.get('xe.rss.space.description',
[$request.space]))
  #end


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


Re: [xwiki-users] Livetable macro, custom classes, sorting

2010-03-04 Thread Jeremie BOUSQUET
Again,
I eventually created a JIRA on this ...
http://jira.xwiki.org/jira/browse/XWIKI-4973


2010/3/4 Jeremie BOUSQUET jeremie.bousq...@gmail.com

 Hi,

 I think it's the same issue I encountered (see my other posts Still issue
 in livetable...).

 I did investigate a little, and in my understanding the sort query
 generated by XWiki.LiveTableResultsMacros is broken when type of field is
 not text (StringProperty).
 It seems to me that the macro in this case do not properly retrieve the
 field type, and so puts the default, StringProperty. Of course the query
 returns no answer, and your livetable is empty.

 In my case I corrected it in a very ugly way, for my particular use-case on
 Dates properties. I did not find, though, exactly why the macro do not find
 the correct type, but I think it might be linked to how the resultsmacros
 page is called (with parameters like TargetDate_class=${propClassName}),
 in this case it would more be a bug in the #livetable macro or in the
 javascript.

 I wanted to create a JIRA on this but I'd like some feedback from the wiki
 team before :)

 Jeremie

 2010/3/4 Hans-Peter Zorn h...@gmx.org

 Hi,
 I am using xwiki 2.1.1 and i am having problem with livetable and a simple
 custom class.
 Here is my code:

 #set($collist = [Customer, Responsible, TargetDate, Activities,
 priority, _actions])
 #set($colprops = {

  Customer : { type : text , size : 20, link : edit},
 Responsible : { type : list , class: XWiki.XWikiUsers},
 TargetDate: { type : date ,sortable:true,
 displayName:Target Date},
 Activities : { type : text },
  priority: {type: number },
 _actions : {actions: [copy,delete,rename,inline]}
  })
 #set($options = { className:Task.TasksClass,
   rowCount: 15 })
 #livetable(alldocs $collist $colprops $options)

 It displays three documents, but as soon as I click on one of the other
 columns to sort the table, it gets empty.

 For the allDocumentsSnippet it works.
 I have no carriage returns or quotes in the fields that are to be
 displayed.
 I tried with different options and also only two fields (customer and
 priority): the same happens.

 Is this a known bug or did I misunderstand the livetable macro?
 Thanks,
 Hans-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] profile in a pop up

2010-03-04 Thread Caleb James DeLisle
By popup you mean lightbox?
(the whole screen gets dark with the page displayed in the middle)

The pencil icon next to each user in the table on the admin users section is 
javascript injected by
http://svn.xwiki.org/svnroot/xwiki/platform/web/trunk/standard/src/main/webapp/resources/js/xwiki/usersandgroups/usersandgroups.js
specifically around line 306.

Hope that helps

Caleb


raphaelle wrote:
 Hi everyone,
 
 I'm working on a XEM platform 2.2.1 and I need to display the page of the
 profile in a pop-up.
 I know it's possible because I have this pop-up at the adress:
 http://mydomain/xwiki/bin/admin/XWiki/XWikiPreferences?section=Users,
 there's a table with the list of all my users, and I can edit them by
 clickink on an icon, the edition is in a pop-up.
 Problem is I can't find out where's the URL of this pop-up, because the code
 of this page is based on the javascript:
var ta = new XWiki.widgets.LiveTable($url, userstable,
 displayUsers); 
 
 I've read the documentation on XWiki.widgets.LiveTanle at his adress: 
 http://svn.xwiki.org/svnroot/xwiki/platform/web/trunk/standard/src/main/webapp/resources/js/xwiki/table/livetable.js
 http://svn.xwiki.org/svnroot/xwiki/platform/web/trunk/standard/src/main/webapp/resources/js/xwiki/table/livetable.js
  
 but I haven't found what I was looking for: the part of code to display the
 popup.
 
 If anyone could give me some help...
 
 In advance thanks
 
 Raphaelle
   

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


[xwiki-users] E-Mail Notification by Scheduler Job Script ?

2010-03-04 Thread Thilo

Hello,

I want to setup the Job Scheduler to send me an E-Mail every day to a
specific Adress.

But when i entered the following code of the MailSenderPlugin into the Job
Script Field, i get only one Message when I save the job and not every Time
the Job is fired. What am I doing wrong?

THe Code is:

sendTextMessage(Sender,m...@email.com,Subject,text)

I know that the script should be written in Groovy, but I dont know how.

Thanks for your help. 
-- 
View this message in context: 
http://n2.nabble.com/E-Mail-Notification-by-Scheduler-Job-Script-tp4676911p4676911.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


[xwiki-users] Programming rights needed for Copy Action

2010-03-04 Thread Meng Wu
Hi,

Why are programming rights needed to view the Copy Link? According to the 
user guide, Programming rights are described as privileges to use protected 
APIs  Groovy code in wiki pages. I read the JIRA at 
http://jira.xwiki.org/jira/browse/XE-374 and it seems that originally, users 
without PR weren't able to copy pages even though the copy link was showed, so 
the non-viewable feature was added as a fix.

What I don't understand is how copying action relates to using protected APIs 
and groovy code at all, or in other words, why the last editor of the page must 
have programming rights in order for the Copy Action to show up for anyone.

Thanks

Felix


  

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


Re: [xwiki-users] Programming rights needed for Copy Action

2010-03-04 Thread Sergiu Dumitriu
On 03/04/2010 09:54 PM, Meng Wu wrote:
 Hi,

 Why are programming rights needed to view the Copy Link? According
 to the user guide, Programming rights are described as privileges to
 use protected APIs  Groovy code in wiki pages. I read the JIRA at
 http://jira.xwiki.org/jira/browse/XE-374 and it seems that
 originally, users without PR weren't able to copy pages even though
 the copy link was showed, so the non-viewable feature was added as a
 fix.

 What I don't understand is how copying action relates to using
 protected APIs and groovy code at all, or in other words, why the
 last editor of the page must have programming rights in order for the
 Copy Action to show up for anyone.


That's just a bug, Copy should work without programming rights.

-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Programming rights needed for Copy Action

2010-03-04 Thread Meng Wu
Thanks Sergiu. Is there a jira bug number I can follow when the bug gets fixed?

Thanks,

Felix



- Original Message 
From: Sergiu Dumitriu ser...@xwiki.com
To: XWiki Users users@xwiki.org
Sent: Thu, March 4, 2010 4:05:36 PM
Subject: Re: [xwiki-users] Programming rights needed for Copy Action

On 03/04/2010 09:54 PM, Meng Wu wrote:
 Hi,

 Why are programming rights needed to view the Copy Link? According
 to the user guide, Programming rights are described as privileges to
 use protected APIs  Groovy code in wiki pages. I read the JIRA at
 http://jira.xwiki.org/jira/browse/XE-374 and it seems that
 originally, users without PR weren't able to copy pages even though
 the copy link was showed, so the non-viewable feature was added as a
 fix.

 What I don't understand is how copying action relates to using
 protected APIs and groovy code at all, or in other words, why the
 last editor of the page must have programming rights in order for the
 Copy Action to show up for anyone.


That's just a bug, Copy should work without programming rights.

-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
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] Programming rights needed for Copy Action

2010-03-04 Thread Sergiu Dumitriu
On 03/04/2010 11:25 PM, Meng Wu wrote:
 Thanks Sergiu. Is there a jira bug number I can follow when the bug gets 
 fixed?

Yes, http://jira.xwiki.org/jira/browse/XWIKI-3961


 - Original Message 
 From: Sergiu Dumitriuser...@xwiki.com
 To: XWiki Usersusers@xwiki.org
 Sent: Thu, March 4, 2010 4:05:36 PM
 Subject: Re: [xwiki-users] Programming rights needed for Copy Action

 On 03/04/2010 09:54 PM, Meng Wu wrote:
 Hi,

 Why are programming rights needed to view the Copy Link? According
 to the user guide, Programming rights are described as privileges to
 use protected APIs   Groovy code in wiki pages. I read the JIRA at
 http://jira.xwiki.org/jira/browse/XE-374 and it seems that
 originally, users without PR weren't able to copy pages even though
 the copy link was showed, so the non-viewable feature was added as a
 fix.

 What I don't understand is how copying action relates to using
 protected APIs and groovy code at all, or in other words, why the
 last editor of the page must have programming rights in order for the
 Copy Action to show up for anyone.


 That's just a bug, Copy should work without programming rights.


-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] LDAP users with dot in username

2010-03-04 Thread Dilipkumar Jadhav
Thanks for your prompt response Thomas...now I am relieved.
All I need to do is figure out how to configure LDAP with XWiki.
By the way, in case I have a user let's say - Jane Doe whose username in
Active Directory is Jane.Doe
Would I create a user of the same name called JaneDoe in XWiki or would I
create user called Jane.Doe?
Or am I misreading something here and don't need to create users at all in
XWiki...

On Thu, Mar 4, 2010 at 17:46, Dilipkumar Jadhav
jadhav.dilipku...@gmail.com wrote:
 Hello folks,
 Returning to the xwiki mailing list after a long time with a question
 about LDAP authentication.
 Our active directory has usernames with a dot (.) character. Would it
 be possible to sync our XWiki with the active directory under this
 scenario. If I am not mistaken, we would need to create equivalent
 users in the XWiki for each user in the active directory.
 And, XWiki does not accept a dot in the username field.
 Any insight will be greatly appreciated. Thank you guys.

XWiki does not accept a dot in the page but LDAP authenticator has a
special handling of username with . so you will not have issue.

In short don't worry about . in ldap user name it's working ;)

 ___
 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] Selectively Disabling Comments for users

2010-03-04 Thread Sunil Khiatani
Hi,

I would also like to selectively hide comments for certain users.  I have 
already disabled comments for all users as mentioned in the faq.  According to 
the following link, it is possible to selectively hide comments using a 
velocity script.  Can someone explain how it works, I can't find the Custom 
Display Attribute anywhere:

http://n2.nabble.com/Conditionally-hiding-content-tp2147464p4672859.html

Regards,

Sunil




This message was sent using IMP, the Internet Messaging Program.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] What is $xwiki.getXMLEncoded()'s purpose in url names?

2010-03-04 Thread Sergiu Dumitriu
On 03/02/2010 08:20 PM, Thomas Mortagne wrote:
 On Tue, Mar 2, 2010 at 18:25, Sergiu Dumitriuser...@xwiki.com  wrote:
 On 03/02/2010 05:01 PM, Joel Forsberg wrote:

 Greetings

 On my wiki using swedish characters for xwiki page titles give ugly but
 working entries in all panels, e.g. Backlinks Recent modifications and 
 My
 recent modifications

 An example is having:
Startsidor f#246;r v#229;ra intresseomr#229;den
 ...instead of the correct:
Startsidor för våra intresseområden

 Another example is putting thiss wiki code on top of a page:
= header thatlook uglyhere =

 The script responsible for for the texts in the panels is as follow:

 span class=panelitem
 a href=$rdoc.getURL('view')
$xwiki.getXMLEncoded($rdoc.displayTitle)
 /a/span

 I've noticed that changing the third line into only $rdoc.displayTitle will
 produce a nice looking entry, and $rdoc is set via

 #set($rdoc = $xwiki.getDocument($docname).getTranslatedDocument())

 Now, can anyone see a purpose of using getXMLEncoded() for this? As far as I
 have seen, it only breaks things.

 This is not caused by getXMLEncoded, it merely makes the problem
 visible. This method must be used in order to prevent other problems:
 Invalid XML, broken layout, XSS...

 The problem is that the code inside getDisplayTitle wrongly uses a XML
 escaping option.

 No, this is valid because the job of $rdoc.displayTitle is to produce
 xhtml content and theses are valid XML escapes.

Where does it say that it should produce xhtml content?

Assuming that it should produce xhtml, the behavior is inconsistent. If 
the title is placed in the document.title field, then it returns 
characters; if it is placed in the first heading, it returns escapes. If 
we use wiki syntax in the document.title, we get back wiki syntax; if we 
use wiki syntax in the first heading, we get back HTML. That is totally 
inconsistent and confusing.

This is an API design problem that should be discussed further on the 
dev list.



Going back to this specific problem, I think that it should be solved by 
using the plaintext output syntax, since inside a panel we're not 
interested in formatting or other markup inside the title, just the 
textual content.

 So you don't need to
 use getXMLEncoded because any xml content is already properly escaped
 (in xwiki/2.0 syntax).

I need to use getXMLEncoded because the title doesn't always come from 
the content.

 When you want a plain text version of the title you should use
 $rdoc.getRenderedTitle(plain/1.0).


-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] profile in a pop up

2010-03-04 Thread Jeremie BOUSQUET
You can also use the ModalBox application:
http://code.xwiki.org/xwiki/bin/view/Applications/ModalBoxApplication

Jeremie

2010/3/4 Caleb James DeLisle calebdeli...@lavabit.com

 By popup you mean lightbox?
 (the whole screen gets dark with the page displayed in the middle)

 The pencil icon next to each user in the table on the admin users section
 is javascript injected by

 http://svn.xwiki.org/svnroot/xwiki/platform/web/trunk/standard/src/main/webapp/resources/js/xwiki/usersandgroups/usersandgroups.js
 specifically around line 306.

 Hope that helps

 Caleb


 raphaelle wrote:
  Hi everyone,
 
  I'm working on a XEM platform 2.2.1 and I need to display the page of the
  profile in a pop-up.
  I know it's possible because I have this pop-up at the adress:
  http://mydomain/xwiki/bin/admin/XWiki/XWikiPreferences?section=Users,
  there's a table with the list of all my users, and I can edit them by
  clickink on an icon, the edition is in a pop-up.
  Problem is I can't find out where's the URL of this pop-up, because the
 code
  of this page is based on the javascript:
 var ta = new XWiki.widgets.LiveTable($url, userstable,
  displayUsers);
 
  I've read the documentation on XWiki.widgets.LiveTanle at his adress:
 
 http://svn.xwiki.org/svnroot/xwiki/platform/web/trunk/standard/src/main/webapp/resources/js/xwiki/table/livetable.js
 
 http://svn.xwiki.org/svnroot/xwiki/platform/web/trunk/standard/src/main/webapp/resources/js/xwiki/table/livetable.js
  but I haven't found what I was looking for: the part of code to display
 the
  popup.
 
  If anyone could give me some help...
 
  In advance thanks
 
  Raphaelle
 

 ___
 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] Selectively Disabling Comments for users

2010-03-04 Thread Caleb James DeLisle
Comments, tags and other extras are handled in the docextra.vm template.
http://platform.xwiki.org/xwiki/bin/view/DevGuide/Scripting#HControllingWhichSectionstoDisplay
You can create a velocity script to test if the user is a member of a given 
group and disable comments if not.

Caleb


Sunil Khiatani wrote:
 Hi,
 
 I would also like to selectively hide comments for certain users.  I have 
 already disabled comments for all users as mentioned in the faq.  According 
 to the following link, it is possible to selectively hide comments using a 
 velocity script.  Can someone explain how it works, I can't find the Custom 
 Display Attribute anywhere:
 
 http://n2.nabble.com/Conditionally-hiding-content-tp2147464p4672859.html
 
 Regards,
 
 Sunil
 
 
 
 
 This message was sent using IMP, the Internet Messaging Program.
 ___
 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] E-Mail Notification by Scheduler Job Script ?

2010-03-04 Thread Jeremie BOUSQUET
Hello,

Did you click on Schedule for the job to be active, after you created it ?

To call it in Groovy I believe you can make something like:

xwiki.mailsender.sendTextMessage(...)

Jeremie

2010/3/4 Thilo ch...@gmx.de


 Hello,

 I want to setup the Job Scheduler to send me an E-Mail every day to a
 specific Adress.

 But when i entered the following code of the MailSenderPlugin into the Job
 Script Field, i get only one Message when I save the job and not every Time
 the Job is fired. What am I doing wrong?

 THe Code is:

 sendTextMessage(Sender,m...@email.com,Subject,text)

 I know that the script should be written in Groovy, but I dont know how.

 Thanks for your help.
 --
 View this message in context:
 http://n2.nabble.com/E-Mail-Notification-by-Scheduler-Job-Script-tp4676911p4676911.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] Is there a way to dynamically change the values on a static list or on any other property of a xwiki class?

2010-03-04 Thread Caleb James DeLisle


Abel Solórzano Astorga wrote:
 Thanks Caleb,
 
 I follow your recommendation, but I am getting a BaseClass with no
 properties.
 The class I am creating it is supposed to have 4 properties.
 
 I am using the folling code to use the class:
 
 *...*
 
 *docname = xwiki.getUniquePageName(ValidationSample, TestClass)
 valdoc = xwiki.getDocument(ValidationSample. + docname)
 ok = valdoc.newObject(ValidationSample.TestClass)
 ok = valdoc.updateObjectFromRequest(ValidationSample.TestClass)*
 *
 ...
 
 valdoc.use(ValidationSample.TestClass)*
 
 ValidationSample.TestClass has 4 properties (2 TextAreas and 2 a Static
 Lists).
 
 Then to get the property that I need to dynamically change:
 
 *field = valdoc.getDocument().getxWikiClass().get(Project)*
 
 But I get a null value from *
 valdoc.getDocument().getxWikiClass().get(Project)*. The BaseClass returned
get calls getField().getValue() maybe the problem is that BaseCollection is 
used for objects and xclasses and
get is only useful for objects. Try getField()

 by *valdoc.getDocument().getxWikiClass() *is a
 *ValidationSample.TestClass *class
 but the Properties collection is empty.

Because of a bug in groovy you can view private fields so you can look directly 
at the fields in the class with

for(String name : valdoc.getDocument().getxWikiClass().fields.keySet()) {
println(name);
}


Also if you want to change the prettyName of a class property (for example),
you would have to cast the field to PropertyClass (didn't test this but it 
should work.)

((PropertyClass) 
valdoc.getDocument().getxWikiClass().getField()).setPrettyName(new name);


Caleb

 
 Regards,
 
 Abel
 
 On Wed, Mar 3, 2010 at 1:04 AM, Caleb James DeLisle 
 calebdeli...@lavabit.com wrote:
 
 I can tell you that it can be done, anything which can be done by
 the user can be done with groovy.

 document.getxWikiClass().get(propertyName) returns an object of
 type element.

 http://maven.xwiki.org/site/xwiki-core-parent/xwiki-core/apidocs/com/xpn/xwiki/api/Element.html

 I think you need to drop out of the api section into the core (which
 requires programming rights but so does groovy)
 document.getDocument().getxWikiClass()
 gives you an object of type BaseClass which I think is what you are
 after.

 http://maven.xwiki.org/site/xwiki-core-parent/xwiki-core/apidocs/com/xpn/xwiki/objects/classes/BaseClass.html


 Caleb


 Abel Solórzano Astorga wrote:
 Hi everybody,

 Is there a way to dynamically (through groovy code) change the values on
 a
 static list or on any other property of a xwiki class?

 I am using *field = document.getxWikiClass().get(propertyName)* to get
 the
 property.

 document is of type* com.xpn.xwiki.api.Document*.

 But when I try to change the value using *
 field.getPropertyClass().setValues(val1|val2|val3)* I get a *null*
 value
 from* field.getPropertyClass()*

 I am following the information on
 http://www.mail-archive.com/users@xwiki.org/msg10692.html

 I am using groovy on xwiki 2.0.2.24645

 Regards

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