Re: [xwiki-users] Confusion over XWord versions
Hi Paul, I tested xword in the past, but I had the same inconviniences you mention. About the versions I tested both versions and I have found problems with uploading images too. Everything else was working fine. So I asked here http://www.mail-archive.com/users@xwiki.org/msg11450.html, but I couldn't find a solution there. Then, I created an issue. That issue is still open at http://jira.xwiki.org/jira/browse/XOFFICE-226. If you have the same issue, you can vote for it and that increase the posibility that somebody work on it. I finally ended up using this feature http://code.xwiki.org/xwiki/bin/view/Applications/OfficeImporterApplication#HHowtouseto import office documents. The tables are not exported properly, but I can live with that. Besides, I read that has some improvements on version 2.5. You should also see this http://platform.xwiki.org/xwiki/bin/view/Features/OfficeImporter#HOfficeImporterApplication. I am not sure, but I think it is the same feature that I am using with a different interface. Regards, On Wed, Nov 10, 2010 at 8:48 PM, Paul Harris harris...@gmail.com wrote: Hi all, I've been looking for a wiki that simple MS Office users can use. XWord is a brilliant idea and my friends jumped into it like ducks into a pond! The familiarity of the MS Word really helped break down the barriers of learning wikis. However, I am totally confused about what version of XWord should be installed. On the one hand, there is this version that I assume is old: http://xoffice.xwiki.org/xwiki/bin/view/XWord/ the links point to IP addresses rather than a host name!! then there is two versions here: http://www.xwiki.org/xwiki/bin/view/Main/Download#HXWikiOffice For XOffice 1.2 M1, the link points to XWord 1.0 For XOffice 1.1.1, the link points to XWord 1.1 so the Latest seems to give me an older version. I believe this is the one that I installed, and we have found problems with uploading images from XWord. We are going to try the other version, but now I'd like to know: where is version 1.2M1 ? Which one should I be using? I checked the RoadMap, it looks a bit out of date. Is there anyone working on XWord? This is a killer feature! I don't see any other wikis with this sort of feature. cheers Paul ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] How to add a Dialog Box similar to Add New User Dialog using groovy or velocity
Hi All, I want to show a dialog window similar to the one that is shown when you want to add a user. A Registration window is shown. I was looking for documentation on how to do that but I couldn't find it. So I used the Modal Box component. But I want to keep the consistency on the look of my xwiki site. Could somebody point me some documentation on how to add a dialog window similar to the one that is shown when you want to add a user? I want to show the dialog window using groovy or velocity code, if possible. Regards, Abel ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Create application similar to attach file application
Than you very much Ricardo, I appreciate your inputs. Must I been able to edit the description for already attached files? Yes, you should be able to edit it. I've not been able to get the description edited. The ModalBox opens curretly, it allows enter a new description, but the OK button add only two new attachment releases, but the description remains untouched. I tested the application on the xwiki of our company and it works. I am going to test it on a clean installation of xwiki to trobleshoot that issue. Check this and feel free to test it: http://epecnetcore.environmentalchange.net:8080/xwiki/bin/view/ICT/HasAttachmenthttp://epecnetcore.environmentalchange.net:8080/xwiki/bin/view/ICT/HasAttachment The application is not working for me. I get Failed to execute the [groovy] macro error. I think it would help to understand how attachments work and it will be easy to propose to add the possibility of adding a description to each attached file in the new structure. Do you now the official procedure to propose a new feature on xwiki? I am going to work in the things you mentioned (I need to figure out how to use the LightBox component). And after that I am going to create an xwiki page for the macro. Hopefully it can be usefull for somebody else. On Fri, Nov 5, 2010 at 3:05 AM, [Ricardo Rodriguez] eBioTIC. ricardo.rodrig...@ebiotic.net wrote: Just one more tip... You must be aware of this discussion and some other initiated by Caleb... http://markmail.org/thread/kexhs7bmww3i35ng I think it would help to understand how attachments work and it will be easy to propose to add the possibility of adding a description to each attached file in the new structure. Hope this helps! Ricardo Abel Solórzano Astorga wrote: Hi Ricardo, To use the application you should put the following code on your XWiki page: {{FileStorage/}} I tested on XWiki 2.3, 2.4 and 2.5 versions until now and is working fine. The application let you add a description to an attachment. It presents the user a textarea to write the description and a file input component to choose the file to attach. To attach the file with the description the user should click the Attach button. There is some kind of validation when the user try to attach the file. It is not posible to attach a file with an empty description or a description that is more than 255 characters. Below the component that let you attach files, there is a table that has two columns: File Name and Description of File. Next to each row there are two icons a pencil and a red cross (XWiki icons). If you click the pencil you can edit the description for the corresponding attachment (A modal box appears). If you click the red cross the attachment is deleted. The application use the same logic as the Attach files to this document components on the Attachments section at the bottom of the xwiki pages. So the attachment are also shown in the Attachments section. I had some problems uploading files bigger than 16M. So I follow the suggestions on the following page http://www.mail-archive.com/users@xwiki.org/msg04047.html. You can find an image of the application at http://dl.dropbox.com/u/3688604/file-storage.PNG. About the LightBox, I would preffer to use it instead of the ModalBox. But until now I couldn't find an example of how to use it. Somebody knows if there is some documentation regarding the LightBox component? Somebody knows which is the component that is used on the pop up dialog that is shown when you want to add a new user. Is that the LightBox component? Let me know if you need something else. Regards, Abel On Thu, Nov 4, 2010 at 2:02 AM, [Ricardo Rodriguez] eBioTIC. ricardo.rodrig...@ebiotic.net wrote: Abel Solórzano Astorga wrote: Hi, I finally finish a little application that let you attach files to an XWiki page and add, edit or delete a comment for the attachment. I didn't have much time to create a page for the app on the xwiki server. Maybe in the future. But I want to put the application online in case someone need that functionality (I know Ricardo need it :) ). Thanks! Please, Abel, even though you have no time to create now that page, could you provide some guideline about how to use your application and how we do must expect? I've downloaded it a imported in a XE 2.6-SNAPSHOT.32286 installation. ModalBox seems to work fine, but I'm not able to understand how to use your application. As for the use of ModalBox. Taking into account that XWiki is making extensive use of LightBox (http://www.lokeshdhakar.com/projects/lightbox2/), has you considered to use it to get a more consistent appearance? Thanks again! I would like to collaborate by creating a XWiki page for such an application once I understand how to use it! The xar file of the File Storage application (I called like
Re: [xwiki-users] Create application similar to attach file application
Hi Ricardo, To use the application you should put the following code on your XWiki page: {{FileStorage/}} I tested on XWiki 2.3, 2.4 and 2.5 versions until now and is working fine. The application let you add a description to an attachment. It presents the user a textarea to write the description and a file input component to choose the file to attach. To attach the file with the description the user should click the Attach button. There is some kind of validation when the user try to attach the file. It is not posible to attach a file with an empty description or a description that is more than 255 characters. Below the component that let you attach files, there is a table that has two columns: File Name and Description of File. Next to each row there are two icons a pencil and a red cross (XWiki icons). If you click the pencil you can edit the description for the corresponding attachment (A modal box appears). If you click the red cross the attachment is deleted. The application use the same logic as the Attach files to this document components on the Attachments section at the bottom of the xwiki pages. So the attachment are also shown in the Attachments section. I had some problems uploading files bigger than 16M. So I follow the suggestions on the following page http://www.mail-archive.com/users@xwiki.org/msg04047.html. You can find an image of the application at http://dl.dropbox.com/u/3688604/file-storage.PNG. About the LightBox, I would preffer to use it instead of the ModalBox. But until now I couldn't find an example of how to use it. Somebody knows if there is some documentation regarding the LightBox component? Somebody knows which is the component that is used on the pop up dialog that is shown when you want to add a new user. Is that the LightBox component? Let me know if you need something else. Regards, Abel On Thu, Nov 4, 2010 at 2:02 AM, [Ricardo Rodriguez] eBioTIC. ricardo.rodrig...@ebiotic.net wrote: Abel Solórzano Astorga wrote: Hi, I finally finish a little application that let you attach files to an XWiki page and add, edit or delete a comment for the attachment. I didn't have much time to create a page for the app on the xwiki server. Maybe in the future. But I want to put the application online in case someone need that functionality (I know Ricardo need it :) ). Thanks! Please, Abel, even though you have no time to create now that page, could you provide some guideline about how to use your application and how we do must expect? I've downloaded it a imported in a XE 2.6-SNAPSHOT.32286 installation. ModalBox seems to work fine, but I'm not able to understand how to use your application. As for the use of ModalBox. Taking into account that XWiki is making extensive use of LightBox (http://www.lokeshdhakar.com/projects/lightbox2/), has you considered to use it to get a more consistent appearance? Thanks again! I would like to collaborate by creating a XWiki page for such an application once I understand how to use it! The xar file of the File Storage application (I called like that) is at http://dl.dropbox.com/u/3688604/file-storage.xar. By the way you need to have the ModalBox Application installed. The ModalBox application can be found at http://code.xwiki.org/xwiki/bin/view/Applications/ModalBoxApplication. Let me know if you have any doubt or comment. On Fri, Aug 20, 2010 at 12:20 AM, Abel Solórzano Astorga abelsolorz...@gmail.com wrote: Hi, I have the application almost working :). I just need to figure out one thing that I asked in here. I 'll be glad to share the code with the community and with you once it is finish. Regards, On Tue, Aug 10, 2010 at 1:14 PM, [Ricardo Rodriguez] eBioTIC. ricardo.rodrig...@ebiotic.net wrote: Hi! Abel Solórzano Astorga wrote: I appreciate you take the time to answer my question. You gave me part of the solution :). The other part is in here http://www.mail-archive.com/users@xwiki.org/msg02301.html, in case someone need to do a similar XWiki application. Great to know I've been of any help! :-) BTW, have you then manage to get this application working? Are you planning to share it with the community? At least it will be helpful for me to get fileUploadPlugin or an application allowing to add descriptions to the uploaded files. Thanks! Cheers, Ricardo -- Ricardo Rodríguez CTO eBioTIC. Life Sciences, Data Modeling and Information Management Systems ___ 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 -- Ricardo Rodríguez CTO eBioTIC. Life Sciences, Data Modeling and Information Management Systems ___ users
Re: [xwiki-users] Create application similar to attach file application
Hi, I finally finish a little application that let you attach files to an XWiki page and add, edit or delete a comment for the attachment. I didn't have much time to create a page for the app on the xwiki server. Maybe in the future. But I want to put the application online in case someone need that functionality (I know Ricardo need it :) ). The xar file of the File Storage application (I called like that) is at http://dl.dropbox.com/u/3688604/file-storage.xar. By the way you need to have the ModalBox Application installed. The ModalBox application can be found at http://code.xwiki.org/xwiki/bin/view/Applications/ModalBoxApplication. Let me know if you have any doubt or comment. On Fri, Aug 20, 2010 at 12:20 AM, Abel Solórzano Astorga abelsolorz...@gmail.com wrote: Hi, I have the application almost working :). I just need to figure out one thing that I asked in here. I 'll be glad to share the code with the community and with you once it is finish. Regards, On Tue, Aug 10, 2010 at 1:14 PM, [Ricardo Rodriguez] eBioTIC. ricardo.rodrig...@ebiotic.net wrote: Hi! Abel Solórzano Astorga wrote: I appreciate you take the time to answer my question. You gave me part of the solution :). The other part is in here http://www.mail-archive.com/users@xwiki.org/msg02301.html, in case someone need to do a similar XWiki application. Great to know I've been of any help! :-) BTW, have you then manage to get this application working? Are you planning to share it with the community? At least it will be helpful for me to get fileUploadPlugin or an application allowing to add descriptions to the uploaded files. Thanks! Cheers, Ricardo -- Ricardo Rodríguez CTO eBioTIC. Life Sciences, Data Modeling and Information Management Systems ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Create application similar to attach file application
Hi, I have the application almost working :). I just need to figure out one thing that I asked in here. I 'll be glad to share the code with the community and with you once it is finish. Regards, On Tue, Aug 10, 2010 at 1:14 PM, [Ricardo Rodriguez] eBioTIC. ricardo.rodrig...@ebiotic.net wrote: Hi! Abel Solórzano Astorga wrote: I appreciate you take the time to answer my question. You gave me part of the solution :). The other part is in here http://www.mail-archive.com/users@xwiki.org/msg02301.html, in case someone need to do a similar XWiki application. Great to know I've been of any help! :-) BTW, have you then manage to get this application working? Are you planning to share it with the community? At least it will be helpful for me to get fileUploadPlugin or an application allowing to add descriptions to the uploaded files. Thanks! Cheers, Ricardo -- Ricardo Rodríguez CTO eBioTIC. Life Sciences, Data Modeling and Information Management Systems ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] How to access the com.xpn.xwiki.api.Document of the page where a Rendering Macro is included
Thanks a lot Thomas, it works perfect. On Fri, Aug 20, 2010 at 1:37 AM, Thomas Mortagne thomas.morta...@xwiki.comwrote: In the meantime you could do the following to get the current document in groovy: {{velocity}}$xcontext.put(currentdocument, $doc){{/velocity}} {{groovy}}print xcontext.currentdocument.toString();{{/groovy}} On Fri, Aug 20, 2010 at 09:32, Thomas Mortagne thomas.morta...@xwiki.com wrote: Hmm seems to be related to groovy (and probably other non velocity languages) actually, i will look at it. On Fri, Aug 20, 2010 at 09:28, Thomas Mortagne thomas.morta...@xwiki.com wrote: Hi, On Fri, Aug 20, 2010 at 02:24, Abel Solórzano Astorga abelsolorz...@gmail.com wrote: Hi, I want to know how to access the *com.xpn.xwiki.api.Document* of the page where a *Rendering Macro* is included. I created a macro using the documentation at http://platform.xwiki.org/xwiki/bin/view/DevGuide/WikiMacroTutorial. The problem is that when I try to access the *doc* object inside the Macro I am getting the doc of the XWiki page where the Macro was defined. But I want doc object of the XWiki page where the Macro is included. If you need more details please let me know. I appreciate the help you can give me :). Well i can't reproduce your issue. I wrote a macro in http://tuska.myxwiki.org/xwiki/bin/view/view/MacrosToto with {{velocity}}$doc{{/velocity}} as macro code and when i use it in http://tuska.myxwiki.org/xwiki/bin/view/view/MacrosTotoTest it print me view.MacrosTotoTest which seems to be what you want. Regards, Abel ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users -- Thomas Mortagne -- Thomas Mortagne -- Thomas Mortagne ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Space drop down list on Main.WebSearch page shows all the XWiki spaces ignoring user rights
Hi, I have a question about the *space drop down list filter* on Main.WebSearch page (You can see what I mean by *space drop down list filter *at http://dl.dropbox.com/u/3688604/websearch-page.png). At the moment the drop down list shows all the spaces, even the ones that the user is not allow to view. I want to be able to show in that filter just the spaces that the current user is allow to view. How can I achieve that? Thanks in advance! Regards, Abel ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] How to access the com.xpn.xwiki.api.Document of the page where a Rendering Macro is included
Hi, I want to know how to access the *com.xpn.xwiki.api.Document* of the page where a *Rendering Macro* is included. I created a macro using the documentation at http://platform.xwiki.org/xwiki/bin/view/DevGuide/WikiMacroTutorial. The problem is that when I try to access the *doc* object inside the Macro I am getting the doc of the XWiki page where the Macro was defined. But I want doc object of the XWiki page where the Macro is included. If you need more details please let me know. I appreciate the help you can give me :). Regards, Abel ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Create application similar to attach file application
I appreciate you take the time to answer my question. You gave me part of the solution :). The other part is in here http://www.mail-archive.com/users@xwiki.org/msg02301.html, in case someone need to do a similar XWiki application. On Sat, Aug 7, 2010 at 3:01 AM, [Ricardo Rodriguez] eBioTIC. ricardo.rodrig...@ebiotic.net wrote: Hi! Abel Solórzano Astorga wrote: Hi, I want to create an application similar or based on the attachment panel application at the bottom of the xwiki pages. The application should let the user select the file to upload to the xwiki server and write a description of the file. Then, the file name and description should be automatically added to a table. The first column of the table is the file name, that is a link to the file. The second column of the table is the description of the file. So, the table is like a repository of the files and its respective descriptions. My question is. Is there a macro or code snipped to add a file to the attachment panel application? I don't understand well your question. It seems to me that could be reduced to how add a comment to an attachment event and retrieve it together with the filename. I guess this comment must be linked to each document version, not to the attachment name as this is shared by all the releases of a document. It is easy to get the filenames of the attached files for a page using XML-RPC following this example... http://platform.xwiki.org/xwiki/bin/view/Features/XMLRPCJavaExamples#HAttachment:ListAttachmentsForPage Or simply using this code snip (sorry, I don't remember who sent it to me! I'm looking for it in xwiki.org site without success): * #set($attachments = $doc.attachmentList) #if($attachments.size()0) #foreach ($attach in $attachments) span class=namea href=$doc.getAttachmentURL(${attach.filename}, download) title=$msg.get(downloadthisattachment)#packName($attach.filename)/a/spanbr #end #end * About how to add a comment to each attachment event and retrieve it, sorry, I can't be of any help. I don't now even if this can be easy using the current data model. Now, it is possible to retreive version, size, author and date, but I don't know how to add and retreive a description/comment for each of them. I must recognized that I've been from XWiki development for a while, but I hope this could be helpful for you. Greetings, Ricardo -- Ricardo Rodríguez CTO eBioTIC. Life Sciences, Data Modeling and Information Management Systems ___ 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] Create application similar to attach file application
Hi, I want to create an application similar or based on the attachment panel application at the bottom of the xwiki pages. The application should let the user select the file to upload to the xwiki server and write a description of the file. Then, the file name and description should be automatically added to a table. The first column of the table is the file name, that is a link to the file. The second column of the table is the description of the file. So, the table is like a repository of the files and its respective descriptions. My question is. Is there a macro or code snipped to add a file to the attachment panel application? Regards, Abel ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Images dissapear from pages after page modification.
Thanks Sergiu On Wed, Jul 21, 2010 at 3:07 PM, Sergiu Dumitriu ser...@xwiki.com wrote: On 07/21/2010 09:37 PM, Abel Solórzano Astorga wrote: I forgot to tell you that I was using google chrome 5.0.375.99. I tried the same page on internet explorer and on firefox and the images are been shown. So the issue is only in chrome. See http://jira.xwiki.org/jira/browse/XWIKI-4501 Summary: WebKit bug, nothing we can do to prevent it. This is the configuration of the enviroment: I am on a Windows XP Service Pack 3 and the server is a Ubuntu Linux 10.04 LTS. I am using the following syntax to show the image: *[[image:filename]]*. On Wed, Jul 21, 2010 at 12:06 PM, Abel Solórzano Astorga abelsolorz...@gmail.com wrote: Hi, I just updated to xwiki enterprise 2.3.1.29118. Now I am experiencing a problem when I modify a document that contains images. It happens that when I modify a document (not all the time) and then I save the document, some images are shown as broken images on the page. But if I follow the link on the html source of the page the image is still there. The pages where that happens have the special character -. I am using a mysql database configured with charset UTF8. If I delete the attachment of the image and upload and image with the same file name it still doesn't work. Regards, Abel -- 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
[xwiki-users] Images dissapear from pages after page modification.
Hi, I just updated to xwiki enterprise 2.3.1.29118. Now I am experiencing a problem when I modify a document that contains images. It happens that when I modify a document (not all the time) and then I save the document, some images are shown as broken images on the page. But if I follow the link on the html source of the page the image is still there. The pages where that happens have the special character -. I am using a mysql database configured with charset UTF8. If I delete the attachment of the image and upload and image with the same file name it still doesn't work. Regards, Abel ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Images dissapear from pages after page modification.
I forgot to tell you that I was using google chrome 5.0.375.99. I tried the same page on internet explorer and on firefox and the images are been shown. So the issue is only in chrome. This is the configuration of the enviroment: I am on a Windows XP Service Pack 3 and the server is a Ubuntu Linux 10.04 LTS. I am using the following syntax to show the image: *[[image:filename]]*. On Wed, Jul 21, 2010 at 12:06 PM, Abel Solórzano Astorga abelsolorz...@gmail.com wrote: Hi, I just updated to xwiki enterprise 2.3.1.29118. Now I am experiencing a problem when I modify a document that contains images. It happens that when I modify a document (not all the time) and then I save the document, some images are shown as broken images on the page. But if I follow the link on the html source of the page the image is still there. The pages where that happens have the special character -. I am using a mysql database configured with charset UTF8. If I delete the attachment of the image and upload and image with the same file name it still doesn't work. Regards, Abel ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Show connected users
Hi All, Is there a way to see which users are connected to xwiki on a given moment? Regards, Abel ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] DatePicker Application appears behind Modal Box
Hi, I was trying to use the DatePicker Application inside a Modal Box Application. The problem is that the DatePicker pop-up appears behind the modal box. I try to use the zindex property. But it doesn't work. This is the code I am using: afterLoad: function() { var dpicker = new DatePicker({relative : 'fieldName', language : 'us', zindex: '3000'});} Regards, Abel ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Remove leyend on ChartMacro20
Thanks for the info Vincent On Sat, Jul 3, 2010 at 10:20 AM, Vincent Massol vinc...@massol.net wrote: Hi, I don't think there's a macro param for this right now. You could create a jira issue and ask it as a request. Internally I think it simply involves calling JFreeChart.removeLegend(); Thanks -Vincent On Jul 3, 2010, at 5:54 PM, Abel Solórzano Astorga wrote: Thanks for the help Ricardo, I uploaded the image as http://dl.dropbox.com/u/3688604/charts-leyend.PNG On Sat, Jul 3, 2010 at 3:09 AM, [Ricardo Rodriguez] eBioTIC. ricardo.rodrig...@ebiotic.net wrote: Hi, Abel, Images are removed by the list manager. Please, upload the image to any public pictures sharing system and send an URL instead of a attached file. Greetings! Ricardo Abel Solórzano Astorga wrote: Hi, Is there a way to remove the chart's leyend on the ChartMacro20? Attached is an image that shows what I mean by chart's leyend. Thanks, 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
[xwiki-users] Remove leyend on ChartMacro20
Hi, Is there a way to remove the chart's leyend on the ChartMacro20? Attached is an image that shows what I mean by chart's leyend. Thanks, Abel ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Remove leyend on ChartMacro20
Thanks for the help Ricardo, I uploaded the image as http://dl.dropbox.com/u/3688604/charts-leyend.PNG On Sat, Jul 3, 2010 at 3:09 AM, [Ricardo Rodriguez] eBioTIC. ricardo.rodrig...@ebiotic.net wrote: Hi, Abel, Images are removed by the list manager. Please, upload the image to any public pictures sharing system and send an URL instead of a attached file. Greetings! Ricardo Abel Solórzano Astorga wrote: Hi, Is there a way to remove the chart's leyend on the ChartMacro20? Attached is an image that shows what I mean by chart's leyend. Thanks, Abel ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users -- Ricardo Rodríguez CTO eBioTIC. Life Sciences, Data Modeling and Information Management Systems ___ 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] Login to XWiki using email address
Hi, Is there a way to login to XWiki using the user's e-mail address. I tried to create a user whose Login ID is equal to his e-mail address. But, it is not possible. I suppose that XWiki doesn't allow the @ character on the Login ID. I know I can extend the XWiki Authentication classes. But I was hoping to find something faster. Thanks, Abel ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Resize images and keep aspect ratio
Thanks for the help. I just did it and it mantains aspect ratio. On Tue, Jun 22, 2010 at 12:38 AM, Marius Dumitru Florea mariusdumitru.flo...@xwiki.com wrote: On 06/22/2010 07:19 AM, Caleb James DeLisle wrote: If think if you specify the image width and not the height, it will scale maintaining ratio. It is scaling in the browser not on the server. [[image:myImg.png||width=800px]] You can also use the 'class' or 'style' attributes to apply CSS properties like max-height or max-width: [[image:myImg.png||class=limitedWidth]] [[image:myImg.png||style=max-width:500px]] Marius Caleb Abel Solórzano Astorga wrote: Hi, I am currently working with big images on my xwiki site. Is there a way to make the images auto-scale to the width of the xWiki page content if the image is too big? In order to avoid the horizontal scroll bar that appears on the page and adjust the images to the width of the xWiki page content. I am using the colibri skin. To make my question more general, What is the best way to dynamically resize images on xwiki? or set a max size for the images maintaining the aspect ratio. Thanks, 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
Re: [xwiki-users] Gliffy and XWiki Integration
Hi, I am going to answer my own question :). There is nothing done yet. But, it is possible to integrate Gliffy and XWiki using the Gliffy Rest API. Gliffy Rest API Home Page http://www.gliffy.com/developer/apidocs/rest/#oauth. Abel, On Fri, Jun 18, 2010 at 10:33 AM, Abel Solórzano Astorga abelsolorz...@gmail.com wrote: Hi, Is there a way to integrate Gliffy and XWiki? I am looking something similar to the Balsamiq Mockups for Xwiki. I read this new feature request http://jira.gliffy.com/browse/GLIFFY-566 on the JIRA Gliffy site. The request is a Gliffy Plugin for XWiki/Velocity. On the comments of the new feature request the Gliffy people said they are going to follow up with Jerome to see what the best next steps are. Thanks, Abel ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Resize images and keep aspect ratio
Hi, I am currently working with big images on my xwiki site. Is there a way to make the images auto-scale to the width of the xWiki page content if the image is too big? In order to avoid the horizontal scroll bar that appears on the page and adjust the images to the width of the xWiki page content. I am using the colibri skin. To make my question more general, What is the best way to dynamically resize images on xwiki? or set a max size for the images maintaining the aspect ratio. Thanks, Abel ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] How to add a panel to all the spaces using the Panel Wizard
Thanks a lot Vincent, that is exactly what is happening. On Thu, Jun 3, 2010 at 10:29 AM, Vincent Massol vinc...@massol.net wrote: On Jun 3, 2010, at 6:18 PM, Abel Solórzano Astorga wrote: Thanks for your answers, I added the panel as Anca explained. It appears on some of the spaces. But it doesn't appears on others. The spaces where the panel doesn't appears where changed previously. That is what you mean when you told that spaces can override information Vincent ? Is there something else I can do to add the panel to all the spaces? Go to the WebPreferences page of the said space. Edit using the object editor and edit the XWikiPreferences object, look for Right Panels or Left Panels fields and ensure they are empty. Thanks -Vincent Thanks for your patience :) On Thu, Jun 3, 2010 at 12:56 AM, Vincent Massol vinc...@massol.net wrote: On Jun 3, 2010, at 3:21 AM, Abel Solórzano Astorga wrote: Hi, I want to add a panel to my xwiki site using the Panel Wizard. I can add a panel to a space, but I want to add a panel to all the spaces (like the Main Navigation Panel). I know that I can add the panel to all the spaces one by one. But if I add a space I need to add the panel to the new space. Is there I way to add the panel for all the spaces. How can I do that ? When you set panels in the admin for the whole wiki they're available in all spaces. However spaces can override that information. 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] How to add a panel to all the spaces using the Panel Wizard
Hi, I want to add a panel to my xwiki site using the Panel Wizard. I can add a panel to a space, but I want to add a panel to all the spaces (like the Main Navigation Panel). I know that I can add the panel to all the spaces one by one. But if I add a space I need to add the panel to the new space. Is there I way to add the panel for all the spaces. How can I do that ? Thanks, Abel ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Crete xwiki pages from a template
Thanks Marius, That helps :) On Sun, May 30, 2010 at 10:50 PM, Marius Dumitru Florea mariusdumitru.flo...@xwiki.com wrote: Hi Abel, On 05/31/2010 12:05 AM, Abel Solórzano Astorga wrote: Hi, I was wondering what is the best way to give wiki users the possibility to create xwiki pages from a template. I was thinking of something like the CREATE PAGE feature on xwiki but with an additional field called template page. So when the page is created it has the same content as the template page. Is there a plugin or application that already does that? See http://lists.xwiki.org/pipermail/devs/2010-May/018869.html . This new feature will be available in XWiki Enterprise 2.4 final. Hope this helps, Marius 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
[xwiki-users] Crete xwiki pages from a template
Hi, I was wondering what is the best way to give wiki users the possibility to create xwiki pages from a template. I was thinking of something like the CREATE PAGE feature on xwiki but with an additional field called template page. So when the page is created it has the same content as the template page. Is there a plugin or application that already does that? Regards, Abel ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Dinamically create an xwiki page and add content to it
Hi, I want to create an xwiki page from a groovy script and add some content to it. Could somebody tell me how can I accomplish that? Thanks, Abel ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Dinamically create an xwiki page and add content to it
Thanks Caleb, It worked just fine. Abel On Tue, May 18, 2010 at 3:40 PM, Caleb James DeLisle calebdeli...@lavabit.com wrote: nxdoc = xwiki.getDocument(some.nonexistentDocument); gives you a brand new document to work with. It won't be put in the database until you call nxdoc.save() or nxdoc.saveAsAuthor() You can put content in the document with nxdoc.setContent(some content); See: http://platform.xwiki.org/xwiki/bin/view/DevGuide/Scripting Caleb Abel Solórzano Astorga wrote: Hi, I want to create an xwiki page from a groovy script and add some content to it. Could somebody tell me how can I accomplish that? Thanks, 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
Re: [xwiki-users] Clear the value of xwiki properties used on a form
If somebody encounter the same problem. I found out the way to clear the values of a Static List property. The following code did the job for my: *valdoc.getDocument().getObject(className).setStringListValue( staticListPropertyName, new ArrayList()) * On Wed, Apr 21, 2010 at 4:39 PM, Abel Solórzano Astorga abelsolorz...@gmail.com wrote: Thanks for the reply Sergiu. It is not a browser cache problem. I clear all the cached data on the browser and I am still getting the *last selected values :(*. On Wed, Apr 21, 2010 at 3:39 PM, Sergiu Dumitriu ser...@xwiki.com wrote: On 04/21/2010 10:58 PM, Abel Solórzano Astorga wrote: Hi, I have an XWiki object with properties. I am using the object in a html form to apply XWiki style validation as described in * http://platform.xwiki.org/xwiki/bin/view/DevGuide/Creating%20a%20form%20with%20validation%20and%20tooltips *. I am setting some properties (* com.xpn.xwiki.objects.classes.StaticListClass) dynamically. Like this:* * * * valdoc.getxWikiClass().get(propertyName).getPropertyClass().setValues(value) * *valdoc.save()* * My problem is that the properties of the object preserve its value between accesses to the page that contains the form. So when I go to the page that contains the form the first time everything is ok, but on subsequent accesses to the page some properties already have a value. I tried to clear the value of the properties using:* * * * valdoc.getxWikiClass().get(propertyName).getPropertyClass().setValues() valdoc.save() * * * *But strangely that leaves the last selected values.* * * *I though that I could change the selected value of the staticList property. But I couldn't find out how to do that.* * * *I have two questions:* * * *1. How can I clear the value of those properties?* *2. How can I set the selected value(s) of a List property?* * * *Abel* Are you sure it's not just a browser cache problem? Modern browsers usually remember the value you entered in a form. -- 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
[xwiki-users] Clear the value of xwiki properties used on a form
Hi, I have an XWiki object with properties. I am using the object in a html form to apply XWiki style validation as described in * http://platform.xwiki.org/xwiki/bin/view/DevGuide/Creating%20a%20form%20with%20validation%20and%20tooltips *. I am setting some properties (* com.xpn.xwiki.objects.classes.StaticListClass) dynamically. Like this:* * * * valdoc.getxWikiClass().get(propertyName).getPropertyClass().setValues(value) * *valdoc.save()* * My problem is that the properties of the object preserve its value between accesses to the page that contains the form. So when I go to the page that contains the form the first time everything is ok, but on subsequent accesses to the page some properties already have a value. I tried to clear the value of the properties using:* * * * valdoc.getxWikiClass().get(propertyName).getPropertyClass().setValues() valdoc.save() * * * *But strangely that leaves the last selected values.* * * *I though that I could change the selected value of the staticList property. But I couldn't find out how to do that.* * * *I have two questions:* * * *1. How can I clear the value of those properties?* *2. How can I set the selected value(s) of a List property?* * * *Abel* * * * * ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Clear the value of xwiki properties used on a form
Thanks for the reply Sergiu. It is not a browser cache problem. I clear all the cached data on the browser and I am still getting the *last selected values :(*. On Wed, Apr 21, 2010 at 3:39 PM, Sergiu Dumitriu ser...@xwiki.com wrote: On 04/21/2010 10:58 PM, Abel Solórzano Astorga wrote: Hi, I have an XWiki object with properties. I am using the object in a html form to apply XWiki style validation as described in * http://platform.xwiki.org/xwiki/bin/view/DevGuide/Creating%20a%20form%20with%20validation%20and%20tooltips *. I am setting some properties (* com.xpn.xwiki.objects.classes.StaticListClass) dynamically. Like this:* * * * valdoc.getxWikiClass().get(propertyName).getPropertyClass().setValues(value) * *valdoc.save()* * My problem is that the properties of the object preserve its value between accesses to the page that contains the form. So when I go to the page that contains the form the first time everything is ok, but on subsequent accesses to the page some properties already have a value. I tried to clear the value of the properties using:* * * * valdoc.getxWikiClass().get(propertyName).getPropertyClass().setValues() valdoc.save() * * * *But strangely that leaves the last selected values.* * * *I though that I could change the selected value of the staticList property. But I couldn't find out how to do that.* * * *I have two questions:* * * *1. How can I clear the value of those properties?* *2. How can I set the selected value(s) of a List property?* * * *Abel* Are you sure it's not just a browser cache problem? Modern browsers usually remember the value you entered in a form. -- 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] Authenticate groups of users against different servers
Great answer Tomas, Tanks a lot. I am going to start to work on that. On Sat, Apr 17, 2010 at 10:19 AM, Thomas Mortagne thomas.morta...@xwiki.com wrote: On Fri, Apr 16, 2010 at 21:30, Abel Solórzano Astorga abelsolorz...@gmail.com wrote: Hi, I have a question :). First this is my situation: I am using XWiki as the company support site and I want to be able to authenticate the company users (internal users) on XWiki using their domain name and the clients (external users) using their personal e-mail. At the moment the company users are being authenticated against an Active Directory server by their domain name. Is there a way to authenticate a group of users to a LDAP server by their e-mail addresses and another group of users to an Active Directory in a different server by their domain name? Not in standard, you would have to do your own authenticator for that. If you know a little java the easiest for you is probably to extends com.xpn.xwiki.user.impl.LDAP.XWikiLDAPAuthServiceImpl class with your own and implement your dispatching code here. Problem is that since you are not yet authenticated you have no idea what is the group of the user. Some solutions you could implement in your authenticator: - find a way to indicate authentication mode to use: - take any login containing @ char as a mail - add a field in the login page to let user explicitly indicate their authentication mode, you would also need to modify login page code to find a way to transmit the information to the authenticator (since authentication api only support 2 fields: a login and a password) - try systematically one authentication and then try the other one if the first one failed (for example standard LDAP authenticator try LDAP and then standard XWiki if LDAP failed which is why you can authenticate with a LDAP user or a XWiki user with LDAP authenticator). Regards, Abel ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users -- Thomas Mortagne ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Authenticate groups of users against different servers
Hi, I have a question :). First this is my situation: I am using XWiki as the company support site and I want to be able to authenticate the company users (internal users) on XWiki using their domain name and the clients (external users) using their personal e-mail. At the moment the company users are being authenticated against an Active Directory server by their domain name. Is there a way to authenticate a group of users to a LDAP server by their e-mail addresses and another group of users to an Active Directory in a different server by their domain name? Regards, Abel ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] com.xpn.xwiki.doc.XWikiDocument.getStringValue(date_property_name) returns empty String
Thanks for the quick response. Then the problem should be another. Abel, On Wed, Mar 31, 2010 at 12:06 PM, Sergiu Dumitriu ser...@xwiki.com wrote: On 03/31/2010 06:50 PM, Abel Solórzano Astorga wrote: Hi, I am trying to get the String value of a Date Property. I am using the following code: *def obj = doc.getObject(SSI-Internal.CreateIssue);* *def summary = obj.getStringValue(environment);* *def date = obj.getStringValue(due_date);* *doc* is of type *com.xpn.xwiki.doc.XWikiDocument* and *environment* is a TextArea property. I can get the String value of the TextArea property, but I can't get the String value of the Date property (*due_date*). How can I get the String value of a date property? getStringValue should always work. Make sure you used the right name, and that the date is set. -- 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] Export xwiki page to be seen on word
Thank you for your response. This is what I do: 1. I am connecting to the server as the Admin user. 2. On the Wiki Explorer I select the page I want to edit, right click on it and then click on Edit this page. The page that is shown on word doesn't have images. Instead there is a box with the following message: The linked image cannot be displayed. The file may have been moved, renamed or deleted. Verify that the link points to the correct file and location. The type of file on the word document is html. By the way I am going to be waiting the new word / pdf exporter. Thanks, On Wed, Mar 17, 2010 at 2:58 AM, Florin Ciubotaru florin.ciubot...@xwiki.com wrote: Hi, On Wed, Mar 17, 2010 at 12:18 AM, Abel Solórzano Astorga abelsolorz...@gmail.com wrote: Hi, I want to export a xWiki page to be seen on word. I tried rtf export, but it doesn't seem to be working. I got an rtf document, but when I open the document on word it is incomplete. The tables aren't showed. Also, if I tried to open the rtf on OpenOffice Writer it crashed. I am also trying with xoffice. It works better than rtf export. But the images on the page aren't exported to the .doc file. XOffice creates a .html file that should display the images. Is it when you save it as .doc that you can't see them? Florin CIubotaru Is there something I could do to get the images on the resulting .doc file? Thanks, 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
Re: [xwiki-users] Export xwiki page to be seen on word
Thanks Florin, My images are attached files and it happens on every page. I have edit rights on my document repository folder. The problem is that the image is not been downloading (it is not inside the folder). The link to the image on the html file is ok. I am going to create the issue. Thanks for your help, Abel On Wed, Mar 17, 2010 at 1:18 PM, Florin Ciubotaru florin.ciubot...@xwiki.com wrote: Hi, It would be great if you could log the XOffice issue to our issue tracker. Then I will fix this in the following release. On Wed, Mar 17, 2010 at 7:18 PM, Abel Solórzano Astorga abelsolorz...@gmail.com wrote: Thank you for your response. This is what I do: 1. I am connecting to the server as the Admin user. 2. On the Wiki Explorer I select the page I want to edit, right click on it and then click on Edit this page. The page that is shown on word doesn't have images. Instead there is a box with the following message: The linked image cannot be displayed. The file may have been moved, renamed or deleted. Verify that the link points to the correct file and location. I never saw this message before. Are your images attached files on your wiki and does it happen on every page? Also, please check if your document repository folder has edit rights. To do that go to XWord Options - Repository settings tab and select a folder where you have write permissions. Thanks, Florin Ciubotaru The type of file on the word document is html. By the way I am going to be waiting the new word / pdf exporter. Thanks, On Wed, Mar 17, 2010 at 2:58 AM, Florin Ciubotaru florin.ciubot...@xwiki.com wrote: Hi, On Wed, Mar 17, 2010 at 12:18 AM, Abel Solórzano Astorga abelsolorz...@gmail.com wrote: Hi, I want to export a xWiki page to be seen on word. I tried rtf export, but it doesn't seem to be working. I got an rtf document, but when I open the document on word it is incomplete. The tables aren't showed. Also, if I tried to open the rtf on OpenOffice Writer it crashed. I am also trying with xoffice. It works better than rtf export. But the images on the page aren't exported to the .doc file. XOffice creates a .html file that should display the images. Is it when you save it as .doc that you can't see them? Florin CIubotaru Is there something I could do to get the images on the resulting .doc file? Thanks, 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 ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Export xwiki page to be seen on word
Hi, I want to export a xWiki page to be seen on word. I tried rtf export, but it doesn't seem to be working. I got an rtf document, but when I open the document on word it is incomplete. The tables aren't showed. Also, if I tried to open the rtf on OpenOffice Writer it crashed. I am also trying with xoffice. It works better than rtf export. But the images on the page aren't exported to the .doc file. Is there something I could do to get the images on the resulting .doc file? Thanks, Abel ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Is there a way to modify the values of the options in the select element (html) associated with a Static List?
Hi Vincent, I' ve been using the swizzle plugin. It is pretty handy. Thanks, Abel On Fri, Mar 12, 2010 at 1:09 AM, Vincent Massol vinc...@massol.net wrote: Hi Abel, On Mar 11, 2010, at 11:51 PM, Abel Solórzano Astorga wrote: Thanks, I try Jean-Vincent suggestion and it works. By the way Caleb I am writing a module that create jira issues from xwiki. cool. I hope you've checked our swizzle plugin too: http://code.xwiki.org/xwiki/bin/view/Plugins/SwizzlePlugin Thanks -Vincent Abel On Wed, Mar 10, 2010 at 12:39 PM, Caleb James DeLisle calebdeli...@lavabit.com wrote: Jean-Vincent Drean wrote: You can use the following notation in the static list values definition: 1=Value 1|2=Value 2|3=Value 3 The generated HTML will look like: option value=1 label=Value 1Value 1/option option value=2 label=Value 2Value 2/option option value=3 label=Value 3Value 3/option JV. On Wed, Mar 10, 2010 at 6:24 PM, Abel Solórzano Astorga abelsolorz...@gmail.com wrote: Hi, Is there a way to modify the values of the options in the select element (html) associated with a Static List? I noticed that the values are the same as the text that is shown on the list. I have: *select id=SSI-Internal.CreateIssue_0_priority name=SSI-Internal.CreateIssue_0_priority size=1* * option label=Show Stopper value=Show StopperShow Stopper/option* * option label=Must Have value=Must HaveMust Have/option* * option label=Should Have value=Should HaveShould Have/option* * option label=Could Have value=Could HaveCould Have/option* * option label=Not In Roadmap value=Not In RoadmapNot In Roadmap/option* */select* I want something like: *select id=SSI-Internal.CreateIssue_0_priority name=SSI-Internal.CreateIssue_0_priority size=1* * option value=1Show Stopper/option* * option value=2Must Have/option* * option value=3Should Have/option* * option value=4Could Have/option* * option value=5Not In Roadmap/option* */select* I am using the following code to modify the values: *valdoc = xwiki.getDocument(SSI-Internal.CreateIssue)* *ok = valdoc.updateObjectFromRequest(SSI-Internal.CreateIssue)* * valdoc.getxWikiClass().get(priority).getPropertyClass().setValues(“a|b|c”) It looks like you are writing a bug tracker which I think is very cool! I think you will need to use valdoc.getDocument().getxWikiClass() again get(priority) will return a PropertyInterface which has no setValues function so you will have to cast it to StaticListClass like so. ((StaticListClass) valdoc.getDocument().getxWikiClass().get(priority)).setValues(a|b|c); It appears that this will work although I haven't tested it. Caleb ___ 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 modify the values of the options in the select element (html) associated with a Static List?
Thanks, I try Jean-Vincent suggestion and it works. By the way Caleb I am writing a module that create jira issues from xwiki. Abel On Wed, Mar 10, 2010 at 12:39 PM, Caleb James DeLisle calebdeli...@lavabit.com wrote: Jean-Vincent Drean wrote: You can use the following notation in the static list values definition: 1=Value 1|2=Value 2|3=Value 3 The generated HTML will look like: option value=1 label=Value 1Value 1/option option value=2 label=Value 2Value 2/option option value=3 label=Value 3Value 3/option JV. On Wed, Mar 10, 2010 at 6:24 PM, Abel Solórzano Astorga abelsolorz...@gmail.com wrote: Hi, Is there a way to modify the values of the options in the select element (html) associated with a Static List? I noticed that the values are the same as the text that is shown on the list. I have: *select id=SSI-Internal.CreateIssue_0_priority name=SSI-Internal.CreateIssue_0_priority size=1* * option label=Show Stopper value=Show StopperShow Stopper/option* * option label=Must Have value=Must HaveMust Have/option* * option label=Should Have value=Should HaveShould Have/option* * option label=Could Have value=Could HaveCould Have/option* * option label=Not In Roadmap value=Not In RoadmapNot In Roadmap/option* */select* I want something like: *select id=SSI-Internal.CreateIssue_0_priority name=SSI-Internal.CreateIssue_0_priority size=1* * option value=1Show Stopper/option* * option value=2Must Have/option* * option value=3Should Have/option* * option value=4Could Have/option* * option value=5Not In Roadmap/option* */select* I am using the following code to modify the values: *valdoc = xwiki.getDocument(SSI-Internal.CreateIssue)* *ok = valdoc.updateObjectFromRequest(SSI-Internal.CreateIssue)* * valdoc.getxWikiClass().get(priority).getPropertyClass().setValues(“a|b|c”) It looks like you are writing a bug tracker which I think is very cool! I think you will need to use valdoc.getDocument().getxWikiClass() again get(priority) will return a PropertyInterface which has no setValues function so you will have to cast it to StaticListClass like so. ((StaticListClass) valdoc.getDocument().getxWikiClass().get(priority)).setValues(a|b|c); It appears that this will work although I haven't tested it. Caleb * Thanks, 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
[xwiki-users] Is there a way to modify the values of the options in the select element (html) associated with a Static List?
Hi, Is there a way to modify the values of the options in the select element (html) associated with a Static List? I noticed that the values are the same as the text that is shown on the list. I have: *select id=SSI-Internal.CreateIssue_0_priority name=SSI-Internal.CreateIssue_0_priority size=1* * option label=Show Stopper value=Show StopperShow Stopper/option* * option label=Must Have value=Must HaveMust Have/option* * option label=Should Have value=Should HaveShould Have/option* * option label=Could Have value=Could HaveCould Have/option* * option label=Not In Roadmap value=Not In RoadmapNot In Roadmap/option* */select* I want something like: *select id=SSI-Internal.CreateIssue_0_priority name=SSI-Internal.CreateIssue_0_priority size=1* * option value=1Show Stopper/option* * option value=2Must Have/option* * option value=3Should Have/option* * option value=4Could Have/option* * option value=5Not In Roadmap/option* */select* I am using the following code to modify the values: *valdoc = xwiki.getDocument(SSI-Internal.CreateIssue)* *ok = valdoc.updateObjectFromRequest(SSI-Internal.CreateIssue)* * valdoc.getxWikiClass().get(priority).getPropertyClass().setValues(“a|b|c”) * Thanks, Abel ___ 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?
Thanks a lot guys, I followed the suggestion of Sergiu and it works just fine. Abel On Fri, Mar 5, 2010 at 6:51 PM, Sergiu Dumitriu ser...@xwiki.com wrote: On 03/06/2010 01:06 AM, Abel Solórzano Astorga wrote: Thanks again Caleb, I try your suggestion, but I keep getting a null value from * valdoc.getDocument().**getxWikiClass().get(Project)*. The fields Map ( *valdoc.getDocument().**getxWikiClass().fields.keySet(**)*) is empty. I put the following line on the code: *println valdoc.getDocument().getxWikiClass().toString()* and the result is *class nameValidationSample.TestClass_6/name customClass/customClass customMapping/customMapping defaultViewSheet/defaultViewSheet defaultEditSheet/defaultEditSheet defaultWeb/defaultWeb nameField/nameField validationScript/validationScript /class* I was expecting to see the properties on the XML. Abel Is valdoc the document containing the class? It doesn't look like it from the name. So, you must do something like: {{velocity}} #set($classDoc = $xwiki.getDocument('Your.Class')) #set($propertyDefinition = $classDoc.getxWikiClass().get('project')) ## $propertyDefinition.class should now print com.xpn.xwiki.api.PropertyClass ## Unfortunately, at this point you need programming rights to go into the inner, protected property definition #set($propertyDefinition = $propertyDefinition.getPropertyClass()) ## $propertyDefinition.class should now print com.xpn.xwiki.objects.classes.StaticListClass ## If it doesn't, then you don't have programming rights. $propertyDefinition.setValues('a|b|c') ## Don't forget to save $classDoc.save() {{/velocity}} -- 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] Is there a way to dynamically change the values on a static list or on any other property of a xwiki class?
Thanks again Caleb, I try your suggestion, but I keep getting a null value from * valdoc.getDocument().**getxWikiClass().get(Project)*. The fields Map ( *valdoc.getDocument().**getxWikiClass().fields.keySet(**)*) is empty. I put the following line on the code: *println valdoc.getDocument().getxWikiClass().toString()* and the result is *class nameValidationSample.TestClass_6/name customClass/customClass customMapping/customMapping defaultViewSheet/defaultViewSheet defaultEditSheet/defaultEditSheet defaultWeb/defaultWeb nameField/nameField validationScript/validationScript /class* I was expecting to see the properties on the XML. Abel On Fri, Mar 5, 2010 at 1:45 AM, Caleb James DeLisle calebdeli...@lavabit.com wrote: 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 ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Is there a way to dynamically change the values on a static list or on any other property of a xwiki class?
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