Can anyone tell me how to get the managed bean property value inside the javascript method
something like
function fonction1() {
var variable = "#{myBean.property}";
}
You can like this:
<h:inputText id="propertyId" value="#{myBean.property}" style="display:none"/>
and access it like this (note that if its inside a form you might need to add the form prefix)
alert($('#propertyId').val()); // or alert($('#myFormId\\:propertyId').val());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With