hello,
I am trying to develop a plugin for jira and ive having quite a lot of trouble as i have little knowlwdge of how it works.
I have a plugin that:
adds a button to the options menu in the view issue screen
adds a tab in the same screen
loads a /secure/action!map.jspa page from a success.vm file.
I would like to be able to load fi...
Hi,
I came to know about null check using $null in velocity 1.6 through a resource updated by you.
Resource: http://stackoverflow.com/questions/24495/reading-model-objects-mapped-in-velocity-templates
But I am facing so many challenges that there is no $null for null check in velocity as there is no documentation provided about this.
Pl...
I have this velocity code for a simple menu:
<div id="header" class="navstrip">
#foreach( $navItem in $navItems )
<a href="$navItem.URL">$navItem.Title</a> |
#end
</div>
I would like to give the last menu link a class of "last". What would the conditional be for that?
...
I am using velocity templates as view component,and my welcome file is also a .vm file.Here I am facing the problem,when ever I run my application that .vm file is not rendered by the velocity engine.So to render that .vm files at the time of loading application what to do?
...
The following line of code is a generic version of a line in a template I'm working on. I have locked at the Velocity Template Language Documentation but I keep gettting errors no matter how I format this statement. This is my first real experience with VTL so I was hoping to get a set of experienced eyes on the issue:
#set($includeAt...
Is there any String replacement mechanism in Java, where I can pass objects with a text, and it replaces the string as it occurs.
For example, the text is :
Hello ${user.name},
Welcome to ${site.name}.
The objects I have are "user" and "site". I want to replace the strings given inside ${} with its equivalent values from the obje...
Hi,
I am getting the following error when I try to access access Velocity template using URLResourceLoader.
org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'http://localhost:8080/myvelocityapp/my-template.vm'
at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceMana...
How do you append a newline in velocity template using set? This does not work.
#(set $some = "$a \n $b")
Prints literally \n.
Doing this also does not work :
VelocityContext context = new VelocityContext();
context.put("esc", new EscapeTool());
Velocity.evaluate(context, writer, "LOG", template);
...
We are going to start a very small web development project.
The team has experience using Velocity in the past, which was a clear option when we were working with JSP 1.2, long before 2.0... but now we have JSP-EL available.
Therefore: would you recommend to get rid of Velocity and to invest in JSP2? We are inclined to do so in order to...
Hi,
I'm writing a velocity macro within which I have some ant tasks. Within a #foreach loop in the velocity macro, I have a pathconvert task:
#foreach(<iterate through something>)
<pathconvert property='filename' refid='swf.file'>
<mapper>
<chainedmapper>
<flattenmapper/>
...
The net seems to be full of comparisons between Velocity and FreeMarker, and they seem to be reasonably equivalent. But there seems to be almost no comparisons between StringTemplate and FreeMarker!
So, what are the main differences between StringTemplate and FreeMarker?
My usage for them would be to generate HTML pages only. Out of th...
Hi All,
We are using dotCMS 1.7a and I am having difficulty getting the email addresses of users in the Administrator role.
This SQL works:
select user_.emailaddress
from user_
INNER JOIN users_roles
ON users_roles.userid = user_.userid
INNER JOIN role_
ON users_roles.roleid = role_.roleid
where role_.name = 'Adm...
I have a velocity template rendering VXML that is located at
/billing/billingQuestionsMenu_pp.vm
then, in that template, I am forwarding to:
<submit next="#springUrl('/billing/billingQuestions/billingQuestionsMenuOption1.vxml')" />
Now in my Controller, I have a mapped method:
@RequestMapping(method = RequestMethod.GET)
public Str...
So I'm using Velocity in a legacy project. And even rendering moderately large pages takes FOREVER. Literally 10+ minutes.
There has to be some kind of bug I'm hitting... anyone else have bad experiences with Velocity in general? I'm about to start stepping through the source code and see where it hangs/etc but I wanted to see what SO h...
Working on a legacy project that includes a fair amount of velocity. Not sure on what I can safely post on her (copyrights and all) but I'll try to be an clear and concise as I can.
We have several templateX.vm files. They're not large, only about 200 lines or so long. They do not rely on outside resources. They do not use any macros. I...
Wanting to do some fancy stuff... :P
We'd like to be able to pass a string that IS the file, instead of a string that simple a filename.
We're going to create a file in memory using a string/stringbuffer and we want the velocity engine to act upon that instead of reading in a file.
Does this function exist?
Many thanks!
...
I have this velocity template. It works fine in one case, but doesn't in another. If I remove the elseif it works fine. Has anyone encountered this?
#if (some condition)
## Do something
#elseif
## Do something else
#end
...
What is in my velocity.properties file
resouce.loader = string
string.resource.loader.description = Velocity StringResource Loader
string.resource.loader.class = org.apache.velocity.runtime.resource.loader.StringResourceLoader
#string.resource.loader.repository.class = org.apache.velocity.runtime.resource.loader.StringResourceRepository...
I try add javascript to my velocity template.
<html>
<head>
<title>:: $currency.CurrencyName Detail Info ::</title>
</head>
<body>
<table>
<tr>
<td>Name</td>
<td>$currency.CurrencyName</td>
</tr>
<tr>
<td>Jual</td>
<td><div id="$currency.CurrencyName_buy">$currency.Buy</div></td>
</tr>
<tr>
<td>Beli</td>
<td><div...
Trying to make some small changes to Apache's Velocity engine.
Here's what I can and can't do.
I'm making a change to the merge function(). The change I'm making doesn't matter because I haven't made it yet. ;) Right now I am settling for a println statement firing.
I have two references to merge(). If I change the function to mergeBA...