com.intersys.jsp
Class PushViewTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended bycom.intersys.jsp.TableSupportTag
          extended bycom.intersys.jsp.PushViewTag
All Implemented Interfaces:
IterationTag, Serializable, Tag

public class PushViewTag
extends TableSupportTag

Creates a new SQL view based on user selections.

The goal of PushViewTag is to create a new view from a current one, so that only elements satisfying given set of conditions from the current view are included in the new. Those conditions are taken from HTTP request parameters.

PushViewTag analizes request to find successful search elements. Successful elements are elements for which something was selected in there SELECT list. Because each SELECT element can also be followed be a number of additional hidden elements which are always successful in HTTP sense, the successful search elements are identified by its name. Name for search element can be constructed in 2 ways. It is either:

For example if the view has column Services, then name for a search element can be either of the following: "Services", "Services.XName.Included" or "Services.XName.Optional". Thus one search options page can contain 2 or more different search elements refferring to the same table column but having different additional conditions (see below).

Additional hidden elements should have form of <SearchElementName>.<addInfo>. In case of "XName" elements, "XName" itself is ommited. Thus the additional element, defining condition for search element named "Services.XName.Included" will be like "Services.Included.condition=\"Provider.Services.Value='INCLUDED'\"". PushViewTag constructs SQL request in the following way:

Search elements, based on properties projected to SQL not as columns for base tables but as child tables processed in a special way. First, such elements are identified in request by their names (plane or with ".XName."). Corresponding tables are added to FROM table list (see above). Then the column in child table which is used in search is identified by additional element "key". For example if search element named "Services.XName.Included" is determined to correspond to a child table, the additional parameter with name "Services.Included.key" is identified and its value used as the column name. This functionality is actively used by childlist tag (implemented by ChildListTag class).

Normally, the main search condition derived from user selections is that designated column of the table is equal to selected value. Designated column is either column of the base table corresponding to the named search element or column of the child table defined as above. However, instead of simple equality one can use a more complex expression. It is defined by "expression" additioanl element. If it is desireable to use IN form instead of equality than one should use "expressionin" additioanl element. If both "expression" and "expressionin" are specified than the former is used in case of single request parameter and the latter in case of multiple parameters.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
PushViewTag()
           
 
Method Summary
 int doEndTag()
           
 int doStartTag()
           
 String getContext()
           
 void setContext(String newContext)
           
 
Methods inherited from class com.intersys.jsp.TableSupportTag
getTable, getUseHistory, getUseHistoryAsBoolean, setTable, setUseHistory, setUseHistory
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PushViewTag

public PushViewTag()
Method Detail

doStartTag

public int doStartTag()
               throws JspException
Throws:
JspException

doEndTag

public int doEndTag()
             throws JspException
Throws:
JspException

getContext

public String getContext()

setContext

public void setContext(String newContext)