| 1 33 package com.icesoft.applications.faces.address; 34 35 import javax.faces.application.Application; 36 import javax.faces.context.FacesContext; 37 import javax.faces.event.PhaseEvent; 38 import javax.faces.event.PhaseId; 39 import javax.faces.event.PhaseListener; 40 41 51 public class PhaseSync implements PhaseListener { 52 53 public void beforePhase(PhaseEvent event) { 54 55 } 56 57 62 public void afterPhase(PhaseEvent event) { 63 64 Application application = 66 FacesContext.getCurrentInstance().getApplication(); 67 AddressFormProcessor process = 68 ((AddressBean) application.createValueBinding("#{address}"). 69 getValue(FacesContext.getCurrentInstance())). 70 getAddressFormProcessor(); 71 72 process.inject(); 74 75 process.updateSubmitButton(); 77 } 78 79 82 public PhaseId getPhaseId() { 83 84 return PhaseId.INVOKE_APPLICATION; 85 } 86 } | Popular Tags |