2012-09-27 10 views

답변

26

PrimeFaces 3.3 이상을 사용하고 있다면 PrimeFaces Selectors을 사용할 수 있습니다. 따라서 jQuery CSS selector syntaxprocessupdate 속성에서 PrimeFaces ajax 구성 요소의 속성으로 사용할 수 있습니다. 예를 들어

:

<h:form> 
    <h:inputText ... /> 
    <h:inputText ... /> 
    <h:inputText ... styleClass="noupdate" /> 
    <h:inputText ... /> 
    <h:inputText ... /> 
    <p:commandButton ... update="@(form :not(.noupdate))"/> 
</h:form> 

예는 클라이언트 측에서 class="noupdate"를 갖는 입력을 제외한 전체 양식을 업데이트한다.

당신이 하나를 제외하고 특정 구성 요소의 모든 아이를 업데이트 주변 구성 요소의 ID (또는 클래스 나 ...)

<h:form id="form"> 
    <h:panel id="myPanel"> 
     <h:inputText ... /> 
     <h:inputText ... /> 
     <h:inputText ... styleClass="noupdate" /> 
    </h:panel> 
    <h:inputText ... /> 
    <h:inputText ... /> 
    <p:commandButton ... update="@(form :not(.noupdate))"/> 
</h:form> 

<p:commandButton ... update="@(#form\:myPanel :not(.noupdate))"/> 

에 의해 '양식'을 바꾸려면 그냥 확인 전체 클라이언트 측 ID를 사용하십시오.

+0

답변 해 주셔서 감사합니다. Primefaces 업데이트 속성에서 jQuery 선택기를 사용할 수 있다는 것을 알지 못했습니다. – Pranjali

+0

당신을 진심으로 환영합니다. – BalusC

+0

그 구문은 페이지에 다른 양식을 제출합니까? –

관련 문제