Hibernate 프로젝트에서 primefaces 라이브러리로 JSF를 사용하기 시작했습니다. 마법사 구성 요소를 사용하여 양식을 관리하려고했지만 마법사의 단추 중 하나를 클릭하면 다음 경고가 표시되고 작업 수신기가 호출되지 않습니다.Jsf Primeface. 렌더링 응답 중 오류가 발생했습니다. p : commandButton
나는 문제가 있다고 생각한다. 마법사에서 commandButton을 사용할 때 commandButton이 일부 작동하기 때문에 모든 것이 작동한다. 어떤 방법으로 primefaces commandButton을 표준과 다른 방식으로 설명 할 수 있습니까? 어떻게이 문제에 직면 할 수 있습니까? 렌더링 과정에서 다른 점은 무엇입니까?
도움 주셔서 감사합니다. 다음 경고입니다 : 여기
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
페이지의 코드는 다음과 같습니다
연결된 빈<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<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">
<h:head>
<h:outputScript name="jsf.js" library="javax.faces" target="head" />
</h:head>
<h:body>
<p:growl id="growl" showDetail="true" sticky="true" />
<h:form>
<p:wizard widgetVar="wiz"
flowListener="#{traduttoreBean.onFlowProcess}">
<p:tab id="personali" title="Info Personali">
<p:panel header="Informazioni Personali">
<h:messages errorClass="error"/>
<h:panelGrid columns="2" columnClasses="label, value" styleClass="grid">
<h:outputText value="Nome: *" />
<p:inputText required="true" label="Nome"
value="#{traduttoreBean.info.nome}" />
<h:outputText value="Cognome: *" />
<p:inputText required="true" label="cognome"
value="#{traduttoreBean.info.cognome}" />
</h:panelGrid>
</p:panel>
</p:tab>
<p:tab id="confirm" title="Confirmation">
<p:panel header="Confirmation">
<h:panelGrid id="confirmation" columns="6">
<h:outputText value="Nome: " />
<h:outputText styleClass="outputLabel"
value="#{traduttoreBean.info.nome}" />
<h:outputText value="Cognome: " />
<h:outputText styleClass="outputLabel"
value="#{traduttoreBean.info.cognome}" />
<h:outputText />
</h:panelGrid>
<p:commandButton value="Submit" update="growl" action="#{traduttoreBean.save}" ></p:commandButton>
</p:panel>
</p:tab>
</p:wizard>
</h:form>
</h:body>
</html>
: 빈의 선언
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;
}
}
내가 가진 모두를 시도했습니다 annotation @Managed bean과 faces-config 파일. 코멘트에서 제공
<managed-bean>
<managed-bean-name>traduttoreBean</managed-bean-name>
<managed-bean-class>guiBeans.TraduttoreBean</managed-bean-class>
<managed-bean-scope>view</managed-bean-scope>
</managed-bean>
것은') (저장'에'(의 ActionEvent의 ActionEvent를) 저장 '변경 시도 대신 얼굴-config' – Daniel
또는 변경 조치 = "# {traduttoreBean.save}">로의 actionListener ='의 당신을보다 효율적으로 사용 주석 "# {traduttoreBean.save}"> – roel
나는이 모든 조합을 시도했다. 문제는 표준 h : commandButton이 작동한다는 것입니다. 어쩌면 p : commandButton의 Ajax 동작에 대해 이해하지 못했을 것입니다. [다음] 버튼을 눌렀을 때 호출되는 flowListener = "# {traduttoreBean.onFlowProcess}"가 작동하지 않습니다! –