I have a component textArea inside my XHTML page that should show the 'LOG' of a proccess. See:
<h:inputTextarea rows="20" value="#{myMB.logVar}"
id="iptTextAreaLog" disabled="true"
style="color:white;background-color: black;width: 95%;">
</h:inputTextarea>
<h:commandButton value="atualiza log" id="cmbButtonAtualizaLog">
<f:ajax render="@form" execute="@this"/>
</h:commandButton>
This button is called from a javascript setInterval that triggers a update in textArea.
I have a method that update the logVar variable:
public void iniciarCarga() {
new Runnable(){
@Override
public void run() {
service.enviar(getSubject().getLogin(), valor, logVar);
}
}.run();
}
This is the javascript code that call my commandButton:
setInterval(function(){
$('#cmbButtonAtualizaLog').click();
},1000)}
The method inicarCarga()
updates the logVar
variable and this value should be shown inside textArea, but this don't happen.