how to get managed bean property value inside javascript
17,480
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());
Author by
Bob Samadi
Updated on July 30, 2022Comments
-
Bob Samadi over 1 year
Can anyone tell me how to get the managed bean property value inside the javascript method
something like
function fonction1() { var variable = "#{myBean.property}"; }