Accessing VM variables from the action class

I’ve implemented a custom WebWork action. In my action class, I have defined a private variable called ‘selectedStatus’ with its getter and setter methods. And in my velocity template I have a drop down list of status from which I choose one and submit it. I am trying to access the selected status (from the drop down) from my action class, but the getter method is always returning null. I have even tried to use javascript to change the value of $selectedStatus on the onChange event, but still the getter returned null. Does anyone know how to do it ? Thank you :slight_smile:
VM file and action class:

It seems that you can get the value of $jiraStatusList, right?

Can you explain how the action class StatusCounterConfigurationAction is called?

Yes I can access the value of **jiraStatusList** since it's a private variable with setter and getter methods in the action class. I have added the values to this list in the action class and here I am just retrieving them, however for selectedStatus, I need to set its value in the VM file and then get it right?
In my atlassian-plugin.xml, I call the action class StatusCounterConfigurationAction from the action tag. That’s my code and the atlassian-plugin.xml

Have you tried to retrieve the selectedStatus while submitting the form?

<input id="add_submit" class="button_submit" type="submit" onclick="abc()">
 function abc(){
   var selectedStatus=document.getElementById("jiraStatusList").value;
<input type="hidden" id="hiddenInput" name="selectedStatus">

Yeah I have just tried, I get null as well. Are there other methods to retrieve the selectedStatus while submitting the form ?? Thank you

Change the name of select to selectedStatus, just the same with the private variable in the action class. The selected option value will be submitted within the form.
<select id=“jiraStatusList” name=“selectedStatus”>

Never mind, this worked when I changed the type of selectedStatus to string. thank you !:slight_smile: