Package org.ocpsoft.rewrite.faces.config
Class PhaseBinding
java.lang.Object
org.ocpsoft.rewrite.faces.config.PhaseBinding
- All Implemented Interfaces:
org.ocpsoft.rewrite.bind.Binding,org.ocpsoft.rewrite.bind.Retrieval,org.ocpsoft.rewrite.bind.Submission
An
Operation that wraps & holds a Submission until before or after a given JavaServer Faces
PhaseId. Validation and conversion of the given Submission are also deferred to within the Faces
lifecycle.- Author:
- Lincoln Baxter, III, Fabien Marsaud
-
Method Summary
Modifier and TypeMethodDescriptionafter(jakarta.faces.event.PhaseId... phases) Perform thisPhaseBindingafter the given phases (ExceptPhaseId.RENDER_RESPONSE).before(jakarta.faces.event.PhaseId... phases) Perform thisPhaseBindingbefore the given phases (ExceptPhaseId.RESTORE_VIEW).convertedBy(org.ocpsoft.rewrite.param.Converter<?> converter) Convert theBindingvalue using the givenConverter.onValidationFailure(org.ocpsoft.rewrite.config.Operation operation) On validation failure, perform the givenOperation; defaults toSendStatus.code(int)error code 404 unless otherwise specified.retrieve(org.ocpsoft.rewrite.event.Rewrite event, org.ocpsoft.rewrite.context.EvaluationContext context) submit(org.ocpsoft.rewrite.event.Rewrite event, org.ocpsoft.rewrite.context.EvaluationContext context, Object value) booleanbooleanstatic PhaseBindingto(org.ocpsoft.rewrite.bind.Submission submission) Create aBindingto process the givenSubmissionduring the Faces life-cycle.validatedBy(org.ocpsoft.rewrite.param.Validator<?> validator) Validate theBindingvalue using the givenValidator.
-
Method Details
-
to
Create aBindingto process the givenSubmissionduring the Faces life-cycle. -
before
Perform thisPhaseBindingbefore the given phases (ExceptPhaseId.RESTORE_VIEW). The deferredSubmissionwill be performed once for eachPhaseIdprovided. -
after
Perform thisPhaseBindingafter the given phases (ExceptPhaseId.RENDER_RESPONSE). The deferredSubmissionwill be performed once for eachPhaseIdprovided. -
validatedBy
Validate theBindingvalue using the givenValidator. -
convertedBy
Convert theBindingvalue using the givenConverter. -
onValidationFailure
On validation failure, perform the givenOperation; defaults toSendStatus.code(int)error code 404 unless otherwise specified. -
retrieve
public Object retrieve(org.ocpsoft.rewrite.event.Rewrite event, org.ocpsoft.rewrite.context.EvaluationContext context) - Specified by:
retrievein interfaceorg.ocpsoft.rewrite.bind.Retrieval
-
submit
public Object submit(org.ocpsoft.rewrite.event.Rewrite event, org.ocpsoft.rewrite.context.EvaluationContext context, Object value) - Specified by:
submitin interfaceorg.ocpsoft.rewrite.bind.Submission
-
supportsRetrieval
public boolean supportsRetrieval()- Specified by:
supportsRetrievalin interfaceorg.ocpsoft.rewrite.bind.Binding
-
supportsSubmission
public boolean supportsSubmission()- Specified by:
supportsSubmissionin interfaceorg.ocpsoft.rewrite.bind.Binding
-