im working on a JSF 2.0 project on TomEE server. i have a problem on a JSF view, im trying to update an outPutText when a button is clicked, but it is not working.
here's the form of the xhtml view:
<h:form>
<h:outputText style="width: 600px;" styleClass="infoVista" value="# {mensajes.BloqueoMaestra}" />
<p:commandButton actionListener="#{procesar.procesarPeticion()}" update="mensaje" value="Buscar Bloqueos">
<f:param name="proceso" value="bloqueo" />
</p:commandButton>
<h:outputText rendered="true" value="#{procesar.respuesta}" id="mensaje" />
</h:form>
And here is the Bean proccesing the view:
@Named("procesar")
@ViewScoped
public class procesarOpcion {
String respuesta = "";
public procesarOpcion(){
}
public String getRespuesta() {
return respuesta;
}
public String procesarPeticion(){
String proceso = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("proceso");
if (proceso.equals("bloqueo")){
respuesta = "Update this ";
}
}
Evething is working, the method procesarPeticion() is being called and the variable respuesta is filled but the view is not updating when i press the Commandbutton.
Thanks for your help.