상위 구성 요소의 Ajax 업데이트에서 하위 구성 요소를 제외하는 방법은 무엇입니까?
프라임페이스를 사용하고 있습니다.<p:ajax>
내 코드의 태그.상위 구성 요소를 업데이트하는 Ajax 호출에서 하위 구성 요소를 업데이트에서 제외하려면 어떻게 해야 합니까?
PrimeFaces 3.3 이상을 사용하는 경우 PrimeFaces Selector를 사용할 수 있습니다.이를 통해 에서 jQuery CSS 선택기 구문을 사용할 수 있습니다.process
그리고.update
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"
고객 측에서.
특정 구성 요소의 모든 자식을 업데이트하려면 'form'을 주변 구성 요소(또는 클래스 또는...)의 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를 사용하는지 확인하십시오.
참고 항목:
언급URL : https://stackoverflow.com/questions/12614882/how-to-exclude-child-component-in-ajax-update-of-a-parent-component
'programing' 카테고리의 다른 글
데이터 프레임 인덱스에 함수 적용 (0) | 2023.07.28 |
---|---|
조각에서 활동 메서드 호출 (0) | 2023.07.28 |
CSS 16진수 RGBA? (0) | 2023.07.28 |
numpy 없이 python에서 변수 NaN 할당 (0) | 2023.07.28 |
스크립트를 실행할 때 스크립트에 1064 오류가 발생하는 이유는 무엇입니까? (0) | 2023.07.23 |