Hello, I would like to know whether is possible refresh table data when I
change column for sorting.
Now, when I click to sort by some column, table is sorted with actual table
data, not with all data. I expect that is needed to add "order by" to sql
query, but what else should I add?
If this is not possible could I use livetable with data from sql query?
Thank you
Here is my code:
$xwiki.ssfx.use("js/xwiki/table/table.css")
$xwiki.jsfx.use("js/xwiki/table/tablefilterNsort.js", true)
#connectDbTEP($dbc)
#countRooms($pocetMistnosti)
#set($paginationParameters = {
'totalItems' : $pocetMistnosti,
'defaultItemsPerPage' : 15,
'url' : $doc.getURL('view', $queryParams)
})
#pagination($paginationParameters)
<table id="searchResults" class="grid sortable doOddEven">
<tr class="sortHeader">
<th>MÃstnost</th>
<th>Zodpovědná osoba</th>
<th class="unsortable">Operace</th>
</tr>
#foreach($row in $dbc.executeQuery("select id_room, mistnost, prijmeni,
jmeno from room, osoby where room.id_os = osoby.id_os limit
$paginationParameters.firstItem, $paginationParameters.itemsPerPage"))
<tr>
<td> $row.getString("mistnost") </td>
<td> $row.getString("prijmeni") $row.getString("jmeno")</td>
<td>
EditRoom?id_room=$row.getLong(
DeleteRoom?id_room=$row.getLong(
</td>
</tr>
#end
</table>
#set($discard = $paginationParameters.put('position', 'bottom'))
#pagination($paginationParameters)
--
View this message in context: http://xwiki.475771.n2.nabble.com/Pagination-macro-with-sortable-table-tp57…
Sent from the XWiki- Users mailing list archive at Nabble.com.
I am out of the office until 01/18/2011.
Out for the MLK holiday; back on Tuesday, 1/18.
Note: This is an automated response to your message "users Digest, Vol 42,
Issue 20" sent on 1/15/11 6:00:03.
This is the only notification you will receive while this person is away.
Hello,
I just upgraded from 2.3 to 2.7, after importing the new XAR the Main
space is showing "Unknown macro: activity, spaces, and tagcloud". Whats
going on here? I imported everything from the new XAR. Also as a side
note, all of the Wiki Preferences pages are showing a "<pre></pre>" in
the content.
Thanks.
Hi All,
I was playing with the faq tutorial and created my application based on that article. Now I have several
questions regarding that example:
1. Is it possible to exclude a certain object from displaying in the livetable, I mean how to achieve
something like that:
#set($sql = ", BaseObject as obj where obj.name = doc.fullName and obj.className = 'FAQ.FAQClass' and
obj.name <> 'FAQ.FAQTemplate'")
I don't want to have an empty template object listed in my table.
2. I've created a template with several text areas and one static list. Then I tried to create a livetable
out of this and when I choose to create a columns with the properties from text areas ( i.e. wykonawcy )
nothing is listed. Everything is fine in case of using only the static list (dzial_pcss) property:
{{velocity}}
#set($columns = ["dzial_pcss", "doc.creationDate", "_actions"])
#set($columnsProperties = {
"dzial_pcss" : { "displayName" : "Dział PCSS" },
"_actions" : {"actions": ["edit","delete"]}
})
#set($options = {
"className":"IPR.IPREntryClass",
"rowCount": 10
})
#livetable("userdirectory" $columns $columnsProperties $options)
{{/velocity}}
http://apps.man.poznan.pl/iprxwiki/bin/view/Sandbox/TestPage1
{{velocity}}
#set($columns = ["wykonawcy", "doc.creationDate", "_actions"])
#set($columnsProperties = {
"wykonawcy" : { "displayName" : "Wykonawcy" },
"_actions" : {"actions": ["edit","delete"]}
})
#set($options = {
"className":"IPR.IPREntryClass",
"rowCount": 10
})
#livetable("userdirectory1" $columns $columnsProperties $options)
{{/velocity}}
http://apps.man.poznan.pl/iprxwiki/bin/view/Sandbox/TestPage2
Here is the definition of my template class:
http://apps.man.poznan.pl/iprxwiki/bin/view/IPR/IPREntryClass
3. How to use the translationPrefix properly - is it for getting the pretty names for the headers - I'm
confused about that. Is the only way of setting the header names to use the "displayName" prop for the
columnsProperties ?
4. I have also tried the custom code both for creating new entries and displaying object with the use of sql
queries. Is it possible to create something similar to the _actions column we can use in the livetable, but
directly in the velocity code ( I mean how to access to the 'edit' 'delete' links ).
Thanks in advance :)
Regards,
Piotr
Hi all,
I'd like to use a link to an attachment in a blog comment, like
[[attach:demo.jpg]]. It causes a link to
http://<wiki>.<hostname>/xwiki/bin/download/Main/WebHome/demo.jpg -
that's wrong, it should be
http://<wiki>.<hostname>/xwiki/bin/download/Blog/<blog page>/demo.jpg
I am using xwiki 2.7.
Any hints?
Thanks
mb
By the way: What about WYSIWYG for comments?
Hi all,
I'd like to use a link to an attachment in a blog comment, like
[[attach:demo.jpg]]. It causes a link to
http://<wiki>.<hostname>/xwiki/bin/download/Main/WebHome/demo.jpg -
that's wrong, it should be
http://<wiki>.<hostname>/xwiki/bin/download/Blog/<blog page>/demo.jpg
I am using xwiki 2.7.
Any hints?
Thanks
mb
By the way: What about WYSIWYG for comments?
Seems I haven't yet understood all the nuances of XWiki syntax:
According to http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax
I can have a sized image with [[image:img.png||width="25" height="25"]]
I can have an image with a link [[image:img.png>>http://xwiki.org]]
How can I have a sized image with a link ?
not working:
[[image:img.png||width="25" height="25">>http://xwiki.org]]
[[image:img.png>>http://xwiki.org||width="25" height="25"]]
not working either (with and without 'px'):
(% style="height:25px;width:25px" %)
[[image:img.png>>http://xwiki.org]]
and
(% style="height:25px;width:25px"
[[image:img.png>>http://xwiki.org]]
%)
Hmmm... Once again I may not see the obvious ...
How can I do it ?
Thanks
Andreas
Hi everyone,
I tried to upgrade from version 2.4.30451 to version 2.7 (linux ubuntu,
postgresql). In 2.4 I was able to export a full dump of the wiki (around
550MB with lots of attachments) after the update (including the 2.7 xar) the
export fails.
First, if an attachment is not available, or missing then the whole export
fails and it is extremely hard to figure out which wiki page actually
triggered the error.
Second even if all those errors are resolved, the export fails with the
error "Too many open files" (see the snippet below). I then checked the
number of open files. On 2.7 I am seeing a large number of open files even
after a restart. Of course there are all the system and library files, but
there is also a large number of temporary files open (and those remain open
for at least one hour of inactivity). I guess the lucene indexing after the
restart generates these (there were 181 open files with similar names). If I
try to export the wiki, the number of open files goes into the thousands and
most of them are of the kind quoted below.
I then tried version 2.6 with the same symptoms. I reverted to 2.4 and
everything works fine again.
Version 2.7 seems a lot faster on export and also seems to require a lot
less resources, and I would be very happy about that.
I hope this information is helpful to you. Please feel free to ask for more
specific information.
I filed a bug report on jira http://jira.xwiki.org/jira/browse/XWIKI-5830 with
logfile excerpts.
Thanks so much,
--Elaina.