I want to set a set some value to a bean property through my D3 code. For this I am using h:inputHidden tag of JSF to create a hidden input field:
<h:inputHidden id="hiddenInputID" value="#{someBean.someBeanProperty}"/>
someBeanProperty is a String variable in someBean class which has getter and setter methods.
Through my D3 code, I am selecting an element by it's class and on click event I am passing the value through JQuery.
d3.selectAll('.someclass').on('click',function (item,i) {
jQuery('#hiddenInputID').val("valueToSet");
});
But this approach is not working. Can anybody please find the mistakes I am making or suggest some better approach. Thanks