Questions tagged [nvelocity]

NVelocity is a port of the Apache Jakarta Velocity project. It is a simple, easy to learn and extensible template engine.

NVelocity is a port of the Apache Jakarta Velocity project. It is a simple, easy to learn and extensible template engine.

99 questions
1
vote
1 answer

Castle Monorail magic

The project I am working on supports a number of locales. The solution is based on using some Castle Monorail mechanism. Appropriate controller class is marked as follows: [Resource("pageResx", "...Controllers.Static")] Where StaticTemplate is the…
godspeed
  • 247
  • 1
  • 4
  • 15
1
vote
1 answer

NVelocity save looping result into JS variable

I've faced the problem with nvelocity #foreach statement. I'd like to save the collection item properties to the js variable. So I thought that construction like this would cover the issue. jQuery('#resendButton').bind('click', function (e) { …
godspeed
  • 247
  • 1
  • 4
  • 15
1
vote
1 answer

Alternative to Razor and WebForms view engine that works well with jQuery & KnockoutJs?

I am stuck to using .NET 3.5, therefore using MVC3 is out of the question. After trying MVC2, I have to say that i prefer Monorail 2.0 over it, and especially the nVelocity view engine it uses. But at the same time, I've read about possible…
Cosmo D
  • 845
  • 4
  • 11
  • 21
1
vote
1 answer

How to use NVelocity without embedding the templates as resources?

I've been playing around with NVelocity to create a library that loads mail templates. And I haven't been able to load a template without embedding it into the application assembly. Is there a special way of doing this? Properties to be…
Raúl Roa
  • 12,061
  • 13
  • 49
  • 64
1
vote
1 answer

ASP.Net MVC3 Razor Template Variables with null value

I have been developing Castle Monorail MVC web applications for a while. I started to learn and develop some projects with Asp.Net MVC 3 and Razor. I was using NVelocity as Monorail's view engine. It has capability to use variables passed with…
vardars
  • 541
  • 1
  • 8
  • 20
0
votes
1 answer

MasterPage/ContentPage with NVelocity and ASP.NET MVC?

I am a big fan of NVelocity. I think its terse syntax is a huge boon, and helps keep my views simple and effective. I have begun using the NVelocity view engine from the Mvc Contrib project for ASP.NET MVC, along with the Castle NVelocity .vm syntax…
jrista
  • 32,447
  • 15
  • 90
  • 130
0
votes
1 answer

NVelocity - print a record based on a condition

i'm trying to print a record in NVelocity based on certain condition: Below is the snippet... basically, Loop through the Addresses Object and if the current AdType is the "Current Address", print it and then exit out of the loop ... I'm getting…
Gotcha
  • 1,039
  • 1
  • 16
  • 24
0
votes
1 answer

NVelocity Issue

I have taken over some work on an existing system that uses NVelocity templates. It iterates though some rows of data and then loops though the fields creating an html table of the data. I want to change this so that some of the table cells contains…
Andy Stannard
  • 1,673
  • 2
  • 18
  • 32
0
votes
1 answer

Castle Monorail Complex Binding

I have this ViewModel class ProductViewModel{ List Scopes{get;set;} string Name{get;set;} int Id{get;set;} } class ProductSellingScopeViewModel{ int IdScope{get;set;} decimal Price{get;set;} } class…
remi bourgarel
  • 9,231
  • 4
  • 40
  • 73
0
votes
2 answers

Can $DateTime.Now.Year be used with NVelocity to display the current year?

Sorry that this is kind of a lazy questions... I'm curious if $DateTime.Now.Year can be used with NVelocity templates to show the current year? Or do I need to set a variable?
BueKoW
  • 926
  • 5
  • 18
  • 33
0
votes
2 answers

How should I provide seperate layouts to different user types in NVelocity templates?

I'm redesigning the templates for our online store (Using Castle Monorail with the NVelocity view engine) but want to provide the old layout to certain users. I've started out adding a variable to the PropertyBag that determines the version the user…
Septih
  • 1,436
  • 17
  • 40
0
votes
1 answer

Is it possible to default to quiet references in NVelocity?

I'm using NVelocity to build an email message. Rather than mark every reference as quiet ($!name instead of $name), I'd like to default to quiet references. Is it possible?
Robin Minto
  • 15,027
  • 4
  • 37
  • 40
0
votes
1 answer

recursive method with nvelocity

I'm working with monorail, I've : in my model : class Foo { public List foos; } in my controler : PropertyBag["foos"] = foos; // foos is initialised in my view :
    #foreach($foo in $foos)
  • // recursive…
Christophe Debove
  • 6,088
  • 20
  • 73
  • 124
0
votes
1 answer

ParseException when combining NVelocity with KnockoutJS

I'm trying to do some tutorial on knockout with NVelocity. Everything was fine but there is problem when it comes to template. When I reach the third step of this tutorial, it gives me an error in line ${meal().mealName}. Can anyone explain to me…
kekewong
  • 298
  • 1
  • 2
  • 10
0
votes
1 answer

Adding Css into NVelocity FormHelper

Is it possible to add css into FormHelper in NVelocity ??? For example i wish to add css into FormHelper.TextField() . Thanks.
TJ.
  • 241
  • 2
  • 14