com.raritantechnologies.searchApp.taglibrary
Class PageContextTag

java.lang.Object
  extended byBodyTagSupport
      extended bycom.raritantechnologies.searchApp.taglibrary.PageContextTag

public class PageContextTag
extends BodyTagSupport

Sets up a platform-neutral page context. This tag causes a Session scoped RaritanPageContext object to be reset to the current request parameters. This provides a platform (e.g. ASP or JSP) independent page scoped request context that can be used to share page data across custom tags.

Can be used to set some parameters on the page context, either statically or dynamically. If the value of the parameter passed to the tag is "_CREATE_ID_" a unique ID will be created on-the-fly. If the value of the parameter passed to the tag is "_CREATE_ID_IF_NULL_", a unique ID will be created if the current request parameter value is null.

Can initialize a set of SessionDataHandlers if a DataHandlerFactory name is passed from the JSP page. This provides coordination of persistent client-side parameters on a page-wide basis. A "persistent parameter" is a javascript parameter whose state is maintained across HTTP requests. Persistent parameters are set using the SetPersistentParameterServlet.

Can initialize an IPageLinkClickHandler that can provide specialized javascript click handling behavior either by specifying a Class name or a SystemObject name.

JSP Tag:
Requires a <search:PageContext /> tag which sets a session scoped RaritanPageContext:
    RaritanPageContext rpc = RaritanPageContext.getPageContext( pageContext.getSession().getId(),
                                                                  pageContext.getAttribute( "pageName" ) );
  

SearchForm and DisplayForm custom tags then get this RaritanPageContext and pass it to all of their renderers. Any attributes set by the PageContextTag can then be shared across custom tags within a page.

ASP:
  <%
      Set rpc = RaritanPageContext.getPageContext( Session.SessionID, "pageName" );
   %>
  
JSP parameters:
   <search:PageContext 
             pagelinkClickHandlerName=[ name of IPageLinkClickHandler SystemObject ]
             pagelinkClickHandlerClass=[ class name of IPageLinkClickHandler ]
             sessionDataManagerClass=[ class name of ISessionDataManager to set up for the page ]
             sessionDataManagerName=[ name of BasicSessionDataManager if class is 'default' ]
             pageParameters=[ delimited set of page parameters, ('null' means remove from request) ]
             parameterSetCommand=[ name=value request that will enable page Parameter setting ]
             lastQueryParameters=[ delimited set of request parameters used to set the lastQueryParameters session map ]
    />
 

Developed by Raritan Technologies .

Author:
Ted Sullivan
See Also:
Serialized Form

Constructor Summary
PageContextTag()
           
 
Method Summary
 int doStartTag()
           
 void setDataHandlerFactoryName(java.lang.String dataHandlerFactoryName)
          Sets the DataHandlerFactory instance.
 void setLastQueryParameters(java.lang.String lastQueryParameterList)
          set the set of query parameters that should be used to set the current sessions last query set.
 void setPagelinkClickHandlerClass(java.lang.String plClickHandlerClass)
           
 void setPagelinkClickHandlerName(java.lang.String plClickHandler)
           
 void setPageParameters(java.lang.String pageParameters)
           
 void setParameterSetCommand(java.lang.String requestCommand)
          Sets the request command (e.g.
 void setSessionDataManagerClass(java.lang.String sessDataManagerClass)
          Sets the SessionDataManager to use for the page (optional).
 void setSessionDataManagerName(java.lang.String sessionDataManagerName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageContextTag

public PageContextTag()
Method Detail

setPagelinkClickHandlerName

public void setPagelinkClickHandlerName(java.lang.String plClickHandler)

setPagelinkClickHandlerClass

public void setPagelinkClickHandlerClass(java.lang.String plClickHandlerClass)

setPageParameters

public void setPageParameters(java.lang.String pageParameters)

setParameterSetCommand

public void setParameterSetCommand(java.lang.String requestCommand)
Sets the request command (e.g. "resetParams=true" ) that will cause the parameters to be set


setLastQueryParameters

public void setLastQueryParameters(java.lang.String lastQueryParameterList)
set the set of query parameters that should be used to set the current sessions last query set. format [field1,field2,field3=fixedvalue,field4,etc...] If a fixed value is given, the request parameter must match this value in order to cache the query.


setSessionDataManagerClass

public void setSessionDataManagerClass(java.lang.String sessDataManagerClass)
Sets the SessionDataManager to use for the page (optional). use "default" to get the BasicSessionDataManager


setSessionDataManagerName

public void setSessionDataManagerName(java.lang.String sessionDataManagerName)

setDataHandlerFactoryName

public void setDataHandlerFactoryName(java.lang.String dataHandlerFactoryName)
Sets the DataHandlerFactory instance. Needed to initialize data handler properties at the top of a page.


doStartTag

public int doStartTag()
               throws JspException
Throws:
JspException