[xwiki-users] Create Page button redirected to localhost
Hi, all, I logged in as an administrator, I like to create a new page under jQuery with this URL: http://mydomain/xwikim/bin/create/jQuery/WebHome when I click the Create button, it always redirected me to localhost as following: http://localhost/xwikim/bin/edit/jQuery/jQueryUICustom?template=parent=jQuery.WebHometitle=jQueryUICustom which caused error message: Unable to connect, I tried to create from Main space, also the same problem and redirected me to: http://localhost/xwikim/bin/edit/Main/jQueryUICustom?template=parent=Main.WebHometitle=jQueryUICustom when this happens, I have to replace the localhost with mydomain on browser address and press enter to bring up the page, this happened to me many times when I need to do edit action, when it is view action, it works perfectly, I have httpd apache webserver in front of tomcat, in apache config file, my setup is: ProxyPass/xwikim http://localhost:8082/xwikim ProxyPassReverse /xwikim http://localhost:8082/xwikim In tomcat server.xml file, the setup is: Connector port=*8082* maxThreads=*150* minSpareThreads=*25*maxSpareThreads =*75* enableLookups=*false* acceptCount=*100* connectionTimeout=* 2* proxyPort=*80* disableUploadTimeout=*true* / I feel this setup should be ok, since it works all the time except sometimes it does not work for edit action or login. Does anybody have ideas about what happened and how to fix? Thanks very much in advance. Dave ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] admin user login problem
Hi all, I have a Admin user account with my wiki setup, starting some time ago, when I login, I type Admin, then type admin password, the Admin user name field automatically turns into admin, which has lower case a, that means different user account, which is not Administrator account, I have no way to login as Administrator, I have to use firebug debugger to open the underline html field and put Admin as the value to login. Any way to fix this? Thanks Dave ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Logging problem
Hi, all, I have the following logback.xml file, I developed a servlet, and used common logging library, import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; Log logger = LogFactory.getLog(FileTestServlet.class); I also added this to the logback.xml: logger name=next.filetest level=debug/ In the code, I have the following code: logger.debug(FileTestServlet doGet...); But in the xwiki.log file, the message is not logged to the log file, anything wrong? I tried to configure log4j.properties in the classes folder, used log4j logger for logging, there is no message logged either. Thanks for your help. Dave configuration appender name=xwiki class=ch.qos.logback.core.rolling.RollingFileAppender !--See also http://logback.qos.ch/manual/appenders.html#RollingFileAppender-- fileC:\apache-tomcat-7.0.25\logs\xwiki.log/file appendfalse/append encoder pattern%d [%t] %-5p %c - %m%n/pattern /encoder rollingPolicy class=ch.qos.logback.core.rolling.FixedWindowRollingPolicy maxIndex10/maxIndex FileNamePatternC:\apache-tomcat-7.0.25\logs\xwiki.log.%i/FileNamePattern /rollingPolicy triggeringPolicy class=ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy MaxFileSize5MB/MaxFileSize /triggeringPolicy /appender logger name=com.xpn.xwiki.render.XWikiRadeoxRenderEngine level=warn/ logger name=org.apache.fop.layoutmgr.inline.ContentLayoutManager level=error/ logger name=org.apache.struts.util.RequestUtils level=error/ logger name=org.hibernate.type level=warn/ logger name=com.xpn.xwiki.store.migration level=info/ logger name=org.hibernate.SQL level=debug/ logger name=org.jgroups level=error/ logger name=org.hibernate level=warn/ logger name=info.informatica.doc.style.css.dom level=error/ logger name=org.hibernate.ps.PreparedStatementCache level=warn/ logger name=org.xwiki level=info/ logger name=com.xpn.xwiki level=warn/ logger name=next.filetest level=debug/ root level=DEBUG appender-ref ref=xwiki/ /root /configuration ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] XWiki Enterprise or Manager
I just switched from original MYSQL to Postgres, then I searched WikiManger, no WikiManager found. Dave On Mon, Apr 9, 2012 at 5:54 PM, ricardo.julio.rodriguez.fernan...@sergas.es wrote: Hi! From: users-boun...@xwiki.org [users-boun...@xwiki.org] On Behalf Of du du [ddd...@gmail.com] Sent: 08 April 2012 15:28 To: XWiki Users Subject: Re: [xwiki-users] XWiki Enterprise or Manager Hi, Guillaume, Thanks for your response, the problem is after I switched to Postgres, my WikiManager became missing, I used to use it to list all the wikis I have, now I searched WikiManger from my XWiki search combo box, no WikiManager anymore. Also when you create another wiki, how do you specify this new wiki to use different database? Thanks again for your help. Dave I'm a bit lost with this issue. Well, I've not Postgresql here, so I'm just talking from a theoretical POW. Please, Dave, how have you switched to Postgresql from whatever full supported RDBMS you where using before? Could you search for WikiManager xwd_fullname field in your new xwikidoc table? At least three pages must be there if the migration was successful! It you what to use simply SQl, this should be enough... /*Documents in space WikiManager*/ select XWD_FULLNAME from xwiki.xwikidoc where XWD_FULLNAME like '%WikiManager.%'; If the documents are there, it seems to me that something is failing at XWiki level. HTH! Cheers! On Sun, Apr 8, 2012 at 6:38 AM, Guillaume Fenollar guillaume.fenol...@xwiki.com wrote: Hello, The point of XEM (manager) is to create subwiki. It's thus acting like a farm, and every subwiki can be managed in a totally different way. If there is troubles with XEM and postgres, it's about the subwiki creation (a subwiki is in fact a new database), which could not work with this database management system. You can try to create a subwiki (go into WikiManager space) and tell us if this step is working well :-) Regards Guillaume Fenollar 2012/4/8 ricardo.julio.rodriguez.fernan...@sergas.es Hi! From: users-boun...@xwiki.org [users-boun...@xwiki.org] On Behalf Of du du [ddd...@gmail.com] Sent: 07 April 2012 20:25 To: XWiki Users Subject: [xwiki-users] XWiki Enterprise or Manager Hi, all, I installed XWiki manager on one machine, and installed Enterprise on another machine, I cannot tell which is manager and which is enterprise sometimes. Anyway to check that? If you are talking about XWiki Enterprise Manager (XEM) when you said XWiki manager, I guess the simplest way is to look for XWiki Enterprise Manager specific pages in your installation. For instance, XemManager and WikiManager spaces. These spaces won't exist in a XWiki Enterprise (XE), the default wiki product based on the XWiki Platform, installation. Also, a XEM installation has two plugins XE doesn't need: com.xpn.xwiki.plugin.wikimanager.WikiManagerPlugin,\ com.xpn.xwiki.plugin.applicationmanager.ApplicationManagerPlugin and xwiki.virtual=1 in your xwiki.cfg file. I'm sure you have already checked this... http://manager.xwiki.org/xwiki/bin/view/AdminGuide/Installation#HTutorials Also the user's guide says the manager does not support postgresql, I checked the hibernate config file, switched from mysql to postgres, now both versions of my xwiki are using postgres on different machine, they both work fine, but I am not sure whether something may go wrong someday with the manager because I switched the postgresql for it, so what are the concerns of using postgres with xwiki manager? how do I overcome? Hot on databases support... http://dev.xwiki.org/xwiki/bin/view/Community/DatabaseSupportStrategy http://markmail.org/message/b4eihzaulneqiqhd Please, could you post the link to the page where is said that PostgreSQL is not supported? Probably an update is needed there or a but is required in the DatabaseSupportStrategy brand new page! HTH! Ricardo Thanks Dave ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users Nota: A informaci?n contida nesta mensaxe e os seus posibles documentos adxuntos ? privada e confidencial e est? dirixida ?nicamente ? seu destinatario/a. Se vostede non ? o/a destinatario/a orixinal desta mensaxe, por favor elim?nea. A distribuci?n ou copia desta mensaxe non est? autorizada. Nota: La informaci?n contenida en este mensaje y sus posibles documentos adjuntos es privada y confidencial y est? dirigida ?nicamente a su destinatario/a. Si usted no es el/la destinatario/a original de este mensaje, por favor elim?nelo. La distribuci?n o copia de este mensaje
Re: [xwiki-users] XWiki Enterprise or Manager
I just imported the Manager UI, it works now, I see the WikiManager. Thanks David On Mon, Apr 9, 2012 at 6:36 PM, Guillaume Fenollar guillaume.fenol...@xwiki.com wrote: Hi It would be very strange that WikiManager space only disappeared... Though I'd advise to follow what Ricardo said, you could try to import again the .xar of XEM, according to your XWiki version of course (you can to only import WikiManager space to make sure you won't break anything.) When you use the WikiManager to create another wiki, it creates a database with the name you provide as name of the wiki, so you don't have to worry about his step, two wikis won't (and can't) use the same database inside a RDBMS instance. Guillaume Fenollar 2012/4/9 ricardo.julio.rodriguez.fernan...@sergas.es Hi! From: users-boun...@xwiki.org [users-boun...@xwiki.org] On Behalf Of du du [ddd...@gmail.com] Sent: 08 April 2012 15:28 To: XWiki Users Subject: Re: [xwiki-users] XWiki Enterprise or Manager Hi, Guillaume, Thanks for your response, the problem is after I switched to Postgres, my WikiManager became missing, I used to use it to list all the wikis I have, now I searched WikiManger from my XWiki search combo box, no WikiManager anymore. Also when you create another wiki, how do you specify this new wiki to use different database? Thanks again for your help. Dave I'm a bit lost with this issue. Well, I've not Postgresql here, so I'm just talking from a theoretical POW. Please, Dave, how have you switched to Postgresql from whatever full supported RDBMS you where using before? Could you search for WikiManager xwd_fullname field in your new xwikidoc table? At least three pages must be there if the migration was successful! It you what to use simply SQl, this should be enough... /*Documents in space WikiManager*/ select XWD_FULLNAME from xwiki.xwikidoc where XWD_FULLNAME like '%WikiManager.%'; If the documents are there, it seems to me that something is failing at XWiki level. HTH! Cheers! On Sun, Apr 8, 2012 at 6:38 AM, Guillaume Fenollar guillaume.fenol...@xwiki.com wrote: Hello, The point of XEM (manager) is to create subwiki. It's thus acting like a farm, and every subwiki can be managed in a totally different way. If there is troubles with XEM and postgres, it's about the subwiki creation (a subwiki is in fact a new database), which could not work with this database management system. You can try to create a subwiki (go into WikiManager space) and tell us if this step is working well :-) Regards Guillaume Fenollar 2012/4/8 ricardo.julio.rodriguez.fernan...@sergas.es Hi! From: users-boun...@xwiki.org [users-boun...@xwiki.org] On Behalf Of du du [ddd...@gmail.com] Sent: 07 April 2012 20:25 To: XWiki Users Subject: [xwiki-users] XWiki Enterprise or Manager Hi, all, I installed XWiki manager on one machine, and installed Enterprise on another machine, I cannot tell which is manager and which is enterprise sometimes. Anyway to check that? If you are talking about XWiki Enterprise Manager (XEM) when you said XWiki manager, I guess the simplest way is to look for XWiki Enterprise Manager specific pages in your installation. For instance, XemManager and WikiManager spaces. These spaces won't exist in a XWiki Enterprise (XE), the default wiki product based on the XWiki Platform, installation. Also, a XEM installation has two plugins XE doesn't need: com.xpn.xwiki.plugin.wikimanager.WikiManagerPlugin,\ com.xpn.xwiki.plugin.applicationmanager.ApplicationManagerPlugin and xwiki.virtual=1 in your xwiki.cfg file. I'm sure you have already checked this... http://manager.xwiki.org/xwiki/bin/view/AdminGuide/Installation#HTutorials Also the user's guide says the manager does not support postgresql, I checked the hibernate config file, switched from mysql to postgres, now both versions of my xwiki are using postgres on different machine, they both work fine, but I am not sure whether something may go wrong someday with the manager because I switched the postgresql for it, so what are the concerns of using postgres with xwiki manager? how do I overcome? Hot on databases support... http://dev.xwiki.org/xwiki/bin/view/Community/DatabaseSupportStrategy http://markmail.org/message/b4eihzaulneqiqhd Please, could you post the link to the page where is said that PostgreSQL is not supported? Probably an update is needed there or a but is required in the DatabaseSupportStrategy brand new page! HTH! Ricardo Thanks Dave
Re: [xwiki-users] XWiki Enterprise or Manager
Hi, Ricardo, Thanks for your response, from the same link: http://manager.xwiki.org/xwiki/bin/view/AdminGuide/Installation#HTutorials It says: Currently, XEM only fully supports MySQL and Oracle RDBMS. That means XEM does not fully support Postgres, not sure why. I checked i have xwiki.virtual=1 in my xwiki.cfg file. I remember I installed XEM on this computer, and I created another wiki for it, I clicked WikiManager link then I saw there were two wikis listed, one is xwiki, the other is the one I created, I can click either to enter to different wiki, but a while ago, I switched database from MySQL to Postgres, then my installation of xwiki enterprise manager seems changed, I searched WikiManager, I cannot get this page, I have no way to see page which lists the two wikis, it seems turning my XEM into XWiki Enterprise (XE), any idea about what happened? Thanks Dave On Sun, Apr 8, 2012 at 4:04 AM, ricardo.julio.rodriguez.fernan...@sergas.es wrote: Hi! From: users-boun...@xwiki.org [users-boun...@xwiki.org] On Behalf Of du du [ddd...@gmail.com] Sent: 07 April 2012 20:25 To: XWiki Users Subject: [xwiki-users] XWiki Enterprise or Manager Hi, all, I installed XWiki manager on one machine, and installed Enterprise on another machine, I cannot tell which is manager and which is enterprise sometimes. Anyway to check that? If you are talking about XWiki Enterprise Manager (XEM) when you said XWiki manager, I guess the simplest way is to look for XWiki Enterprise Manager specific pages in your installation. For instance, XemManager and WikiManager spaces. These spaces won't exist in a XWiki Enterprise (XE), the default wiki product based on the XWiki Platform, installation. Also, a XEM installation has two plugins XE doesn't need: com.xpn.xwiki.plugin.wikimanager.WikiManagerPlugin,\ com.xpn.xwiki.plugin.applicationmanager.ApplicationManagerPlugin and xwiki.virtual=1 in your xwiki.cfg file. I'm sure you have already checked this... http://manager.xwiki.org/xwiki/bin/view/AdminGuide/Installation#HTutorials Also the user's guide says the manager does not support postgresql, I checked the hibernate config file, switched from mysql to postgres, now both versions of my xwiki are using postgres on different machine, they both work fine, but I am not sure whether something may go wrong someday with the manager because I switched the postgresql for it, so what are the concerns of using postgres with xwiki manager? how do I overcome? Hot on databases support... http://dev.xwiki.org/xwiki/bin/view/Community/DatabaseSupportStrategy http://markmail.org/message/b4eihzaulneqiqhd Please, could you post the link to the page where is said that PostgreSQL is not supported? Probably an update is needed there or a but is required in the DatabaseSupportStrategy brand new page! HTH! Ricardo Thanks Dave ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users Nota: A informaci?n contida nesta mensaxe e os seus posibles documentos adxuntos ? privada e confidencial e est? dirixida ?nicamente ? seu destinatario/a. Se vostede non ? o/a destinatario/a orixinal desta mensaxe, por favor elim?nea. A distribuci?n ou copia desta mensaxe non est? autorizada. Nota: La informaci?n contenida en este mensaje y sus posibles documentos adjuntos es privada y confidencial y est? dirigida ?nicamente a su destinatario/a. Si usted no es el/la destinatario/a original de este mensaje, por favor elim?nelo. La distribuci?n o copia de este mensaje no est? autorizada. See more languages: http://www.sergas.es/aviso_confidencialidad.htm ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] XWiki Enterprise or Manager
Hi, Guillaume, Thanks for your response, the problem is after I switched to Postgres, my WikiManager became missing, I used to use it to list all the wikis I have, now I searched WikiManger from my XWiki search combo box, no WikiManager anymore. Also when you create another wiki, how do you specify this new wiki to use different database? Thanks again for your help. Dave On Sun, Apr 8, 2012 at 6:38 AM, Guillaume Fenollar guillaume.fenol...@xwiki.com wrote: Hello, The point of XEM (manager) is to create subwiki. It's thus acting like a farm, and every subwiki can be managed in a totally different way. If there is troubles with XEM and postgres, it's about the subwiki creation (a subwiki is in fact a new database), which could not work with this database management system. You can try to create a subwiki (go into WikiManager space) and tell us if this step is working well :-) Regards Guillaume Fenollar 2012/4/8 ricardo.julio.rodriguez.fernan...@sergas.es Hi! From: users-boun...@xwiki.org [users-boun...@xwiki.org] On Behalf Of du du [ddd...@gmail.com] Sent: 07 April 2012 20:25 To: XWiki Users Subject: [xwiki-users] XWiki Enterprise or Manager Hi, all, I installed XWiki manager on one machine, and installed Enterprise on another machine, I cannot tell which is manager and which is enterprise sometimes. Anyway to check that? If you are talking about XWiki Enterprise Manager (XEM) when you said XWiki manager, I guess the simplest way is to look for XWiki Enterprise Manager specific pages in your installation. For instance, XemManager and WikiManager spaces. These spaces won't exist in a XWiki Enterprise (XE), the default wiki product based on the XWiki Platform, installation. Also, a XEM installation has two plugins XE doesn't need: com.xpn.xwiki.plugin.wikimanager.WikiManagerPlugin,\ com.xpn.xwiki.plugin.applicationmanager.ApplicationManagerPlugin and xwiki.virtual=1 in your xwiki.cfg file. I'm sure you have already checked this... http://manager.xwiki.org/xwiki/bin/view/AdminGuide/Installation#HTutorials Also the user's guide says the manager does not support postgresql, I checked the hibernate config file, switched from mysql to postgres, now both versions of my xwiki are using postgres on different machine, they both work fine, but I am not sure whether something may go wrong someday with the manager because I switched the postgresql for it, so what are the concerns of using postgres with xwiki manager? how do I overcome? Hot on databases support... http://dev.xwiki.org/xwiki/bin/view/Community/DatabaseSupportStrategy http://markmail.org/message/b4eihzaulneqiqhd Please, could you post the link to the page where is said that PostgreSQL is not supported? Probably an update is needed there or a but is required in the DatabaseSupportStrategy brand new page! HTH! Ricardo Thanks Dave ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users Nota: A informaci?n contida nesta mensaxe e os seus posibles documentos adxuntos ? privada e confidencial e est? dirixida ?nicamente ? seu destinatario/a. Se vostede non ? o/a destinatario/a orixinal desta mensaxe, por favor elim?nea. A distribuci?n ou copia desta mensaxe non est? autorizada. Nota: La informaci?n contenida en este mensaje y sus posibles documentos adjuntos es privada y confidencial y est? dirigida ?nicamente a su destinatario/a. Si usted no es el/la destinatario/a original de este mensaje, por favor elim?nelo. La distribuci?n o copia de este mensaje no est? autorizada. See more languages: http://www.sergas.es/aviso_confidencialidad.htm ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] [xwiki-devs] Blog.CreatePost forwarded to wrong url
Thanks for your response. Dave On Sat, Apr 7, 2012 at 12:20 PM, Sergiu Dumitriu ser...@xwiki.com wrote: On 04/06/2012 09:07 PM, du du wrote: Hi, all, I got a weired problem with url handling, when I am on this page: http://mydomain.com/xwikim/**bin/view/Blog/CreatePosthttp://mydomain.com/xwikim/bin/view/Blog/CreatePost, which gives me a create post button to create post, I check the form action url is: /xwikim/bin/view/Blog/**CreatePost?xpage=plain, when I click on the create button, it comes to this url: http://localhost/xwikim/bin/**edit/Blog/Post+title?template=** Blog.BlogPostTemplateparent=**Blog.WebHometitle=Post+title** Blog.BlogPostClass_0_title=**Post+titleform_token=** SviDayJaWpElmFlAzjoSKwhttp://localhost/xwikim/bin/edit/Blog/Post+title?template=Blog.BlogPostTemplateparent=Blog.WebHometitle=Post+titleBlog.BlogPostClass_0_title=Post+titleform_token=SviDayJaWpElmFlAzjoSKw , from which I got Unable to connect error, I am not sure why it switched from mydomain.com to localhost, all other links and buttons are working fine without this kind of problem. My setup is like that I have an apache web server installed with port 80 opened to the public internet, which forwards request to tomcat with port 8082 on localhost. all other links work fine, only the createpost has this problem. Any clue from any of you? Thanks very much in advance The quickest way is to change the way the reverse proxy works, switch from mod_proxy_http to mod_proxy_ajp. This means that you have to: - make sure the mod_proxy_ajp module is active - make sure that the Tomcat AJP connector is active - change the URL that Apache HTTPD connects to from http:// to ajp://localhost:8009/xwikim/ (use the right port on which the AJP connector is listening) -- Sergiu Dumitriu http://purl.org/net/sergiu/ __**_ users mailing list users@xwiki.org http://lists.xwiki.org/**mailman/listinfo/usershttp://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] [xwiki-devs] File Upload Page
Thanks very much for your response, I will take a look. Dave On Sat, Apr 7, 2012 at 12:15 PM, Sergiu Dumitriu ser...@xwiki.com wrote: On 04/06/2012 07:18 PM, du du wrote: Hi, all, I am trying to add a file upload page to xwiki, since the FileUploadPlugin java class is deprecated, is there any other fileupload component available for reuse? if no, I need to create the component on my own, my concern is I need to insert the file uploaded into database and keep it separate from all the other wiki tables, I like to create a separate table specifically for files uploaded, that means I need to use Hibernate in java code to handle that, any examples about how to do that? BTW, I am coming from IBatis background. Thanks in advance There is no alternative to the plugin yet, but I've been working on a replacement these past days, I'll commit it after the master becomes 4.1-SNAPSHOT (probably next Tuesday). Example of code using Hibernate directly: https://github.com/xwiki/**xwiki-platform/blob/master/** xwiki-platform-core/xwiki-**platform-activitystream/src/** main/java/com/xpn/xwiki/**plugin/activitystream/impl/** ActivityStreamImpl.javahttps://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-activitystream/src/main/java/com/xpn/xwiki/plugin/activitystream/impl/ActivityStreamImpl.java And the associated mapping file: https://github.com/xwiki/**xwiki-platform/blob/master/** xwiki-platform-core/xwiki-**platform-activitystream/src/** main/resources/activitystream.**hbm.xmlhttps://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-activitystream/src/main/resources/activitystream.hbm.xml You'll need to add the name of the mapping file in hibernate.cfg.xml to enable this extra mapping. -- Sergiu Dumitriu http://purl.org/net/sergiu/ __**_ users mailing list users@xwiki.org http://lists.xwiki.org/**mailman/listinfo/usershttp://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] XWiki Enterprise or Manager
Hi, all, I installed XWiki manager on one machine, and installed Enterprise on another machine, I cannot tell which is manager and which is enterprise sometimes. Anyway to check that? Also the user's guide says the manager does not support postgresql, I checked the hibernate config file, switched from mysql to postgres, now both versions of my xwiki are using postgres on different machine, they both work fine, but I am not sure whether something may go wrong someday with the manager because I switched the postgresql for it, so what are the concerns of using postgres with xwiki manager? how do I overcome? Thanks Dave ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] How to add a sub-menu button for image menu in wysiwyg editor inline form
Ok, thanks very much for your help. Dave On Fri, Apr 6, 2012 at 6:50 AM, Marius Dumitru Florea mariusdumitru.flo...@xwiki.com wrote: On Fri, Apr 6, 2012 at 1:49 AM, du du ddd...@gmail.com wrote: Hi, all, I am trying to add an addComments sub-menu item to image button from the menu bar of WYSIWYG editor, what it does is to add comments for an image inserted in the editor because I need to explain what each image is about after I put it in the editor, I checked the class:XWiki.WysiwygEditorConfigClass and the wysiwyg.js, I added a sub-menu in the WysiwygEditorConfigClass for image menu, but after that, I got lost, this sub-menu button is supposed to connect to a plugin to trigger java to run I believe since it is a plugin and each sub-menu like imageInsertAttached, imageInsertURL is a plugin, but I could not find the code where it calls a plugin, so how is the sub-menu button hooked to the plugin? when a user clicks on the submenu button in the editor (inline form) page, which javascript function gets called? You can find here https://github.com/xwiki/xwiki-platform/tree/master/xwiki-platform-core/xwiki-platform-wysiwyg the code of the WYSIWYG content editor. For instance, the image plugin, which handles the image menu, is located here https://github.com/xwiki/xwiki-platform/tree/master/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-client/src/main/java/org/xwiki/gwt/wysiwyg/client/plugin/image . The actual code that fills the image menu is https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-client/src/main/java/org/xwiki/gwt/wysiwyg/client/plugin/image/ImageMenuExtension.java . You should know that the WYSIWYG content editor is written using Google WebToolkit (GWT). The Java code is compiled into JavaScript at build time. Hope this helps, Marius Thanks very much in advance!! Dave ___ 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] File Upload Page
Hi, all, I am trying to add a file upload page to xwiki, since the FileUploadPlugin java class is deprecated, is there any other fileupload component available for reuse? if no, I need to create the component on my own, my concern is I need to insert the file uploaded into database and keep it separate from all the other wiki tables, I like to create a separate table specifically for files uploaded, that means I need to use Hibernate in java code to handle that, any examples about how to do that? BTW, I am coming from IBatis background. Thanks in advance Dave ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] XWikiPreferences Source Code
Hi, all, One question, I am trying to look at the source code of XWikiPreferences class, AdminSheet class, but after I searched Data Type, I got a lot of classes back, I clicked on these two classes, it always shows the rendering result, I have no way to look at the velocity code behind the classes, but other classes like BlogClass, I can go inside the BlogSheet and use Edit button - Wiki to see the velocty code, why for these two classes I cannot see the code, any ideas? Thanks Dave ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Blog.CreatePost forwarded to wrong url
Hi, all, I got a weired problem with url handling, when I am on this page: http://mydomain.com/xwikim/bin/view/Blog/CreatePost, which gives me a create post button to create post, I check the form action url is: /xwikim/bin/view/Blog/CreatePost?xpage=plain, when I click on the create button, it comes to this url: http://localhost/xwikim/bin/edit/Blog/Post+title?template=Blog.BlogPostTemplateparent=Blog.WebHometitle=Post+titleBlog.BlogPostClass_0_title=Post+titleform_token=SviDayJaWpElmFlAzjoSKw, from which I got Unable to connect error, I am not sure why it switched from mydomain.com to localhost, all other links and buttons are working fine without this kind of problem. My setup is like that I have an apache web server installed with port 80 opened to the public internet, which forwards request to tomcat with port 8082 on localhost. all other links work fine, only the createpost has this problem. Any clue from any of you? Thanks very much in advance Dave ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] How to add a sub-menu button for image menu in wysiwyg editor inline form
Hi, all, I am trying to add an addComments sub-menu item to image button from the menu bar of WYSIWYG editor, what it does is to add comments for an image inserted in the editor because I need to explain what each image is about after I put it in the editor, I checked the class:XWiki.WysiwygEditorConfigClass and the wysiwyg.js, I added a sub-menu in the WysiwygEditorConfigClass for image menu, but after that, I got lost, this sub-menu button is supposed to connect to a plugin to trigger java to run I believe since it is a plugin and each sub-menu like imageInsertAttached, imageInsertURL is a plugin, but I could not find the code where it calls a plugin, so how is the sub-menu button hooked to the plugin? when a user clicks on the submenu button in the editor (inline form) page, which javascript function gets called? Thanks very much in advance!! Dave ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] [xwiki-devs] Questions about Blog Example
Hi, Anca, Thanks very much for your response, I understand how data are saved to database now, but I got another question: In the following code from BlogPostSheet dl dt$msg.get('xe.blog.sheet.title')/dt dd$doc.display('title', 'edit', $entryObj)/dd dt$msg.get('xe.blog.sheet.content')/dt dd$doc.display('content', 'edit', $entryObj)/dd dtFeature ID:/dt dd$doc.display('FID', 'view', $entryObj)/dd dtPackage ID:/dt dd$doc.display('PID', 'view', $entryObj)/dd div class=clearfloats/div /dd /dl If I change the 'view' to 'edit' for both FID and PID, then both of FID and PID will be saved to database, and I can query retrieve them, but I have use view, then they are not saved to database. the problem is I donot want these two fields editable, so I have to use view, any workaround for this? so the bottom line is I want them to be saved to database and not editable from the inline form. Thanks again for your help. Dave On Wed, Mar 28, 2012 at 4:47 AM, Anca Luca lu...@xwiki.com wrote: Hi Dave, You should read http://platform.xwiki.org/**xwiki/bin/view/DevGuide/** Architecturehttp://platform.xwiki.org/xwiki/bin/view/DevGuide/Architecture, but I understand that it might be cryptic for a first time usage so here we go: must know that xwiki is a java engine, so there is some java code that does things, it's not all done in velocity. Basically, there is a java platform that can handle documents, objects in documents, classes, etc (load, save) and then there is the velocity scripting that you can do in wiki pages which **uses** this core (injected variables like $xwiki, $doc). See here about how this scripting in pages works: http://platform.xwiki.org/**xwiki/bin/view/DevGuide/**Scriptinghttp://platform.xwiki.org/xwiki/bin/view/DevGuide/Scripting. Also, there are some interesting information about the data model here http://platform.xwiki.org/**xwiki/bin/view/DevGuide/**DataModelhttp://platform.xwiki.org/xwiki/bin/view/DevGuide/DataModel. The 'platform' project on git contains all this 'platform' code: java sources, default templates, default js, css, etc, which you can enhance in wiki pages (but we don't do everything in wiki pages, so you should not look for it only in wiki pages). Also, there are a bunch of default velocity templates that handle the default layout and actions for the wiki (in the webapps/xwiki/templates folder of the installation). For example, the save and view button is generated by these templates, along with the url to which the data in the form is posted. I recommend firebug and LiveHttpheaders extensions of firefox to study what data is posted to which URL, etc what data is received. from then on, with the help of http://platform.xwiki.org/**xwiki/bin/view/DevGuide/** Architecture#**HUnderstandinghowHTTPrequestsa**rehandledhttp://platform.xwiki.org/xwiki/bin/view/DevGuide/Architecture#HUnderstandinghowHTTPrequestsarehandled, you should be able to find the code that actually does the save. Have fun, Anca On 03/28/2012 05:42 AM, du du wrote: Also from the following BlogPostSheet wiki code, after users type in message from the inline form, users click Save View button, how are the messages saved to database? see the attached code: {{include document=Blog.BlogCode/}} {{include document=Blog.CategoriesCode**/}} {{velocity filter=none}} {{html clean=false wiki=true}} $xwiki.jsx.use('Blog.**ManageCategories', {'mode' : 'select'})## $xwiki.ssx.use('Blog.**ManageCategories')## #getEntryObject($doc $entryObj) #if($!entryObj == '') #warning($msg.get('xe.blog.**sheet.notpost')) ## Keep testing the inline action for backward compatibility with older blog posts. #elseif($xcontext.action != 'edit' $xcontext.action != 'inline') ## View mode #isPublished($entryObj $isPublished) #isHidden($entryObj $isHidden) ## displayBlog requires a list of documents, and whether to display only an extract or the full entry. #displayBlog([$tdoc] 'single' false false) #else dl dt$msg.get('xe.blog.sheet.**title')/dt dd$doc.display('title', 'edit', $entryObj)/dd dt$msg.get('xe.blog.sheet.**content')/dt dd$doc.display('content', 'edit', $entryObj)/dd dt$msg.get('xe.blog.sheet.**summary')/dt dd$doc.display('extract', 'edit', $entryObj)/dd dt$msg.get('xe.blog.sheet.**category')/dt dd #**displayCategoryManagementTree(**'' 'selectable') div class=clearfloats/div /dd /dl #template('tagedit.vm') #isPublished($entryObj $isPublished) #if($isPublished) #if($doc.creator == $xcontext.user) #publishMessageBox($msg.get('**xe.blog.sheet.publicationdate'**, [${doc.display('publishDate', 'view', $entryObj)}])) #set($hideArticle = ${doc.display('hidden', 'edit', $entryObj)}) #hideMessageBox($msg.get('xe.**blog.sheet.hidearticle', [${hideArticle}])) #end #else #set($defaultDate = $xwiki.getDocument($**blogPostTemplate).getObject
Re: [xwiki-users] [xwiki-devs] Questions about Blog Example
By the way I added these two fields for testing. Dave On Wed, Mar 28, 2012 at 10:01 PM, du du ddd...@gmail.com wrote: Hi, Anca, Thanks very much for your response, I understand how data are saved to database now, but I got another question: In the following code from BlogPostSheet dl dt$msg.get('xe.blog.sheet.title')/dt dd$doc.display('title', 'edit', $entryObj)/dd dt$msg.get('xe.blog.sheet.content')/dt dd$doc.display('content', 'edit', $entryObj)/dd dtFID:/dt dd$doc.display('FID', 'view', $entryObj)/dd dtPID:/dt dd$doc.display('PID', 'view', $entryObj)/dd div class=clearfloats/div /dd /dl If I change the 'view' to 'edit' for both FID and PID, then both of FID and PID will be saved to database, and I can query retrieve them, but I have use view, then they are not saved to database. the problem is I donot want these two fields editable, so I have to use view, any workaround for this? so the bottom line is I want them to be saved to database and not editable from the inline form. Thanks again for your help. Dave On Wed, Mar 28, 2012 at 4:47 AM, Anca Luca lu...@xwiki.com wrote: Hi Dave, You should read http://platform.xwiki.org/**xwiki/bin/view/DevGuide/** Architecturehttp://platform.xwiki.org/xwiki/bin/view/DevGuide/Architecture, but I understand that it might be cryptic for a first time usage so here we go: must know that xwiki is a java engine, so there is some java code that does things, it's not all done in velocity. Basically, there is a java platform that can handle documents, objects in documents, classes, etc (load, save) and then there is the velocity scripting that you can do in wiki pages which **uses** this core (injected variables like $xwiki, $doc). See here about how this scripting in pages works: http://platform.xwiki.org/**xwiki/bin/view/DevGuide/**Scriptinghttp://platform.xwiki.org/xwiki/bin/view/DevGuide/Scripting. Also, there are some interesting information about the data model here http://platform.xwiki.org/**xwiki/bin/view/DevGuide/**DataModelhttp://platform.xwiki.org/xwiki/bin/view/DevGuide/DataModel. The 'platform' project on git contains all this 'platform' code: java sources, default templates, default js, css, etc, which you can enhance in wiki pages (but we don't do everything in wiki pages, so you should not look for it only in wiki pages). Also, there are a bunch of default velocity templates that handle the default layout and actions for the wiki (in the webapps/xwiki/templates folder of the installation). For example, the save and view button is generated by these templates, along with the url to which the data in the form is posted. I recommend firebug and LiveHttpheaders extensions of firefox to study what data is posted to which URL, etc what data is received. from then on, with the help of http://platform.xwiki.org/**xwiki/bin/view/DevGuide/** Architecture#**HUnderstandinghowHTTPrequestsa**rehandledhttp://platform.xwiki.org/xwiki/bin/view/DevGuide/Architecture#HUnderstandinghowHTTPrequestsarehandled, you should be able to find the code that actually does the save. Have fun, Anca On 03/28/2012 05:42 AM, du du wrote: Also from the following BlogPostSheet wiki code, after users type in message from the inline form, users click Save View button, how are the messages saved to database? see the attached code: {{include document=Blog.BlogCode/}} {{include document=Blog.CategoriesCode**/}} {{velocity filter=none}} {{html clean=false wiki=true}} $xwiki.jsx.use('Blog.**ManageCategories', {'mode' : 'select'})## $xwiki.ssx.use('Blog.**ManageCategories')## #getEntryObject($doc $entryObj) #if($!entryObj == '') #warning($msg.get('xe.blog.**sheet.notpost')) ## Keep testing the inline action for backward compatibility with older blog posts. #elseif($xcontext.action != 'edit' $xcontext.action != 'inline') ## View mode #isPublished($entryObj $isPublished) #isHidden($entryObj $isHidden) ## displayBlog requires a list of documents, and whether to display only an extract or the full entry. #displayBlog([$tdoc] 'single' false false) #else dl dt$msg.get('xe.blog.sheet.**title')/dt dd$doc.display('title', 'edit', $entryObj)/dd dt$msg.get('xe.blog.sheet.**content')/dt dd$doc.display('content', 'edit', $entryObj)/dd dt$msg.get('xe.blog.sheet.**summary')/dt dd$doc.display('extract', 'edit', $entryObj)/dd dt$msg.get('xe.blog.sheet.**category')/dt dd #**displayCategoryManagementTree(**'' 'selectable') div class=clearfloats/div /dd /dl #template('tagedit.vm') #isPublished($entryObj $isPublished) #if($isPublished) #if($doc.creator == $xcontext.user) #publishMessageBox($msg.get('**xe.blog.sheet.publicationdate'**, [${doc.display('publishDate', 'view', $entryObj)}])) #set($hideArticle = ${doc.display('hidden', 'edit', $entryObj)}) #hideMessageBox($msg.get('xe.**blog.sheet.hidearticle
Re: [xwiki-users] [xwiki-devs] Questions about Blog Example
Thanks, got it. Dave On Wed, Mar 28, 2012 at 10:49 PM, Sergiu Dumitriu ser...@xwiki.com wrote: On 03/28/2012 10:01 PM, du du wrote: Hi, Anca, Thanks very much for your response, I understand how data are saved to database now, but I got another question: In the following code from BlogPostSheet dl dt$msg.get('xe.blog.sheet.**title')/dt dd$doc.display('title', 'edit', $entryObj)/dd dt$msg.get('xe.blog.sheet.**content')/dt dd$doc.display('content', 'edit', $entryObj)/dd dtFeature ID:/dt dd$doc.display('FID', 'view', $entryObj)/dd dtPackage ID:/dt dd$doc.display('PID', 'view', $entryObj)/dd div class=clearfloats/div /dd /dl If I change the 'view' to 'edit' for both FID and PID, then both of FID and PID will be saved to database, and I can query retrieve them, but I have use view, then they are not saved to database. the problem is I donot want these two fields editable, so I have to use view, any workaround for this? so the bottom line is I want them to be saved to database and not editable from the inline form. 'view' display only prints those values as text, not as form elements, so it's normal that the values don't get back to the database. You should display them again with 'hidden' as the display mode, which will create hidden input elements with their current value. Still, I hope you're not using those parameters as something secure, since any attacker could just send any value he wants to the server; always make sure security is thoroughly implemented on the server, never trust data from the client. Thanks again for your help. Dave On Wed, Mar 28, 2012 at 4:47 AM, Anca Lucalu...@xwiki.com wrote: Hi Dave, You should read http://platform.xwiki.org/xwiki/bin/view/DevGuide/**http://platform.xwiki.org/**xwiki/bin/view/DevGuide/** Architecturehttp://platform.**xwiki.org/xwiki/bin/view/** DevGuide/Architecturehttp://platform.xwiki.org/xwiki/bin/view/DevGuide/Architecture, but I understand that it might be cryptic for a first time usage so here we go: must know that xwiki is a java engine, so there is some java code that does things, it's not all done in velocity. Basically, there is a java platform that can handle documents, objects in documents, classes, etc (load, save) and then there is the velocity scripting that you can do in wiki pages which **uses** this core (injected variables like $xwiki, $doc). See here about how this scripting in pages works: http://platform.xwiki.org/xwiki/bin/view/DevGuide/ Scriptinghttp://platform.xwiki.org/**xwiki/bin/view/DevGuide/**Scripting http://platform.**xwiki.org/xwiki/bin/view/**DevGuide/Scriptinghttp://platform.xwiki.org/xwiki/bin/view/DevGuide/Scripting . Also, there are some interesting information about the data model here http://platform.xwiki.org/xwiki/bin/view/DevGuide/DataModelhttp://platform.xwiki.org/**xwiki/bin/view/DevGuide/**DataModel http://platform.**xwiki.org/xwiki/bin/view/**DevGuide/DataModelhttp://platform.xwiki.org/xwiki/bin/view/DevGuide/DataModel . The 'platform' project on git contains all this 'platform' code: java sources, default templates, default js, css, etc, which you can enhance in wiki pages (but we don't do everything in wiki pages, so you should not look for it only in wiki pages). Also, there are a bunch of default velocity templates that handle the default layout and actions for the wiki (in the webapps/xwiki/templates folder of the installation). For example, the save and view button is generated by these templates, along with the url to which the data in the form is posted. I recommend firebug and LiveHttpheaders extensions of firefox to study what data is posted to which URL, etc what data is received. from then on, with the help of http://platform.xwiki.org/ xwiki/bin/view/DevGuide/**http://platform.xwiki.org/**xwiki/bin/view/DevGuide/** Architecture#HUnderstandinghowHTTPrequestsarehandled http://platform.**xwiki.org/xwiki/bin/view/**DevGuide/Architecture#** HUnderstandinghowHTTPrequestsa**rehandledhttp://platform.xwiki.org/xwiki/bin/view/DevGuide/Architecture#HUnderstandinghowHTTPrequestsarehandled, you should be able to find the code that actually does the save. Have fun, Anca On 03/28/2012 05:42 AM, du du wrote: Also from the following BlogPostSheet wiki code, after users type in message from the inline form, users click Save View button, how are the messages saved to database? see the attached code: {{include document=Blog.BlogCode/}} {{include document=Blog.CategoriesCode/}} {{velocity filter=none}} {{html clean=false wiki=true}} $xwiki.jsx.use('Blog.ManageCategories', {'mode' : 'select'})## $xwiki.ssx.use('Blog.ManageCategories')## #getEntryObject($doc $entryObj) #if($!entryObj == '') #warning($msg.get('xe.blog.sheet.notpost')) ## Keep testing the inline action for backward compatibility with older blog posts
Re: [xwiki-users] Questions about Blog Example
Also from the following BlogPostSheet wiki code, after users type in message from the inline form, users click Save View button, how are the messages saved to database? see the attached code: {{include document=Blog.BlogCode/}} {{include document=Blog.CategoriesCode/}} {{velocity filter=none}} {{html clean=false wiki=true}} $xwiki.jsx.use('Blog.ManageCategories', {'mode' : 'select'})## $xwiki.ssx.use('Blog.ManageCategories')## #getEntryObject($doc $entryObj) #if($!entryObj == '') #warning($msg.get('xe.blog.sheet.notpost')) ## Keep testing the inline action for backward compatibility with older blog posts. #elseif($xcontext.action != 'edit' $xcontext.action != 'inline') ## View mode #isPublished($entryObj $isPublished) #isHidden($entryObj $isHidden) ## displayBlog requires a list of documents, and whether to display only an extract or the full entry. #displayBlog([$tdoc] 'single' false false) #else dl dt$msg.get('xe.blog.sheet.title')/dt dd$doc.display('title', 'edit', $entryObj)/dd dt$msg.get('xe.blog.sheet.content')/dt dd$doc.display('content', 'edit', $entryObj)/dd dt$msg.get('xe.blog.sheet.summary')/dt dd$doc.display('extract', 'edit', $entryObj)/dd dt$msg.get('xe.blog.sheet.category')/dt dd #displayCategoryManagementTree('' 'selectable') div class=clearfloats/div /dd /dl #template('tagedit.vm') #isPublished($entryObj $isPublished) #if($isPublished) #if($doc.creator == $xcontext.user) #publishMessageBox($msg.get('xe.blog.sheet.publicationdate', [${doc.display('publishDate', 'view', $entryObj)}])) #set($hideArticle = ${doc.display('hidden', 'edit', $entryObj)}) #hideMessageBox($msg.get('xe.blog.sheet.hidearticle', [${hideArticle}])) #end #else #set($defaultDate = $xwiki.getDocument($blogPostTemplate).getObject($blogPostClassname).getProperty('publishDate').value.time) #if($entryObj.getProperty('publishDate').value.time == $defaultDate) ## The publish date was not set, force it to be the creation date $entryObj.set('publishDate', $doc.creationDate) #end #publishMessageBox($msg.get('xe.blog.sheet.notpublished') label**$msg.get('xe.blog.sheet.publish') ${doc.display('published', 'edit', $entryObj)}**/label\\label$msg.get('xe.blog.sheet.setdate') ${doc.display('publishDate', 'edit', $entryObj)}/label) #end #end {{/html}} {{/velocity}} Thanks Dave On Tue, Mar 27, 2012 at 11:36 PM, du du ddd...@gmail.com wrote: Hi, all I am studying the BlogClass, BlogPostClass, I checked the Blog.BlogCode, there are alot of velocity scripts, I can see the search documents from db, but could not find any code related to insert document records into database, so how is the document created from blog saved into database? please point me to the script code in the Blog.BlogCode. Thanks Dave ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] How to use ajax to get xml data returned from xwiki component
Hi, Thomas, Thanks for your response, I changed to this url: http://localhost:8080/xwikim/bin/get/Main/hellotest?outputSyntax=plain But I got responseXML containing this error: XML Parsing Error: no element found Location: http://localhost:8080/xwikim/bin/get/Main/hellotest?outputSyntax=plain Line Number 1, Column 1: then I changed to this velocity code: {{velocity output='false'}} $response.setContentType('application/xml') #set ($out = $response.getOutputStream()) $out.write(?xml version='1.0' encoding='ISO-8859-1'?testtest done/test) $out.flush() ##$out.close() {{/velocity}} Still the same parsing error, any clue? Thanks Dave On Sat, Mar 24, 2012 at 4:38 AM, Thomas Mortagne thomas.morta...@xwiki.comwrote: On Sat, Mar 24, 2012 at 3:23 AM, du du ddd...@gmail.com wrote: Hi, all, I followed this link: http://platform.xwiki.org/xwiki/bin/DevGuide/WritingComponents created a component which return xml data. Also I created a hellotest page inside the main space, and wrote the following velocity code: {{velocity output='false'}} $response.setContentType('application/xml') #set ($xmldata= $services.hello.getHelloXML()) $xmldata ##$context.setFinished(true) #set ($out = $response.getOutputStream()) $out.write($xmldata) $out.flush() {{/velocity}} I tested this code, I can get the xml data, now I use this ajax code to retrieve the xml data: var xmlhttp = GetXmlHttp(); if (xmlhttp) { xmlhttp.open(GET, url, true); xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState == 4) { xmlResult = xmlhttp.responseText; .. xmlhttp.send(null); } The url I used is: url = ' http://localhost:8080/xwikim/bin/view/Main/hellotest?outputSyntax=plain' when I debug with firefox to see the data inside xmlhttp either responseText or response, they were all a html document for the hellotest with the tags like body, div, etc, it is basically helltest.html file if you view the source code of this html page. I tried to change the output to true, the result is the same. That's because with this URL you get UI around your content (whatever is the syntax of your content), for this kind of use case you should use /get/ action instead of /view/. Question: how can I get the xml data? where am I wrong? Thanks very much in advance. Dave ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users -- Thomas Mortagne ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] [xwiki-devs] How to use ajax to get xml data returned from xwiki component
Hi, Sergiu Dumitriu I tried your way like this: {{velocity output='false'}} $response.setContentType('application/xml') #set ($out = $response.getOutputStream()) #set ($s = ?xml version='1.0' encoding='ISO-8859-1'?testtest done/test) $out.write($s.getBytes('ISO-8859-1')) {{/velocity}} But this still has the same parsing error: XML Parsing Error: no element found Location: http://localhost:8080/xwikim/bin/get/Geo/hellotest?outputSyntax=plain Line Number 1, Column 1: ^ I tried both from the ajax call and the link: http://localhost:8080/xwikim/bin/get/Main/hellotest?outputSyntax=plain and I got the same error. Any more clue? Thanks for your help. Dave On Sat, Mar 24, 2012 at 10:41 AM, Sergiu Dumitriu ser...@xwiki.com wrote: On 03/24/2012 09:33 AM, du du wrote: Hi, Thomas, Thanks for your response, I changed to this url: http://localhost:8080/xwikim/**bin/get/Main/hellotest?** outputSyntax=plainhttp://localhost:8080/xwikim/bin/get/Main/hellotest?outputSyntax=plain But I got responseXML containing this error: XML Parsing Error: no element found Location: http://localhost:8080/xwikim/**bin/get/Main/hellotest?** outputSyntax=plainhttp://localhost:8080/xwikim/bin/get/Main/hellotest?outputSyntax=plainLine Number 1, Column 1: then I changed to this velocity code: {{velocity output='false'}} $response.setContentType('**application/xml') #set ($out = $response.getOutputStream()) $out.write(?xml version='1.0' encoding='ISO-8859-1'?test**test done/test) $out is an OutputStream, which doesn't have a write(String) method. You must give it a byte[] argument, so this works: #set ($s = ?xml version='1.0' encoding='ISO-8859-1'?test**test done/test) $out.write($s.getBytes('ISO-**8859-1')) $out.flush() ##$out.close() {{/velocity}} Still the same parsing error, any clue? Thanks Dave On Sat, Mar 24, 2012 at 4:38 AM, Thomas Mortagne thomas.morta...@xwiki.com**wrote: On Sat, Mar 24, 2012 at 3:23 AM, du duddd...@gmail.com wrote: Hi, all, I followed this link: http://platform.xwiki.org/**xwiki/bin/DevGuide/**WritingComponentshttp://platform.xwiki.org/xwiki/bin/DevGuide/WritingComponents created a component which return xml data. Also I created a hellotest page inside the main space, and wrote the following velocity code: {{velocity output='false'}} $response.setContentType('**application/xml') #set ($xmldata= $services.hello.getHelloXML()) $xmldata ##$context.setFinished(true) #set ($out = $response.getOutputStream()) $out.write($xmldata) $out.flush() {{/velocity}} I tested this code, I can get the xml data, now I use this ajax code to retrieve the xml data: var xmlhttp = GetXmlHttp(); if (xmlhttp) { xmlhttp.open(GET, url, true); xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState == 4) { xmlResult = xmlhttp.responseText; .. xmlhttp.send(null); } The url I used is: url = ' http://localhost:8080/xwikim/**bin/view/Main/hellotest?** outputSyntax=plainhttp://localhost:8080/xwikim/bin/view/Main/hellotest?outputSyntax=plain ' when I debug with firefox to see the data inside xmlhttp either responseText or response, they were all a html document for the hellotest with the tags like body, div, etc, it is basically helltest.html file if you view the source code of this html page. I tried to change the output to true, the result is the same. That's because with this URL you get UI around your content (whatever is the syntax of your content), for this kind of use case you should use /get/ action instead of /view/. Question: how can I get the xml data? where am I wrong? Thanks very much in advance. -- Sergiu Dumitriu http://purl.org/net/sergiu/ __**_ devs mailing list d...@xwiki.org http://lists.xwiki.org/**mailman/listinfo/devshttp://lists.xwiki.org/mailman/listinfo/devs ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] How to use ajax to get xml data returned from xwiki component
Hi, all, I followed this link: http://platform.xwiki.org/xwiki/bin/DevGuide/WritingComponents created a component which return xml data. Also I created a hellotest page inside the main space, and wrote the following velocity code: {{velocity output='false'}} $response.setContentType('application/xml') #set ($xmldata= $services.hello.getHelloXML()) $xmldata ##$context.setFinished(true) #set ($out = $response.getOutputStream()) $out.write($xmldata) $out.flush() {{/velocity}} I tested this code, I can get the xml data, now I use this ajax code to retrieve the xml data: var xmlhttp = GetXmlHttp(); if (xmlhttp) { xmlhttp.open(GET, url, true); xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState == 4) { xmlResult = xmlhttp.responseText; .. xmlhttp.send(null); } The url I used is: url = ' http://localhost:8080/xwikim/bin/view/Main/hellotest?outputSyntax=plain' when I debug with firefox to see the data inside xmlhttp either responseText or response, they were all a html document for the hellotest with the tags like body, div, etc, it is basically helltest.html file if you view the source code of this html page. I tried to change the output to true, the result is the same. Question: how can I get the xml data? where am I wrong? Thanks very much in advance. Dave ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] How to insert an image programmatically into the inline form and the image will show up when the create post inline form shows up
Hi, all, I am playing around with the blog post application, when users click the create post button, it brings up the inline form for users to put text in, I have another requirement, we need to write some velocity code somewhere to retrieve an image url from a database, so when the inline form shows up after users click create post button, the image automatically shows up in the inline form, users then type in more text, my question is where should I put the code in? also the BlogPostClass and BlogPostTemplate have TextArea objects, which create GWT inline form, this is where I need to put image in programmatically, so I am thinking about accessing the GWT code to insert image, could anybody point me to the right direction about how to approach this to put image into the inline form programmatically? Thanks David ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] [xwiki-devs] How to insert an image programmatically into the inline form and the image will show up when the create post inline form shows up
Hi, Andrey, Thanks for your response, so just think it as taking an image url from another site or a database table and you need to insert the image into the inline form of the blog post inline editor programmatically when the inline form shows up, how would you do that? I checked the XWikiwysiwyg.js file, it will be called before the inline form editor shows up, so this could be a good place to add code, if you have any idea, please let me know. Thanks again David On Sat, Mar 17, 2012 at 6:15 PM, Andrey Mavrin andrey.mavri...@gmail.comwrote: 2012/3/17 du du ddd...@gmail.com Hi, all, I am playing around with the blog post application, when users click the create post button, it brings up the inline form for users to put text in, I have another requirement, we need to write some velocity code somewhere to retrieve an image url from a database, so when the inline form shows up after users click create post button, the image automatically shows up in the inline form, users then type in more text, my question is where should I put the code in? also the BlogPostClass and BlogPostTemplate have TextArea objects, which create GWT inline form, this is where I need to put image in programmatically, so I am thinking about accessing the GWT code to insert image, could anybody point me to the right direction about how to approach this to put image into the inline form programmatically? Thanks David ___ devs mailing list d...@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs I really like the idea, and I would like to undertake it, as I think about what the user chose the location for pictures and text well I'm wondering whether your application to take the results from another site? For example, if two sites have the same polls, if they can share information? ___ devs mailing list d...@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users