Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.RuntimeCollective.search.action
Class SetSearchPageAction  view SetSearchPageAction download SetSearchPageAction.java

java.lang.Object
  extended byorg.apache.struts.action.Action
      extended bycom.RuntimeCollective.search.action.SetSearchPageAction
Direct Known Subclasses:
SetAdvancedSearchPageAction

public class SetSearchPageAction
extends org.apache.struts.action.Action

Implementation of Action that sets the search page on a set of search results

Version:
$Id: SetSearchPageAction.java,v 1.6 2003/09/30 15:12:57 joe Exp $

Field Summary
private  java.lang.String searchForwardName
          This need to be changed by subclasses, eg advanced actions.
private  java.lang.String searchResultsKey
          This need to be changed by subclasses, eg advanced actions.
 
Fields inherited from class org.apache.struts.action.Action
defaultLocale, servlet
 
Constructor Summary
SetSearchPageAction()
           
 
Method Summary
 org.apache.struts.action.ActionForward perform(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Changes the page of the SearchResults object on the session, by using the String value of page set on the request.
 void setSearchForwardName(java.lang.String name)
          Change the SearchResults key.
 void setSearchResultsKey(java.lang.String key)
          Change the SearchResults key.
 
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, execute, generateToken, getDataSource, getDataSource, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

searchResultsKey

private java.lang.String searchResultsKey
This need to be changed by subclasses, eg advanced actions.


searchForwardName

private java.lang.String searchForwardName
This need to be changed by subclasses, eg advanced actions.

Constructor Detail

SetSearchPageAction

public SetSearchPageAction()
Method Detail

setSearchResultsKey

public void setSearchResultsKey(java.lang.String key)
Change the SearchResults key.


setSearchForwardName

public void setSearchForwardName(java.lang.String name)
Change the SearchResults key.


perform

public org.apache.struts.action.ActionForward perform(org.apache.struts.action.ActionMapping mapping,
                                                      org.apache.struts.action.ActionForm form,
                                                      javax.servlet.http.HttpServletRequest request,
                                                      javax.servlet.http.HttpServletResponse response)
                                               throws java.io.IOException,
                                                      javax.servlet.ServletException
Changes the page of the SearchResults object on the session, by using the String value of page set on the request.

page should be either "next" or "previous" (In future, could set to actual number, too - functionality is there in SearchResults.)

Whatever happens, the global forward "search" is returned.

Error messages: error.search.nullSessionSearchResults - if there is no SearchResults object on the session