Null parameters getting passed


I first created a web-item that was located in the Administration section of Jira, under the Global Settings section. It consists of a form and when executed, calls an action and based on the date parameters submitted in the form, executes some actions.

Here is my atlassian-plugin.xml
<project-tabpanel key="Monthly Data" name="Monthly Data" class="com.moog.jira.plugins.MonthlyDataCalc">
<label key="Monthly Data">Monthly Data:</label>
<description>Calculated monthly data</description>
<resource type="velocity" name="view" location="templates/inputdate.vm" />

<webwork1 key="com.moog.jiraplugins.UpdateDataAction" class="java.lang.Object">
<action name="com.moog.jira.plugins.UpdateDataAction" alias="datePlannerUpdateData">
<view name="success">/templates/CalculationsView.vm</view>
<view name="input">/templates/CalculationsView.vm</view>

My ProjectPanel class implements AbstractProjectTabPanel.

Here is my inputdate.vm content:

<form method="post" action="/jira/secure/datePlannerUpdateData!upload.jspa">
&nbsp;&nbsp;&nbsp;&nbsp;<b>From Date:</b> <input name="fromDate">
<input type=button value="select" onclick="displayDatePicker('fromDate', this);">

&nbsp;&nbsp;<b>To Date:</b> <input name="toDate">
<input type=button value="select" onclick="displayDatePicker('toDate', this);">
&nbsp;&nbsp; <input type="submit" value="GO">

And finally, the UpdateDataAction class extends JiraWebActionSupport.

When I submit the form I am not able to get the form parameter values in the action class. It is coming as "null". In my action class I am using getFromDate() and getToDate() to retrieve form parameter values.

Any idea what I did wrong here?

Thanks so much!

2 answers

Since I cant see your class I will guess

You must have a public String doUpload() method since this is the how datePlannerUpdateData!upload.jspa will be mapped.

In fact I think there might be a problem aliasing AND using the !upload sytanx. Try

<action name="com.moog.jira.plugins.UpdateDataAction">

<command name="upload" alias="datePlannerUpdateData">

<view name="success">/templates/CalculationsView.vm</view>
<view name="input">/templates/CalculationsView.vm</view>



Also make sure you have a setFromDate() otherwise webwork cant map form parameters into Bean setters.

I have added both the properties in my UpdateDataAction classbut still it was coming as Null

private String fromDate;
private String toDate;

public String getKey() {
return key;

private String key;

public String getFromDate() {
return fromDate;

public void setFromDate(String fromDate) {
fromDate = fromDate;

public String getToDate() {
return toDate;

public void setToDate(String toDate) {
toDate = toDate;

Suggest an answer

Log in or Join to answer
Community showcase
Maarten Cautreels
Posted Thursday in Off-topic

Friday Fun: What's your favourite beer/drink

As a Belgian, beer-lover and home brewer, beer is one of my great passions. I love the fact that with just a few ingredients (usually just water, hop and malt) you can create so many different tastes...

285 views 38 9
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot