Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Velocity with checkbox

Posted on 2009-04-03
1
Medium Priority
?
1,505 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 8

Accepted Solution

by:
n_sachin1 earned 2000 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This video teaches viewers about errors in exception handling.
Suggested Courses

610 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