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

public abstract class PhaseBinding extends Object implements org.ocpsoft.rewrite.bind.Binding
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 Details

    • to

      public static PhaseBinding to(org.ocpsoft.rewrite.bind.Submission submission)
      Create a Binding to process the given Submission during the Faces life-cycle.
    • before

      public PhaseBinding before(jakarta.faces.event.PhaseId... phases)
      Perform this PhaseBinding before the given phases (Except PhaseId.RESTORE_VIEW). The deferred Submission will be performed once for each PhaseId provided.
    • after

      public PhaseBinding after(jakarta.faces.event.PhaseId... phases)
      Perform this PhaseBinding after the given phases (Except PhaseId.RENDER_RESPONSE). The deferred Submission will be performed once for each PhaseId provided.
    • validatedBy

      public PhaseBinding validatedBy(org.ocpsoft.rewrite.param.Validator<?> validator)
      Validate the Binding value using the given Validator.
    • convertedBy

      public PhaseBinding convertedBy(org.ocpsoft.rewrite.param.Converter<?> converter)
      Convert the Binding value using the given Converter.
    • onValidationFailure

      public PhaseBinding onValidationFailure(org.ocpsoft.rewrite.config.Operation operation)
      On validation failure, perform the given Operation; defaults to SendStatus.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:
      retrieve in interface org.ocpsoft.rewrite.bind.Retrieval
    • submit

      public Object submit(org.ocpsoft.rewrite.event.Rewrite event, org.ocpsoft.rewrite.context.EvaluationContext context, Object value)
      Specified by:
      submit in interface org.ocpsoft.rewrite.bind.Submission
    • supportsRetrieval

      public boolean supportsRetrieval()
      Specified by:
      supportsRetrieval in interface org.ocpsoft.rewrite.bind.Binding
    • supportsSubmission

      public boolean supportsSubmission()
      Specified by:
      supportsSubmission in interface org.ocpsoft.rewrite.bind.Binding