Note that there are some explanatory texts on larger screens.

plurals
  1. POJsf PrimeFaces. Error during the render response. p:commandButton
    primarykey
    data
    text
    <p>I'm starting to use JSF with primefaces library over an Hibernate project. I've tried to use wizard component to manage a form but, when I click any of the buttons in the wizard, I get the following warning and the action listener is not invoked. </p> <p>I think the problem is that, in the wizard there are some p:commandButton because when I use h:commandButton, everything works. Could someine explain in what way primefaces commandButton ih different from the standard one, and how could I face this problem? What's different in the rendering process? </p> <p>Thanks for your help! Here's the warning:</p> <pre><code>9-ott-2012 9.50.43 org.apache.myfaces.trinidadinternal.context.PartialViewContextImpl getPartialResponseWriter AVVERTENZA: getPartialResponseWriter() called during render_reponse. The returned writer is not integrated with PPRResponseWriter </code></pre> <p>Here's the code of the page:</p> <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1" ?&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:p="http://primefaces.org/ui"&gt; &lt;h:head&gt; &lt;h:outputScript name="jsf.js" library="javax.faces" target="head" /&gt; &lt;/h:head&gt; &lt;h:body&gt; &lt;p:growl id="growl" showDetail="true" sticky="true" /&gt; &lt;h:form&gt; &lt;p:wizard widgetVar="wiz" flowListener="#{traduttoreBean.onFlowProcess}"&gt; &lt;p:tab id="personali" title="Info Personali"&gt; &lt;p:panel header="Informazioni Personali"&gt; &lt;h:messages errorClass="error"/&gt; &lt;h:panelGrid columns="2" columnClasses="label, value" styleClass="grid"&gt; &lt;h:outputText value="Nome: *" /&gt; &lt;p:inputText required="true" label="Nome" value="#{traduttoreBean.info.nome}" /&gt; &lt;h:outputText value="Cognome: *" /&gt; &lt;p:inputText required="true" label="cognome" value="#{traduttoreBean.info.cognome}" /&gt; &lt;/h:panelGrid&gt; &lt;/p:panel&gt; &lt;/p:tab&gt; &lt;p:tab id="confirm" title="Confirmation"&gt; &lt;p:panel header="Confirmation"&gt; &lt;h:panelGrid id="confirmation" columns="6"&gt; &lt;h:outputText value="Nome: " /&gt; &lt;h:outputText styleClass="outputLabel" value="#{traduttoreBean.info.nome}" /&gt; &lt;h:outputText value="Cognome: " /&gt; &lt;h:outputText styleClass="outputLabel" value="#{traduttoreBean.info.cognome}" /&gt; &lt;h:outputText /&gt; &lt;/h:panelGrid&gt; &lt;p:commandButton value="Submit" update="growl" action="#{traduttoreBean.save}" &gt;&lt;/p:commandButton&gt; &lt;/p:panel&gt; &lt;/p:tab&gt; &lt;/p:wizard&gt; &lt;/h:form&gt; &lt;/h:body&gt; &lt;/html&gt; </code></pre> <p>The associated bean:</p> <pre><code>public class TraduttoreBean implements Serializable{ /** * */ private static final long serialVersionUID = 1L; private Traduttore traduttore; private InfoTraduttore info; public TraduttoreBean(){ this.traduttore=new Traduttore(); this.info= new InfoTraduttore(); this.info.setTraduttore(traduttore); } public void save(ActionEvent actionEvent) { PersistenzaUtenti pu= PersistenzaUtenti.getInstance(); PersistenzaInfoTraduttori pi= PersistenzaInfoTraduttori.getInstance(); try { pu.insert(traduttore); pi.insert(info); } catch (Exception e) { } FacesMessage msg = new FacesMessage("Successful", "Welcome :" + info.getNome()); FacesContext.getCurrentInstance().addMessage(null, msg); } public String onFlowProcess(FlowEvent event) { return event.getNewStep(); } public Traduttore getTraduttore() { return traduttore; } public void setTraduttore(Traduttore traduttore) { this.traduttore = traduttore; } public InfoTraduttore getInfo() { return info; } public void setInfo(InfoTraduttore info) { this.info = info; } } </code></pre> <p>For the declaration of the bean I've tried both with the annotation @Managed bean and the faces-config file. Here's my definition:</p> <pre><code>&lt;managed-bean&gt; &lt;managed-bean-name&gt;traduttoreBean&lt;/managed-bean-name&gt; &lt;managed-bean-class&gt;guiBeans.TraduttoreBean&lt;/managed-bean-class&gt; &lt;managed-bean-scope&gt;view&lt;/managed-bean-scope&gt; &lt;/managed-bean&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload