%CSP.PageLookup
class %CSP.PageLookup extends %CSP.Page
CSP page that provides a standard lookup for wizard-generated forms. It expects the following input:
CLASSNAME | Name of class to perform lookup on. |
OBJID | ID of current instance. |
SELECT | A comma-delimited list of fields to display in the search result table. Each field is of the form 'property alias|desc' where alias and |desc are optional. If not specified, the WHERE list is used as the SELECT list. |
WHERE | A comma-delimited list of fields to search on. Each field is of the form 'property alias|desc' where alias and |desc are optional. |
ORDER | A comma-delimited list of fields used to sort the search results. Each field is of the form 'property |desc' where |desc is optional. |
MAXROWS | Maximum rows to display; if missing don't execute query. |
TARGET | URL of page to return to with results. |
CAPTION | Caption for search window. |
OPTIONS | Comma separated list of feature codes. These include popup, create, and clear. |
OBJIDATTR | The name of the OBJID attribute for the associated form. |
Note: For range operations the value in the WHERE parameter contains two values delimited by &.
Method Inventory (Including Private)
- BuildSelectStatement()
- CreateResultSet()
- GetPropSqlName()
- GetPropType()
- OnPage()
- PageName()
- ShowCaption()
- ShowCriteria()
- ShowForm()
- ShowNoCriteria()
- ShowOneChoice()
- ShowPredicates()
- ShowResults()
- ShowScripts()
- ShowSelectChoices()
- ShowSort()
- ShowStyleSheet()
- ShowTitle()
Parameters
parameter CANCELBTN = Cancel;
Caption for Cancel Button.
parameter CHARSET = utf-8;
Make default charset for the page UTF-8.
parameter CLEARBTN = Clear;
Caption for Clear Button.
parameter DEFAULTCAPTION = Caché Search;
Caption displayed if none specified (for normal mode).
parameter ENCODED = 1;
Override ENCODED from %CSP.Page
parameter FINDMSG1 = Find all instances of ;
First half of "Find all" message.
parameter FINDMSG2 = that meet the following conditions:;
Second half of "Find all" message.
parameter FOUNDMSG1;
First half of "Items Found" message.
parameter FOUNDMSG2 = matching item(s) found.;
Second half of "Items Found" message.
parameter NOCRITERIA = At least one search condition must be specified. Search not executed.;
Error message to display when no criteria are specified
for a search and the search button is pressed.
parameter NOMATCH = No matching items found.;
No matching items message.
parameter PREDICATELIST = equals,not equal to,starts with,between,less than,greater than,contains,select;
List of values displayed in search predicate combo box.
parameter PRIVATE = 1;
Override PRIVATE from %CSP.Page
parameter SEARCHBTN = Search;
Caption for Search Button.
parameter SHOWNMSG1 = The first ;
First half of "Items Shown" message.
parameter SHOWNMSG2 = are displayed below:;
Second half of "Items Shown" message.
Methods (Including Private)
classmethod BuildSelectStatement(class As %String, proplist As %List, ByRef statement As %String, getcount As %Boolean = 0, idname As %String = "", select As %String = "SELECT", Output idfield As %Integer) as %Status
Constructs a SELECT statement for the property list proplist.
classmethod CreateResultSet(class As %String, restrict As %List, return As %List, orderby As %List, getcount As %Boolean, ByRef resultset As %ResultSet, ByRef rcount As %Integer, idname As %String = "", ByRef idfield As %Integer) as %Status
Constructs a query using the input values, opens a %ResultSet object
using this query and returns it via resultset.
- class
- The name of the class to perform the lookup on.
- restrict
- A list of restrictions as $lb(property,value).
- return
- A $list of properties to return in the resultset.
- orderby
- A list of $lb(property,ASC|DESC) that specify the order of the result set.
- getcount
- If true, the query should fetch the number of rows in the result.
- resultset
- Returns a %ResultSet object by reference.
- rcount
- Returns number of selected rows by reference. -1 indicates that the row count is in column 1 of the result set.
Returns a %Status indicating success or failure.
final classmethod GetPropSqlName(classname As %String, prop As %String, ByRef column As %String) as %Status
Returns the SQL name of property prop for class classname
in field.
Returns the type (SQL Category) of property prop for class classname.
final classmethod OnPage() as %Status
Event handler for PAGE event: this is invoked in order to
display a csp page.
classmethod PageName() as %String
URL Name of this class
private classmethod ShowCaption()
Display the caption for a lookup page.
Display the criteria form for a lookup page.
where is $list of criteria, each element is $LB(name,pred,val...)
private classmethod ShowForm(classname As %String, where As %List, select As %List, currval As %String)
Display the criteria form for a lookup page.
where is $list of criteria, each element is $LB(name,pred,val,alias)
select is $list of fields that can be sorted on
currval is current sort field
private classmethod ShowNoCriteria()
Display an error message when search criteria must be specified
before a search is requested (OPTIONS=CriteriaRequired) and no criteria are specified.
Display a choice option.
Display a list of predicates in a SELECT box.
private classmethod ShowResults(classname As %String, select As %List, where As %List, sort As %List, maxrows As %Integer, showcount As %Boolean = 1, idname As %String = "") as %Status
Display the results of the lookup in an HTML table.
private classmethod ShowScripts()
Display the client scripts for the lookup page.
This has to be called within the HEAD section of the document.
private classmethod ShowSelectChoices(classname As %String, name As %String, initval As %String, pred As %String)
Display the choices for a select predicate.
Display the sort options for a lookup page.
select is a list of selected fields.
private classmethod ShowStyleSheet()
Display the HTML Style Sheet for the lookup page.
This has to be called within the HEAD section of the document.
private classmethod ShowTitle()
Display the title for a lookup page.
Inherited Members
Inherited Methods (Including Private)
- %ClassIsLatestVersion()
- %ClassName()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %New()
- %OriginalNamespace()
- %PackageName()
- %SetModified()
- ConvertParameter()
- Decrypt()
- Encrypt()
- EscapeHTML()
- EscapeURL()
- HyperEventCall()
- HyperEventHead()
- Include()
- InsertHiddenField()
- InsertHiddenFields()
- IsPrivate()
- Link()
- OnHTTPHeader()
- OnPageError()
- OnPostHTTP()
- OnPostHyperEvent()
- OnPreHTTP()
- OnPreHyperEvent()
- Page()
- QuoteJS()
- RewriteURL()
- ShowError()
- StartTimer()
- StopTimer()
- ThrowError()
- UnescapeHTML()
- UnescapeURL()