Saturday, April 13, 2024
 Popular · Latest · Hot · Upcoming
46
rated 0 times [  49] [ 3]  / answers: 1 / hits: 18086  / 11 Years ago, mon, february 11, 2013, 12:00:00

Can anyone tell me how to get the managed bean property value inside the javascript method



something like



function fonction1() {
var variable = #{myBean.property};
}

More From » jquery

 Answers
1

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());

[#80296] Saturday, February 9, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jarvisjovannia

Total Points: 127
Total Questions: 123
Total Answers: 101

Location: Netherlands
Member since Mon, Jun 7, 2021
3 Years ago
;