0
I’m doing a JSF application, I have a Bean class that has a method. In this method I have a variable of type String and as the method is running, the variable is updating values.
I wonder if it is possible at runtime to update a component textarea where this variable is being displayed?
<p:inputTextarea id="display" rows="15" cols="50"
value="#{fluxoPeriodo.displayMessage}"/>
Remembering that the update only occurs when the method finishes the execution
Every time you go through a method, I’d like him to fill in the information.
int flag = 0;
flag = isNum2();
mess(flag);
FacesContext.getCurrentInstance().getPartialViewContext().getRenderIds().add("idformdialog:display");
try{ Thread.sleep(8000);
} catch (InterruptedException ex) {}
flag = isNum3();
mess(flag);
FacesContext.getCurrentInstance().getPartialViewContext().getRenderIds().add("idformdialog:display");
I have a flag variable of the whole type that takes the value of isNum(), when passing through this method receives an integer value, and then passes to the method mess(flag). Depending on the flag value, the method should return a message, but the problem is that it is only showing the messages when the method in which the methods are being executed ends its execution.
<p:commandButton value="Buscar" id="pesquisa"
class="ui-button-custom ui-button-busca"
action="#{fluxoPeriodo.teste}" process="@form"
update="@form"
onclick="PF('statusDialog').show();">
</p:commandButton>
Above the button where I call the test method, which methods above are being processed.
Any suggestions?
You want to update the field during the execution of the method?
– nullptr
Exact, the inputTextArea should receive the information during the process, I want to create something like.
– Well Silva
Has the field update by the bean Managed worked? I don’t understand exactly what the problem is now
– nullptr
I still can’t get it to work.
– Well Silva
The problem is this, after going through the method should update a value in my paginá.xhtml, but it is only updating when the method by which I call by commandButton end execution. In this action method there are other methods being executed, after each of them would like you to update a message.
– Well Silva