我想從Primefaces ColourPicker中選擇顏色發送到我的後端變化。Primefaces ColourPicker,如何獲得ajax事件的變化
雖然這似乎不被支持。
<p:colorPicker value="#{colorView.colorPopup}" />
我可以看到它會提交頁面提交時的值。
<p:colorPicker value="#{colorView.colorPopup}" />
<p:commandButton value="Submit" oncomplete="PF('dlg').show();" update="grid" />
即使一些JavaScript被稱爲改變將是偉大的。
更新:
我想支持bean來更新顏色變化,不只是當我提交表單。
這樣做的主要原因是我在頁面上有幾個顏色選擇器,並且表單被提交我不知道哪個顏色選擇器來自哪個值。
你想除了設置'colorPopup'值之外還要執行一些操作?還是說你已經測試了這個,並且認爲這個值在非ajax提交之前沒有更新? – yannicuLar 2014-12-02 08:15:08