Hi!
Does anybody know, where I can get a reference for the "Wiki Scripting Tool" Extension?
Especially: I want to know the parameters of $sortTool
Searched for a while, did not find anything. In the downloaded zip / jar files of the extension, there is no description included.
Reference for Wiki Scripting Tools
Re: Reference for Wiki Scripting Tools
Hi,
unfortunately the links on the extensions page (https://extensions.polarion.com/extensi ... ting-tools) are not valid anymore. But you'll find descriptions to all tools at http://velocity.apache.org/tools/1.4/generic/
Hope that helps.
Regards,
Michael
unfortunately the links on the extensions page (https://extensions.polarion.com/extensi ... ting-tools) are not valid anymore. But you'll find descriptions to all tools at http://velocity.apache.org/tools/1.4/generic/
Hope that helps.
Regards,
Michael
Re: Reference for Wiki Scripting Tools
Thanks Michael,
this helps... a little. I just can't get the Sorter to sort an array of strings descending.
I tried:
Or:
The only command that works is:
But this sorts ascending.
What am I doing wrong here?
this helps... a little. I just can't get the Sorter to sort an array of strings descending.
I tried:
Code: Select all
#set($resultList = $sortTool.sort($resultList,"name:desc"))
Or:
Code: Select all
#set($resultList = $sortTool.sort($resultList,"desc"))
The only command that works is:
Code: Select all
#set($resultList = $sortTool.sort($resultList))
But this sorts ascending.
What am I doing wrong here?
Re: Reference for Wiki Scripting Tools
I have only read the Velocity-manual. Your first variant should be correct. But I guess that you can only sort by name, if the objects in your list really have a property "name". If your list only contains pure strings, this will probably not work.
There is a blog post that explains the principle: https://blog.teknkl.com/sorting-objects ... -velocity/
There is a blog post that explains the principle: https://blog.teknkl.com/sorting-objects ... -velocity/
-
- Posts: 81
- Joined: Wed Mar 07, 2018 1:06 pm
- Location: Germany
Re: Reference for Wiki Scripting Tools
Here is the documentation for the SortTool:
http://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/SortTool.html
http://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/SortTool.html
Return to “Polarion Application Lifecycle Management (ALM)”
Who is online
Users browsing this forum: lydiaen69 and 11 guests