[xwiki-users] 4 Questions - Livetable (1-3) , Photo Album (4)
1) I have a ToolClass with objects: Description (Description: TextArea), Title (Title: String), URL (URL: String). Creating a new Tool I have to fill out these objects. "Description" is a TextArea object (editor: PureText) and it can contain line breaks. In my Livetable I show these objects and their contents. But if I have a line break in "Description" my Livetable doesn't show anything. How can I solve this problem? Does anyone has an idea? Or do I have to remove "Description" from my Livetable list? Perhaps it is possible to transform all line breaks to one blank line? Or is this to complex?^^ Ps. What for are "Validation Regular Expression" and "Validation Message" in the "Description" object made. I tried to put things like [a-zA-Z] in but it doesnt work. Entering numbers still work. 2) I want to create a space where I can create pages which are all showen in my Livetable. This is my code: ####################################################################### ==== Type the title of your Wiki in the "Page Name" field and click on create.==== {{velocity}} {{html}} #if($hasEdit) #set($panelId = $util.generateRandomString(4)) <form method="post" action="$doc.getURL('view', 'xpage=create')" onsubmit="cancelCancelEdit()"> <div class="padded left"> <input type="hidden" name="tocreate" value="page"/> <dl> <dt> #set($pageInputId = "page$!{panelId}") <label for="$pageInputId">$msg.get('core.create.page')</label> </dt> <dd> #set($pageText = $msg.get('core.create.pageText')) <input type="text" id="$pageInputId" name="page" value="$pageText" onfocus="if(this.value=='$pageText') this.value=''" onblur="if(this.value=='') this.value='$pageText'"/> </dd> </dl> #set($parent = $services.model.serialize($doc.documentReference, "local")) <input type="hidden" name="parent" value="$!parent"/> <input type="submit" class="button" value="$msg.get('create')"/> </div> </form> #end {{/html}} {{/velocity}} ==== This table lists all the documents found in Projects-KnowHow.==== {{velocity}} #set($collist = ["doc.name", "doc.space", "doc.date", "doc.creator", "doc.author", "_actions"]) #set($colprops = { "doc.name" : { "type" : "text" , "size" : 30, "link" : "view"}, "doc.space" : { "type" : "hidden", "link" : "space"}, "doc.date" : { "type" : "date" }, "doc.creator" : { "type" : "text", "link" : "creator", "displayName" : "Creator"}, "doc.author" : { "type" : "text", "link" : "author"}, "_actions" : {"actions": ["edit","delete","rename"]} }) #set($options = { "topFilters":'<input type="hidden" size="${colprop.size}" name="doc.space" value="Projects-KnowHow" />', "translationPrefix" : "xe.index.", "rowCount": 10, "selectedColumn": "doc.date", "defaultOrder" : "desc" }) #livetable("projectsKnowHow" $collist $colprops $options) {{/velocity}} ####################################################################### With this code I have two problems. a) The result does not look nice. There is something like an empty Tag Cloud. (cause of topFilters) b) "WebPreferences" and "WebHome" is listed in my Livetable Does anyone know how to solve these two problems or perhaps a better solution for me? Ps. I also would like to hide this space (called: Projects-KnowHow) in my Space Panel. Because I have a space called "Projects" with links in it to other pages and also one to "Projects-KnowHow". So I don't need it in my Space Panel. But I think "Projects-KnowHow" must be a space to create pages in it...and it also makes it easyer to find pages with Lucene by searching in "Projects-KnowHow" For easyer to understand: Space Panel shows: *Projects *Page1 *Page2 *Space1 (Projects-KnowHow) *Sandbox *Space1 (Projects-KnowHow) But I wont see the last one....is something like this possible?! 3) As you can see in the code above I have in my Livetable: #set($colprops = { "_actions" : {"actions": ["edit","delete","rename"]} But "_actions" is "A special column to display a list of actions that can be performed by administrators on the matched documents." Is it possible to make it available to all other user who have edit and delete rights? 4) I have imported the Photo Album App. The only deficit of this App is, that I can only add one photo after another before I klick on attach. It would be better to mark all photos, klick on open to add them and then klick on attach. So attaching more files at once would be good. Is something like this possible or planned?! --- I am very grateful for any form of assistance (and I hope this would be my last questions ) -- View this message in context: http://xwiki.475771.n2.nabble.com/4-Questions-Livetable-1-3-Photo-Album-4-tp... Sent from the XWiki- Users mailing list archive at Nabble.com.
Aleks87 wrote:
3) As you can see in the code above I have in my Livetable: #set($colprops = { "_actions" : {"actions": ["edit","delete","rename"]}
But "_actions" is "A special column to display a list of actions that can be performed by administrators on the matched documents." Is it possible to make it available to all other user who have edit and delete rights?
I've found the "macros.vm" and I tried to change #if($colname != '_actions' || $hasAdmin) #elseif($colname != '_actions' || $hasAdmin) to #if($colname != '_actions' || $hasEdit) #elseif($colname != '_actions' || $hasEdit) Then user with Edit Rights and no Admin Rights can see the Actions column but without the icons (edit, delete, rename). Please, can someone who knows the code better tell me what I still need to change? -- View this message in context: http://xwiki.475771.n2.nabble.com/4-Questions-Livetable-1-3-Photo-Album-4-tp... Sent from the XWiki- Users mailing list archive at Nabble.com.
Aleks87 wrote:
1) I have a ToolClass with objects: Description (Description: TextArea), Title (Title: String), URL (URL: String). Creating a new Tool I have to fill out these objects. "Description" is a TextArea object (editor: PureText) and it can contain line breaks. In my Livetable I show these objects and their contents. But if I have a line break in "Description" my Livetable doesn't show anything.
How can I solve this problem? Does anyone has an idea? Or do I have to remove "Description" from my Livetable list? Perhaps it is possible to transform all line breaks to one blank line? Or is this to complex?^^
Ps. What for are "Validation Regular Expression" and "Validation Message" in the "Description" object made. I tried to put things like [a-zA-Z] in but it doesnt work. Entering numbers still work.
Here is a part of my ToolClassSheet file: <td class="label"><label>#displayPropName($class.get("Description")):</label></td> <td>$doc.display("Description", $obj)</td> I'm not allowed to enter line breaks in the Description field 'cause Livetable doesn't work then. Can someone tell me how to modify the $doc.display to filter out line breaks? -- View this message in context: http://xwiki.475771.n2.nabble.com/4-Questions-Livetable-1-3-Photo-Album-4-tp... Sent from the XWiki- Users mailing list archive at Nabble.com.
Aleks87 wrote:
Aleks87 wrote:
1) I have a ToolClass with objects: Description (Description: TextArea), Title (Title: String), URL (URL: String). Creating a new Tool I have to fill out these objects. "Description" is a TextArea object (editor: PureText) and it can contain line breaks. In my Livetable I show these objects and their contents. But if I have a line break in "Description" my Livetable doesn't show anything.
How can I solve this problem? Does anyone has an idea? Or do I have to remove "Description" from my Livetable list? Perhaps it is possible to transform all line breaks to one blank line? Or is this to complex?^^
Ps. What for are "Validation Regular Expression" and "Validation Message" in the "Description" object made. I tried to put things like [a-zA-Z] in but it doesnt work. Entering numbers still work.
Here is a part of my ToolClassSheet file:
<td class="label"><label>#displayPropName($class.get("Description")):</label></td> <td>$doc.display("Description", $obj)</td>
I'm not allowed to enter line breaks in the Description field 'cause Livetable doesn't work then. Can someone tell me how to modify the $doc.display to filter out line breaks?
My ToolClass is similiar to the TodoClass in the DevGuide. I have the idea to create another object called "string" and then to set the "Description" object equal to "string" object and transform the "string" object into a string. Then I can give out "string" in my Livetable. But I'm still not familiar with the API Guide (javadoc). I tried things like: #set($string = $Description.toString()) or $string = doc.getDoc("Description", $obj.toString()) But nothing had the wanted effect. Can someone help me please?! -- View this message in context: http://xwiki.475771.n2.nabble.com/4-Questions-Livetable-1-3-Photo-Album-4-tp... Sent from the XWiki- Users mailing list archive at Nabble.com.
participants (1)
-
Aleks87