Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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
This widget could not be displayed.

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