-1

First of all, I am not sure if this is even possible due to one being server side and other being client side.

Application that I am working on uses Spring MVC 3.1 and there is a Map (lets say validValuesMap ) of type Map<String,Long> defined in Spring method - referenceData.

Due to Map being defined in referenceData method, this Map is available in JSP page and I can use JSTL on this Map like - <core:if test="${(validValuesMap ne null)}"> etc.

Can I use this Map in plain JavaScript or jQuery too?

I have to basically perform a simple check on Long value of this Map if that is being greater than zero for a key and that key is available in the JavaScript function as a var.

I have to put that check into an else if (....) of JavaScript.

Is that possible? or any other way to perform that validation on client side for a button click event?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Sabir Khan
  • 9,826
  • 7
  • 45
  • 98

1 Answers1

0

Convert that object to JSON on server side itself and then store it in javascript variable to manipulate it later on client side .