This content has been marked as final.
Show 2 replies
-
1. Re: After change event.
h2g2 Oct 12, 2011 9:01 AM (in response to sensationalist)Hi,
the valueChangeEvent is fired before the UPDATE_MODEL_VALUES phase in which backing bean values are filled with the form ones.
Some convenient to make it work the way you expect would be to catch , postpone and repost the event it so that it will be managed in a later phase.
Do it that way :
public final void fileUploadListener(final UploadEvent event) throws Exception { final PhaseId phaseId = event.getPhaseId(); if (phaseId.equals(PhaseId.ANY_PHASE)) { // In order to retrieve data updated from the model // we postpone the management of the file upload event event.setPhaseId(PhaseId.UPDATE_MODEL_VALUES); event.queue(); } else if (phaseId.equals(PhaseId.UPDATE_MODEL_VALUES)) { doMyStuffs(); } }
Hope this will help.
-
2. Re: After change event.
sensationalist Oct 13, 2011 5:00 PM (in response to h2g2)Thanks a lot! It works