0 Replies Latest reply on Jun 5, 2008 3:06 PM by Ze Manel

    Accessing to back bean updated values using javascript

    Ze Manel Newbie

      Hi,

      For now, I'm just trying to alert a bean value in an onClick event associated with an inputText.

      On my backbean i have defined my HtmlInputText with the event:

      inputText.setOnclick("jsFunction();");



      On my xhtml page i have defined my javascript function accessing backbean:



      //<![CDATA[

      function jsFunction() {
      alert('#{myBackBean.dataTable.value.get(3).get(0).myRealValue}');
      }

      //]]>



      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