Solved

Velocity with checkbox

Posted on 2009-04-03
1
1,488 Views
Last Modified: 2013-11-23
Hi,

I am trying to use velocity and I cant really get things to work.
I want a checkbox. If it is checked it should send the value TRUE to a class in my java code

How should this be done?
my velocity code:
        <tr>
        <td class="header">Hibernate&nbsp;databas&nbspupdate</td>
        <td>
        <input type="checkbox"  value ="$Deployment.hibernate">true/>
        </td>
        </tr>
--------------------------
my class is named Deployment and i have a boolean in there called hibernate

Open in new window

0
Comment
Question by:Mickeys
1 Comment
 
LVL 8

Accepted Solution

by:
n_sachin1 earned 500 total points
ID: 24060390
Velocity does not work the way you are trying to use it in the above case.

Velocity is a templating engine, that could generate pages for you. For eg:-
the below line
<input type="checkbox"  value ="$Deployment.hibernate">
would produce
<input type="checkbox"  value ="true"> or <input type="checkbox"  value ="false"> based on the value of $Deployment.hibernate.

To set values on a user action into a class, you will need to go through a servlet/jsp.

0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
firstswap challenge 20 78
Checkbox and ListView in Android Layout 4 67
spring jars download 1 28
Is Applet the way to go for my drag and drop system? 8 16
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question