Class OnloadParam

All Implemented Interfaces:
EditableValueHolder, PartialStateHolder, StateHolder, TransientStateHolder, ValueHolder, ComponentSystemEventListener, FacesListener, SystemEventListenerHolder, EventListener
Direct Known Subclasses:
HashParam, ScriptParam

public abstract class OnloadParam extends UIViewParameter
Base class of HashParam and ScriptParam.
Since:
3.6
  • Field Details

    • state

      protected final State state
      The component state.
  • Constructor Details

    • OnloadParam

      protected OnloadParam()
      The constructor instructs Faces to register all scripts during the render response phase if necessary.
  • Method Details

    • getInitScript

      protected String getInitScript(FacesContext context)
      Returns script which should be executed upon initialization of a new view.
      Parameters:
      context - The involved faces context.
      Returns:
      Script which should be executed upon initialization of a new view.
    • getUpdateScript

      protected String getUpdateScript(FacesContext context)
      Returns script which should be exeucted upon ajax update of the current view.
      Parameters:
      context - The involved faces context.
      Returns:
      Script which should be exeucted upon ajax update of the current view.
    • getEventValue

      protected abstract String getEventValue(FacesContext context)
      Returns the value of the OmniFaces.OMNIFACES_EVENT_PARAM_NAME associated with the current component.
      Parameters:
      context - The involved faces context.
      Returns:
      The value of the OmniFaces.OMNIFACES_EVENT_PARAM_NAME associated with the current component.
    • isOnloadParamRequest

      protected boolean isOnloadParamRequest(FacesContext context)
      Returns true if the current request was invoked by the current OnloadParam component.
      Parameters:
      context - The involved faces context.
      Returns:
      true if the current request was invoked by the current OnloadParam component.
    • processDecodes

      public void processDecodes(FacesContext context)
      If this is invoked during an OnloadParam postback, then decode as if immediate=true to save lifecycle overhead.
      Overrides:
      processDecodes in class UIInput
    • decodeAll

      protected abstract void decodeAll(FacesContext context)
      Decode all relevant OnloadParam components at once.
      Parameters:
      context - The involved faces context.
    • decodeImmediately

      protected void decodeImmediately(FacesContext context, String submittedValue)
      This basically acts as if immediate=true is set to save lifecycle overhead.
      Parameters:
      context - The involved faces context.
      submittedValue - The submitted value.
    • processValidators

      public void processValidators(FacesContext context)
      This override which does effectively nothing prevents Faces from performing validation during non-onloadparam postbacks.
      Overrides:
      processValidators in class UIViewParameter
    • processUpdates

      public void processUpdates(FacesContext context)
      This override which does effectively nothing prevents Faces from performing update during non-onloadparam postbacks.
      Overrides:
      processUpdates in class UIInput
    • getRender

      public String getRender()
      Returns a space separated string of client IDs to update on ajax response.
      Returns:
      A space separated string of client IDs to update on ajax response.
    • setRender

      public void setRender(String render)
      Sets a space separated string of client IDs to update on ajax response.
      Parameters:
      render - A space separated string of client IDs to update on ajax response.
    • isOnloadParamRequest

      protected static boolean isOnloadParamRequest(FacesContext context, String onloadEvent)
      Returns true if the current request is triggered by an onload param request of the given onload param event.
      Parameters:
      context - The involved faces context.
      onloadEvent - The onload param event.
      Returns:
      true if the current request is triggered by an onload param request of the given onload param event.