0
我有一個顯示所選擇的家庭(從樹上)描述的編輯器組件setPropertyActionListener不流通權價值
所以編輯程序後,用戶點擊保存按鈕,在那裏,我想利用這個
<f:setPropertyActionListener target="#
{projectTestManagementMB.selectedNodeDescription}"
value="projectTestManagementMB.selectedFamily.description" />
將描述的新值傳遞給這個變量selectedNodeDescription。但是當我檢查它時,我發現它包含舊值projectTestManagementMB.selectedFamily.description
而不是新值。
下面的代碼:
<p:editor id="familyDescriptionEditor" value="#
{projectTestManagementMB.selectedFamily.description}" width="600"/>
<p:commandButton id="submitButton" value="Save" icon="ui-icon-disk"
actionListener="#{projectTestManagementMB.saveDescription}">
<f:setPropertyActionListener target="#
{projectTestManagementMB.selectedNodeDescription}"
value="projectTestManagementMB.selectedFamily.description" />
</p:commandButton>
爲什麼不ü用空的動作,並將其作爲參數傳遞? – Daniel
相關:http://stackoverflow.com/questions/3909267/differences-between-action-and-actionlistener – BalusC