Re: [xwiki-users] How to the restrict the user name and group name serach?
Hi Racardo, in templates/xwikivars.vm i already see below code #if ($hasAdmin || $isAdvancedUser) #set ($blacklistedSpaces = []) #else #set ($blacklistedSpaces = ['Import', 'Panels', 'Scheduler', 'Stats', 'XAppClasses', 'XAppSheets', 'XAppTemplates', 'XWiki', 'WatchCode', 'WatchSheets', 'XApp', 'WatchAdmin', 'Watch', 'ColorThemes', 'AnnotationCode']) #end As per above code looks like 'XWiki' space is already a blacklisted space nor user other than admin rights.But still i am able to search user and group name? On Wed, Mar 28, 2012 at 3:16 AM, ricardo.julio.rodriguez.fernan...@sergas.es wrote: Hi! From: users-boun...@xwiki.org [users-boun...@xwiki.org] On Behalf Of mohit gupta [motgu...@gmail.com] Sent: 27 March 2012 13:49 To: XWiki Users Subject: [xwiki-users] How to the restrict the user name and group name serach? Hi All, I dont want to allow the user name or group name search on xwiki(either it is on click of search button and search sugest). *Basically what i want is if any user put some user name or user group name in search text box , it should not return any results. Looking for your expert suggestion how i can go for it?* I am sure it should be possible in xwiki looking at its flexibility but could not figure it out how. Even if i have to make some modification in code iam open for that. Thanks in advance. By default, users and groups are created in XWiki space. Perhaps could it be useful and enough for you to blacklist XWiki space as stated here...? http://jira.xwiki.org/browse/XWIKI-6679 HTH! Ricardo ___ 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 3.5] Exception from activity stream ?
Now I get this exception for a page that I created (from copy) (see below). It happens in view, edit, delete, ... modes... Other pages seem to be ok though I did not navigate everywhere. But I'm really not confident now, as it seems there's something really unstable on my instance but I can't say what. Any idea ? Thanks, Jeremie -- View this message in context: http://xwiki.475771.n2.nabble.com/XWiki-3-5-Exception-from-activity-stream-tp7409460p7412611.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Questions about Blog Example
Hi, you might find it simpler to look at this example to understand how an XWiki application works: http://platform.xwiki.org/xwiki/bin/view/DevGuide/FAQTutorial Guillaume On Wed, Mar 28, 2012 at 07:05, Sergiu Dumitriu ser...@xwiki.com wrote: On 03/27/2012 11:36 PM, du du 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. The XWiki platform is the one that handles most of the stuff. Document creation, editing and removal are platform features. An XWiki application will never have to issue database INSERT statements, and will rarely even have to manually use $doc.save() to trigger changes manually. Form data is sent to the /save/ action, which corresponds to a Struts action, and which is written in Java (SaveAction). If you go further down into the code, you'll go through XWikiDocument.readFromForm, XWiki.saveDocument, XWikiHibernateStore.**saveXWikiDoc, and here you leave XWiki and go into other libraries like Hibernate, JDBC, C3P0. Please don't cross-post user questions to the devs list. -- 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] border in livetable CSS
Hi, Somebody could explain me why xwiki uses $theme.pageContentBackgroundColor as border color in resources/js/xwiki/table/livetable.css ? A background color as border color : that's weird only for me ? That's a problem for us because if we want use a dark color as border, columns label are unreadable (dark on dark). Why not use border color from color theme instead ? Thank you Best regards NCG ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Running as a service
On Mar 27, 2012, at 7:43 PM, Sergiu Dumitriu wrote: On 03/27/2012 01:39 PM, Sergiu Dumitriu wrote: XWiki is just a web application that's supposed to run in a container. XWiki can't run as a service, but some containers can. This means that it's not easy to run the standalone package as a service, but you could install Tomcat, for example, configure it to run as a service, and then import XWiki into tomcat. A quick Google search led me to this: http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html Posted on http://www.xwiki.org/xwiki/bin/FAQ/Is+it+possible+run+XWiki+as+a+windows+service%3F I have renamed the page and updated its content: http://www.xwiki.org/xwiki/bin/view/FAQ/Is+it+possible+to+run+XWiki+as+a+Windows+Service I've also removed the older FAQ entry that was already there at http://www.xwiki.org/xwiki/bin/view/FAQ/XWikiAsAService Thanks -Vincent ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] border in livetable CSS
Hi, First of all if would have been great to have a screenshot of what you were doing in order to understand better. On Wed, Mar 28, 2012 at 14:28, CHENEAU-GREHALLE Nicolas nicolas.cheneau-greha...@sesam-vitale.fr wrote: Hi, Somebody could explain me why xwiki uses $theme.pageContentBackgroundColor as border color in resources/js/xwiki/table/livetable.css ? When the livetable was made it suppose to work also for IE6 and IE7 and those browsers had problems displaying bottom-border on tr elements. This means that they needed to be constructed from the td s (that's why on IE6 you see a 1px spacing between columns). Also on the tag cloud, when you select a tag, the tag is marked with a border. In order not to have a flickr when you select and deselect the tag (because you add and remove the border) hat border is predisplayed, but 'transparent' by having the color of the $theme.pageContentBackgroundColor. A background color as border color : that's weird only for me ? That's a problem for us because if we want use a dark color as border, columns label are unreadable (dark on dark). I don't quite understand what's the problem. $theme.borderColor is used for the lines, $theme.backgroundSecondaryColor is used for the header and $theme.textColor is used for the labels. What is dark on dark? Why not use border color from color theme instead ? So, IMo is nothing wrong with the livetable's colors, but you can easy change the values to suit your need. Thanks, Caty Thank you Best regards NCG ___ 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] border in livetable CSS
As you can see on the screenshot, my problem is that according livetable.css, the background color of the column name field and the border color of the filter field are the same ($theme.backgroundSecondaryColor) = If I want a darker color for the border, the column name field is unreadable (dark background). I don't understand why xwiki uses $theme.backgroundSecondaryColor as border color. If I want change the behavior, I need to edit livetable.css directly and I don't like that. (problem of compatibility with future xwiki releases) Thanks, Nicolas -Message d'origine- De : users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] De la part de Ecaterina Moraru (Valica) Envoyé : mercredi 28 mars 2012 15:12 À : XWiki Users Objet : Re: [xwiki-users] border in livetable CSS Hi, First of all if would have been great to have a screenshot of what you were doing in order to understand better. On Wed, Mar 28, 2012 at 14:28, CHENEAU-GREHALLE Nicolas nicolas.cheneau-greha...@sesam-vitale.fr wrote: Hi, Somebody could explain me why xwiki uses $theme.pageContentBackgroundColor as border color in resources/js/xwiki/table/livetable.css ? When the livetable was made it suppose to work also for IE6 and IE7 and those browsers had problems displaying bottom-border on tr elements. This means that they needed to be constructed from the td s (that's why on IE6 you see a 1px spacing between columns). Also on the tag cloud, when you select a tag, the tag is marked with a border. In order not to have a flickr when you select and deselect the tag (because you add and remove the border) hat border is predisplayed, but 'transparent' by having the color of the $theme.pageContentBackgroundColor. A background color as border color : that's weird only for me ? That's a problem for us because if we want use a dark color as border, columns label are unreadable (dark on dark). I don't quite understand what's the problem. $theme.borderColor is used for the lines, $theme.backgroundSecondaryColor is used for the header and $theme.textColor is used for the labels. What is dark on dark? Why not use border color from color theme instead ? So, IMo is nothing wrong with the livetable's colors, but you can easy change the values to suit your need. Thanks, Caty Thank you Best regards NCG ___ 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] Horizontal menu like xwiki.org
Ecaterina Moraru (Valica) wrote You can download the menu code used for xwiki.org at http://extensions.xwiki.org/xwiki/bin/download/Extension/Navigation+Menu+Wiki+Macro/XWikiOrgCode.MenuMacro%2Dbranch%2Dxwikiorg.1.xar Thanks a lot Caty! All working great! Eugen -- View this message in context: http://xwiki.475771.n2.nabble.com/Horizontal-menu-like-xwiki-org-tp7411641p7414837.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
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 =
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)})
Re: [xwiki-users] [xwiki-devs] Questions about Blog Example
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/** 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
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.