Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

velocity form : Add row script not working , how we call different methods when we click on buttons


This is my vm code 



<title> <title>$action.getText('approval-webwork-module.approval.issue')</title></title>
<form action="EventActionHandler.jspa" class="aui" id="approval-issue" method="post">
<div class="aui-page-panel">
<script src="">
$(document).ready(function(){$('p input[type="button"]').click(function () {
$('#myTable').append('<tr><td><select name="type"><option value="approval">Approval</option><option value="review">Review</option></select></td><td><input type="text" class="fname" /></td><td><input type="date" data-date-inline-picker="true" /></td><td><select name="Status"><option value="reqork">Rework</option><option value="approved">Approved</option><option value="reject">Rejected</option></select></td><td><input type="button" value="Delete" /></td></tr>')

$(document).ready(function(){$('#myTable').on('click', 'input[type="button"]', function () {

<table id="myTable" style="border: 1px solid black">
#set ($allList = $action.getAllRec())
#foreach ($currentRec in $allList)
<select name="type" value="$currentRec.type">
<option value="Approval">Approval</option>
<option value="Review">Review</option>
<input name="approvalName" type="text" class="fname" value="$currentRec.approvalName"/>
<input name="dueDate" type="date" data-date-inline-picker="true" value="$currentRec.dueDate"/>
<select name="status" value="$currentRec.status">
<option value="Rework">Rework</option>
<option value="Rework">Rework</option>
<option value="Rejected">Rejected</option>
<option value="Approved">Approved</option>
<input type="button" value="Delete" />
<input type="button" id="addrow" value="Add Row">

<div class="buttons-container form-footer">
<div class="buttons">
<input accesskey="s" class="button" id="approval-issue-submit" name="Approval" title="Press Ctrl+Alt+s to submit this form" type="submit" value="Approval">
<a accesskey="`" class="cancel" href="/browse/${action.issue.key}" id="approval-issue-cancel" title="Press Ctrl+Alt+` to cancel">Cancel</a>



1) Add row functionality not working .

2) how we call bean methods from button click ?


I look forward to positive reply from you ! 

Thanks & Regards,






Log in or Sign up to comment

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you