How do I insert an OGNL variable into a Jquery/Javascript statement?
Within a .jsp I have;
$.subscribe("selectRow", function(event,data) {
$("#DetailsDiv")
.html("Loading ...")
.load("edit-service-definition-input","functionId=" + %{functionId} + "&serviceId=" + event.originalEvent.id);
});
where the backing action has a getter and setter for the attribute functionId. However, when this function is called, "%{functionId}" is passed as a string rather than the value of getFunctionId()
Regards
OGNL can only be evaluated by Struts2 tags, not free-form in a JSP like JSP EL. So, change
%{functionId}to:or: