다른 곳에서 나의 lazytable을 새로 고침하고 싶습니다. 나는 다음과 같은 XHTML이 있습니다Primefaces 다른 양식의 테이블을 업데이트하십시오.
<h:form id="tableform">
<p:remoteCommand name="updateTable" update="table" />
<p:dataTable widgetVar="tableWidget" id="table"
selection="#{personBean.selectedPerson}" selectionMode="single"
lazy="true" paginator="true" var="person" rowKey="#{person.id}"
value="#{personBean.personModel}" paginatorPosition="bottom" rows="5"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}">
<p:column filterBy="#{person.name}" headerText="Names:"
sortBy="#{person.name}">
<h:outputText value="#{person.name}" />
</p:column>
</p:dataTable>
<p:commandButton value="buttonInForm2" update=":tableform" />
<p:commandButton value="buttonInForm" update="@form" />
</h:form>
<h:form>
<p:commandButton value="directUpdate" update=":tableform" />
<p:commandButton value="directUpdate" update=":tableform:table" />
<p:commandButton value="remoteCommand" oncomplete="updateTable()" />
</h:form>
remoteCommand (내 현재 솔루션)과 오른쪽 테이블을 새로 고침에서의 버튼. 하지만 "directUpdate"버튼을 사용하면 테이블의 filtertext가 사라집니다. 하지만 왜 이해가 안되니? (필터 값은 배경에 있지만 텍스트는 비어 있습니다.)
테이블에서 widgetVar.filter()를 사용할 수 있지만 페이징 담당자가 재설정된다는 것을 알고 있습니다. 내 솔루션 remoteCommand 모든 작동합니다 및 테이블 현재 페이지 및 필터를 다시로드합니다. (더 나은 솔루션을 환영합니다)
질문은 왜 형식으로 텍스트와 업데이 트가 직접 업데이 트를 업데이 트하지?
시간 내 주셔서 감사합니다.
숨겨진 입력에 대해 설명해 주셔서 감사합니다. 예, 두 번째 형식은 내 큰 예일뿐입니다.하지만이 경우에는 필요하지 않습니다. 고마워요 :) – pL4Gu33
당신은 오신 것을 환영합니다. – BalusC