0
排序一個奇怪的問題,我不想放棄代碼如果可能的話,所以我會盡我所能解釋發生了什麼。p:commandButton更新 - 改變頁面上的「視點」?
基本上,我有一個commandButton執行AJAX操作,然後更新它所在的整個窗體。
這種形式就像這樣:
<h:form id="tabform">
.....
<p:commandButton update=":tabform" value="Save" ajax="true" onstart="savingDialog.show();" onsuccess="savingDialog.hide();" actionListener="#{bean.saveContent}" /> <!-- styling makes it fixed position -->
.....
<p:editor id="ed1" />
<p:editor id="ed2" />
<p:editor id="ed3" />
<p:editor id="ed4" />
<p:editor id="ed5" />
<p:editor id="ed6" />
</h:form>
當我點擊保存按鈕,和我在喜歡的編輯器5,它會保存,然後將我的編輯器2.不集中的中間,但「瀏覽器視圖的焦點」(如果這是有道理的話)。
我可以確認它與commandButton上的更新有關。它在更新後似乎讓我在表格中間的一半。
有沒有解決這個問題的方法?
這不是我正在尋找的(基於我目前的設計),但我能夠使用這個答案來幫助我的數字出一種方法來推動當前滾動,然後重新分配窗口滾動完成。 – user2124871