Create
cancel
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

How can I send select2 value to my Java code?

Edited
asif khan I'm New Here Nov 27, 2021

I am developing a Jira Plugin (Servlet & Rest) which is shows project names in a select2 list and when user selects a selection, my datatable will show Issue keys and summaries of them.

The problem is I need the selection of my select list in my Java code. Somehow, I need to send it the selection value inside my Java. Some of my friend give me an advice about using "jQuery.ajax" but I couldn't figure it out how I can do it.

Here is my select2 js code:

AJS.$('#select2-example2').on('click', function () {
 console.log("Selected value: " + AJS.$(this).auiSelect2('val')); });

And I think I need some REST Endpoint in my Java code and I don't know how I can do it either. I need your help about that thing as well.

I know I asked so much questions but I'm new at plugin development stuff and I know I should have develop myself way too much. Thanks already!

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS

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