내 JSF 페이지에 commandButton
구성 요소가 버튼을 누르십시오. 나는 그것을 클릭하면 이상하게 commandButton
동작합니다 반면 원하는대로 의 dataTable
는 같은 디스플레이의 결과로 업데이트됩니다PrimeFaces는
누군가가 나에게 이런 이상한 상황의 원인을 이해하고 또한 솔루션을 파악하는 데 도움이 될 수 있습니다 가능하다면?
참고 :
- JSF 구현 및 버전 : 인 Mojarra (javax.faces-2.1.11.jar)
- 보기 기술 : Facelets의 (XHTML)
- 복사 'n'paste'n'runnable 예제! (SSCCE)는 다음과 같습니다 :
FilterBean.java을 :
package com.turkcell.mdealer.bean.impl;
import org.springframework.stereotype.Component;
@Component
public class FilterBean {
private boolean monthly = true;
public String applyPeriod(String caller) {
monthly = !monthly;
return caller;
}
public boolean isMonthly() {
return monthly;
}
public void setMonthly(boolean monthly) {
this.monthly = monthly;
}
}
sample.xhtml : 라이브러리의
<f:view xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:turkcell="http://turkcell.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui" xmlns:o="http://omnifaces.org/ui"
xmlns:of="http://omnifaces.org/functions"
xmlns:pm="http://primefaces.org/mobile" contentType="text/html"
renderKitId="PRIMEFACES_MOBILE">
<pm:page title="Bayi Raporlari">
<pm:view id="FaturasizAktivasyon" swatch="c">
<p:outputPanel id="FaturasizPanel">
<h:form id="FaturasizForm">
<pm:content>
<p:commandButton id="period"
value="#{filterBean.monthly == false ? 'Yearly' : 'Monthly'}"
action="#{filterBean.applyPeriod('sample')}" update="period">
</p:commandButton>
</pm:content>
</h:form>
</p:outputPanel>
</pm:view>
</pm:page>
</f:view>
일반보기 :
당신의 PF 3.5 및 Mojarra 2.1.14의 문제점 어떤 버전의 Primeface와 JSF를 사용하고 있습니까? – partlov
@partlov _primefaces-3.5.jar_ 및 _javax.faces-2.1.11.jar_ – Juvanis
을 사용하고 있습니다. Mojarra 버전을 업데이트하고 문제가 사라질 수 있습니까? 그렇지 않은 경우 페이지의 다른 부분의 부작용 일 가능성이 큽니다. 이 경우 전체 페이지 소스를 게시하십시오. – partlov