Class NewPagedResourceAction

  • All Implemented Interfaces:
    Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

    public abstract class NewPagedResourceAction
    extends VelocityPortletPaneledAction

    PagedResourceAction is a base class that handles paged display of lists of Resourecs.

    See Also:
    Serialized Form
    • Constructor Detail

      • NewPagedResourceAction

        public NewPagedResourceAction()
    • Method Detail

      • readAllResources

        protected abstract List readAllResources​(org.sakaiproject.event.api.SessionState state)
        Implement this to return alist of all the resources that there are to page. Sort them as appropriate, and apply search criteria.
      • totalPageNumber

        protected int totalPageNumber​(org.sakaiproject.event.api.SessionState state)
        Return the total page number
      • addSearchMenus

        protected void addSearchMenus​(org.sakaiproject.cheftool.api.Menu bar,
                                      org.sakaiproject.event.api.SessionState state)
        Add the menus for search.
      • prepPage

        protected List prepPage​(org.sakaiproject.event.api.SessionState state)
        Prepare the current page of items to display.
        Returns:
        List of items to display on this page.
      • doView_page

        public void doView_page​(RunData runData,
                                Context context)
        Handle a view indecated page request
      • doView_next

        public void doView_next​(RunData runData,
                                Context context)
        Handle a next-item (view) request.
      • doList_first

        public void doList_first​(RunData runData,
                                 Context context)
        Handle a first-item page (list) request.
      • doList_last

        public void doList_last​(RunData runData,
                                Context context)
        Handle a last-item page (list) request.
      • doList_next

        public void doList_next​(RunData runData,
                                Context context)
        Handle a next-page (list) request.
      • doView_prev

        public void doView_prev​(RunData runData,
                                Context context)
        Handle a prev-item (view) request.
      • doList_prev

        public void doList_prev​(RunData runData,
                                Context context)
        Handle a prev-page (list) request.
      • doSearch

        public void doSearch​(RunData runData,
                             Context context)
        Handle a Search request.
      • doSearch_clear

        public void doSearch_clear​(RunData runData,
                                   Context context)
        Handle a Search Clear request.
      • resetPaging

        protected void resetPaging​(org.sakaiproject.event.api.SessionState state)
        Reset to the first page
      • findResourceInList

        protected int findResourceInList​(List resources,
                                         String id)
        Find the resource with this id in the list.
        Parameters:
        items - The list of items.
        id - The item id.
        Returns:
        The index position in the list of the item with this id, or -1 if not found.
      • doToggle_paging

        public void doToggle_paging​(RunData data,
                                    Context context)
        The action for toggling paging status: show all(no paging) or paging