Class PrimeFaces.MultiViewState

java.lang.Object
org.primefaces.PrimeFaces.MultiViewState
Enclosing class:
PrimeFaces

public class PrimeFaces.MultiViewState extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    clear(String viewId, String clientId)
    Removes multiViewState of a component in specific view within the current session.
    void
    clear(String viewId, String clientId, boolean reset)
    Removes multiViewState of a component in specific view within the current session.
    void
    Removes all multiViewState within the current session.
    void
    clearAll(boolean reset)
    Removes all multiViewState within the current session.
    void
    clearAll(boolean reset, Consumer<String> clientIdConsumer)
    Removes all multiViewState within the current session.
    void
    clearAll(String viewId, boolean reset)
    Removes all multiViewState in specific view within the current session.
    void
    clearAll(String viewId, boolean reset, Consumer<String> clientIdConsumer)
    Removes all multiViewState in specific view within the current session.
    <T> T
    get(String viewId, String clientId)
    Gets multiview state attached to a component in a specific view.
    <T> T
    get(String viewId, String clientId, boolean create, Supplier<T> supplier)
    Gets multiview state attached to a component in a specific view.
    <T> T
    get(String viewId, String clientId, Supplier<T> supplier)
    Gets or create the multiview state attached to a component in a specific view.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MultiViewState

      public MultiViewState()
  • Method Details

    • clearAll

      public void clearAll()
      Removes all multiViewState within the current session.
    • clearAll

      public void clearAll(boolean reset)
      Removes all multiViewState within the current session.
      Parameters:
      reset - indicates whether or not the component should be reset, if it is in the current view
    • clearAll

      public void clearAll(boolean reset, Consumer<String> clientIdConsumer)
      Removes all multiViewState within the current session.
      Parameters:
      reset - indicates whether or not the component should be reset, if it is in the current view
      clientIdConsumer - Callback for each removed clientId
    • clearAll

      public void clearAll(String viewId, boolean reset)
      Removes all multiViewState in specific view within the current session.
      Parameters:
      viewId - viewId in which multiview state should be cleared
      reset - indicates whether or not the component should be reset, if it is in the current view
    • clearAll

      public void clearAll(String viewId, boolean reset, Consumer<String> clientIdConsumer)
      Removes all multiViewState in specific view within the current session.
      Parameters:
      viewId - viewId in which multiview state should be cleared
      reset - indicates whether or not the component should be reset, if it is in the current view
      clientIdConsumer - operation to execute for every clientId after multiview state has been cleared
    • clear

      public void clear(String viewId, String clientId)
      Removes multiViewState of a component in specific view within the current session.
      Parameters:
      viewId - viewId of a page
      clientId - clientId of a component for which multiview state should be cleared
    • clear

      public void clear(String viewId, String clientId, boolean reset)
      Removes multiViewState of a component in specific view within the current session.
      Parameters:
      viewId - viewId of a page
      clientId - clientId of a component for which multiview state should be cleared, if it is in the current view
      reset - indicates whether or not the component should be reset
    • get

      public <T> T get(String viewId, String clientId, boolean create, Supplier<T> supplier)
      Gets multiview state attached to a component in a specific view.
      Type Parameters:
      T - bean state generic
      Parameters:
      viewId - viewId of a page
      clientId - clientId of a component
      create - flag indicating if bean state should be created if does not exist in curent session
      supplier - bean state instance
      Returns:
      multiview state bean attached to a component
    • get

      public <T> T get(String viewId, String clientId, Supplier<T> supplier)
      Gets or create the multiview state attached to a component in a specific view.
      Type Parameters:
      T - bean state generic
      Parameters:
      viewId - viewId of a page
      clientId - clientId of a component
      supplier - bean state instance
      Returns:
      multiview state bean attached to a component
    • get

      public <T> T get(String viewId, String clientId)
      Gets multiview state attached to a component in a specific view.
      Type Parameters:
      T - bean state generic
      Parameters:
      viewId - viewId of a page
      clientId - clientId of a component
      Returns:
      multiview state bean attached to a component or null