Class PrimeFaces.MultiViewState

  • Enclosing class:
    PrimeFaces

    public class PrimeFaces.MultiViewState
    extends Object
    • Constructor Summary

      Constructors 
      Constructor Description
      MultiViewState()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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 clearAll()
      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, boolean create, Supplier<T> supplier)
      Gets multiview state bean attached to a component in a specific view.
    • Constructor Detail

      • MultiViewState

        public MultiViewState()
    • Method Detail

      • 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 bean 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