--------------------------------- Private Function SAI_EmitAreaPageHeading(ByRef PageIn) %> <% Dim bRefresh Dim iInterval Call SA_GetPageRefreshInterval(PageIn, bRefresh, iInterval) If ( TRUE = bRefresh ) Then %> <% End If %> <%=Server.HTMLEncode(SAI_GetPageTitle())%> <% Call SA_EmitAdditionalStyleSheetReferences("") %>
<% Call ServeStandardHeaderBar(SAI_GetBannerText(), mstrIconPath) If ( SAI_IsAutoIndentEnabled() ) Then %>
<% End If End Function %> <% '-------------------------------------------------------------------- ' ' Function: SAI_EmitAreaPageFooter ' ' Synopsis: Private function to emit footer for an Area page. ' ' Arguments: [in] PageIn reference to page object ' ' Returns: Nothing ' '-------------------------------------------------------------------- Private Function SAI_EmitAreaPageFooter(ByRef PageIn) If ( SAI_IsAutoIndentEnabled() ) Then %>
<% End If %>
<% End Function '-------------------------------------------------------------------- ' ' Function: SAI_EmitPageletPageHeading ' ' Synopsis: Private function to emit heading for an Pagelet page. ' ' Arguments: [in] PageIn reference to page object ' ' Returns: Nothing ' '-------------------------------------------------------------------- Private Function SAI_EmitPageletPageHeading(ByRef PageIn) %> <% Dim bRefresh Dim iInterval Call SA_GetPageRefreshInterval(PageIn, bRefresh, iInterval) If ( TRUE = bRefresh ) Then %> <% End If %> <%=Server.HTMLEncode(SAI_GetPageTitle())%> <% Call SA_EmitAdditionalStyleSheetReferences("") %> <% Call ServeStandardHeaderBar(SAI_GetBannerText(), mstrIconPath) If ( (Len(SAI_GetBannerText()) > 0) OR ((Len(mstrIconPath) > 0)) ) Then Response.Write("
"+vbCrLf) End If End Function '-------------------------------------------------------------------- ' ' Function: SAI_EmitPageletPageFooter ' ' Synopsis: Private function to emit footer for an Pagelet page. ' ' Arguments: [in] PageIn reference to page object ' ' Returns: Nothing ' '-------------------------------------------------------------------- Private Function SAI_EmitPageletPageFooter(ByRef PageIn) If ( (Len(SAI_GetBannerText()) > 0) OR ((Len(mstrIconPath) > 0)) ) Then Response.Write(vbCrLf+"
"+vbCrLf) End If %> <% End Function '-------------------------------------------------------------------- ' ' Function: SA_StoreTableParameters ' ' Synopsis: Internal helper function to store the state of the item selections ' that may have been made when the current page was called ' from an OTS page. ' ' Arguments: None ' ' Returns: None ' '-------------------------------------------------------------------- Private Function SA_StoreTableParameters() Dim x Dim sVarName Dim sVarValue If ( TRUE = g_bSetSelectionVars ) Then Exit Function End If g_bSetSelectionVars = TRUE 'Call SA_TraceOut("INC_FRAMEWORK", "Entering SA_StoreTableParameters()") Session("TVItem_Checked") = "No" If ( Request.Form("TVItem_Table1").Count > 0 ) Then 'Call SA_TraceOut("INC_FRAMEWORK", "Found " + CStr(Request.Form("TVItem_Table1").Count) + " Table parameters") Session("TVItem_Count") = Request.Form("TVItem_Table1").Count For x = 1 to Request.Form("TVItem_Table1").Count sVarName = "Item"+CStr(x) sVarValue = Request.Form("TVItem_Table1")(x) sVarValue = SA_UnEncodeQuotes(sVarValue) 'Call SA_TraceOut("INC_FRAMEWORK", "Variable: " + sVarName + " value:" + sVarValue) Session(sVarName) = sVarValue Next Else 'Call SA_TraceOut("INC_FRAMEWORK", "SA_StoreTableParameters found no data") Session("TVItem_Count") = "None" End If End Function Private Function SAI_CopyTableSelection(ByVal sParamName) Dim iX Dim iCount Dim sValue Dim sVarName Dim sPKeyVarName 'Call SA_TraceOut("INC_FRAMEWORK", "Entering SAI_CopyTableSelection") iCount = CInt(Session("TVItem_Count")) Session(sParamName + "_Count") = iCount 'Call SA_TraceOut("INC_FRAMEWORK", "Session("+sParamName + "_Count" + ") = " + CStr(Session(sParamName + "_Count"))) For iX = 1 to iCount sVarName = "Item"+CStr(iX) sPKeyVarName = sParamName + "_Item_"+ CStr(iX) Session(sPKeyVarName) = Session(sVarName) Session(sVarName) = "" 'Call SA_TraceOut("INC_FRAMEWORK", "Session("+sPKeyVarName+") = " + Session(sPKeyVarName)) Next Session("TVItem_Checked") = "YES" End Function '-------------------------------------------------------------------- ' ' Function: OTS_GetTableSelectionCount ' ' Synopsis: Get the number of OTS table selections. OTS Tasks should ' call this API to determine how many objects the user selected. ' OTS_GetTableSelection is then repeatedly called to retrieve the ' object key for each of the selected items. ' ' Arguments: [in] sParamName Parameter name for object key ' ' Returns: Number of table selections that exist ' '-------------------------------------------------------------------- Public Function OTS_GetTableSelectionCount(ByVal sParamName) Dim sValue Dim iCount OTS_GetTableSelectionCount = 0 IF ( Len(sParamName) <= 0 ) Then sParamName = "PKey" End If 'Call SA_TraceOut("INC_FRAMEWORK", "Entering OTS_GetTableSelectionCount("+sParamName+")") ' ' If no data was posted If ( Session("TVItem_Count") = "None" ) Then Call SA_TraceOut("INC_FRAMEWORK", "OTS_GetTableSelectionCount detected data not posted") ' ' Check QueryString sValue = Request.QueryString(sParamName) If ( Len(sValue) > 0 ) Then 'Call SA_TraceOut("INC_FRAMEWORK", "OTS_GetTableSelectionCount found parameter in QueryString("+sParamName+"): " + CStr(sValue)) iCount = 1 Session("TVItem_Count") = iCount Dim sVarName sVarName = "Item"+CStr(iCount) Session(sVarName) = sValue Call SAI_CopyTableSelection(sParamName) OTS_GetTableSelectionCount = CInt(Session(sParamName + "_Count")) Exit Function End If ' ' Check session variables iCount = Session(sParamName + "_Count") If ( Len(iCount) > 0 ) Then If ( CInt(iCount) > 0 ) Then 'Call SA_TraceOut("INC_FRAMEWORK", "OTS_GetTableSelectionCount found parameter in Session("+sParamName + "_Count"+"): " + CStr(iCount)) OTS_GetTableSelectionCount = iCount Exit Function End If End If ' ' Copy posted data to session variables Else Call SA_TraceOut("INC_FRAMEWORK", "OTS_GetTableSelectionCount data posted, count =" + CStr(Session("TVItem_Count"))) ' ' If data was posted then copy to session variables iCount = Session("TVItem_Count") If ( Len(iCount) > 0 ) Then If ( CInt(iCount) > 0 ) Then If (Session("TVItem_Checked") <> "YES") Then Call SAI_CopyTableSelection(sParamName) End If OTS_GetTableSelectionCount = CInt(Session(sParamName + "_Count")) Exit Function End If End If Call SA_TraceErrorOut("INC_FRAMEWORK", "OTS_GetTableSelectionCount found invalid TVItem_Count: " + CStr(Session("TVItem_Count"))) Call SA_TraceErrorOut("INC_FRAMEWORK", "OTS_GetTableSelectionCount caller was: " + CStr(SA_GetScriptFileName())) End If End Function '-------------------------------------------------------------------- ' ' Function: OTS_GetTableSelection ' ' Synopsis: Retrieve the object key for a selected object. ' ' Arguments: [in] sParamName Parameter name for object key ' [in] iIndex Index number of the selected item ' [out] Output parameter which recieves the value of the object key ' ' Returns: TRUE if the specified object was found, otherwise FALSE ' '-------------------------------------------------------------------- Public Function OTS_GetTableSelection(ByVal sParamName, ByVal iIndex, ByRef sValue) Dim iCount IF ( Len(sParamName) <= 0 ) Then sParamName = "PKey" End If 'Call SA_TraceOut("INC_FRAMEWORK", "Entering OTS_GetTableSelection("+sParamName+")") If ( Session("TVItem_Checked") <> "YES" ) Then Call OTS_GetTableSelectionCount(sParamName) End If iCount = CInt(Session(sParamName + "_Count")) If ( (iCount <= 0) OR (iIndex > iCount) ) Then OTS_GetTableSelection = FALSE Else Dim sVarName sVarName = sParamName + "_Item_"+ CStr(iIndex) sValue = Session(sVarName) OTS_GetTableSelection = TRUE End If End Function '-------------------------------------------------------------------- ' ' Function: SAI_EmitOTS_SearchSortClientScript ' ' Synopsis: Internal helper function to emit client-side javascript in support ' of the OTS Widget. ' ' Arguments: None ' ' Returns: None ' '-------------------------------------------------------------------- Private Function SAI_EmitOTS_SearchSortClientScript() %> <% End Function Public Function SA_ServeDefaultClientScript() %> <% End Function %>