Nuno,
As someone else mentioned before, the EL expression gets evaluated on
the server and the JavaScript gets processed on the browser. Therefore,
the value that you are displaying is whatever was on the server when the
page was rendered. Why don't you just put a commandButton on the page
whose action attribute has a method binding to a method in your backing
bean that resets the value in the inputText component.
-R
Nuno Sousa wrote:
Hi,
For now, I'm just trying to alert a bean value in an onClick event
associated with an inputText.
[b]On my backbean i have defined my HtmlInputText with the event:[/b]
[code]inputText.setOnclick("jsFunction();");[/code]
[b]On my xhtml page i have defined my javascript function accessing
backbean:[/b]
<script language="JavaScript" type="text/javascript">
//<![CDATA[
function jsFunction() {
alert('#{myBackBean.dataTable.value.get(3).get(0).myRealValue}');
}
//]]>
</script>
If i click on the inputText it alerts me the correct bean value, but
if i change my bean value and click again, it shows me the same value.
Only when i refresh the page, my alert gets a new value. How can i
force my alert to ask allways the bean value without page refreshing?
Thanks