11) ATG Search:
The form handler class atg.repository.servlet.SearchFormHandler.
This handler uses the search criteria to return items from one or more repositories, and one or more item types from a given repository. SearchFormHandler is a subclass of atg.repository.servlet.GenericFormHandle,so it inherits properties and handler methods common to all form handlers.
*Supports the following search methods:
• Keyword search
• Text search
• Hierarchical search
• Advanced search
• Combination search
Important properties:
-allowEmptySearch
==>Search proceeds or throw an error when no search criterion is specified. The default value is true.
-allowRefine
==>Include previously entered criteria. default value is false.
-enableCountQuery
==>The items located by a search. default value is false.
-errorURL
==>URL that opens when a search fails. Set this property to the URL of a page that describes the error and provides tools for starting another search.
-successURL
==> URL that opens when a search operation succeeds. This property should point to the URL for the first search results page.
-itemTypes
==> must be defined for the repository specified in the repositories property.
-previouslySubmitted
==>Tracks whether a query that uses this SearchFormHandler occurred during the current session. When a search begins, this property is set to true.
-repositories
==> A comma-delimited list of repositories to include in the search. Specify the full path of each repository to the component.
A) KeyWord Search:
• doKeywordSearch is set to true to enable keyword searching
• keywordSearchPropertyNames specifies one or more single or multi-valued
properties to include in searches. If this property is empty, the form handler searches
all string properties of each repository item, except enumerated or non-queryable
properties.
Logical Operators:
• NOT / !
• AND / &
• OR / |
B) Text Search:
• doTextSearch is set to true to enable text searching.
• textSearchPropertyNames specifies which properties to query.
-allowWildcards (default true , to use *)
-searchStringFormat :
Format that the text should follow.
Each repository component uses this property to specify the text format available to the
database. Available options include:
- ORACLE_CONTEXT: Oracle ConText
- MSSQL_TSQ: Microsoft SQL Server
- SYBASE_SDS: Sybase SpecialtyDataStore
- DBS_TEXT_EXT: IBM DB2 with the Text Extender package
C) Hierarchical Search:
A hierarchical search returns all parent and descendant items of the specified item. A hierarchical search looks in a family of items, starting from a given item level and extending to that item’s descendants.
Each item type must have a multi-valued property whose value is a complete list of its ancestor IDs.
Hierarchical searching restricts the search results to items whose ancestor items include the item specified in the ancestorId property.
• doHierarchicalSearch Set to true.
• ancestorPropertyName Name that represents an inheritance scheme or lineage.
• ancestorId Repository ID that represents an inheritance scheme or lineage.
This property is set to the repository ID of the item whose descendants you want to search, typically obtained through a hidden input tag, or supplied by the form user through an
input field.
D) Advanced Search:
• doAdvancedSearch If set to true.
• advancedSearchPropertyNames List of properties that are searched, where each property is
specified in this format:
item-type.property-name
• advancedSearchPropertyRanges Property range used to narrow search results by integer
values. The specified range is inclusive and uses this format:
item-type.property-name.max
item-type.property-name.min
You can leave the search range open at either end by
leaving the maximum or minimum value undefined.
• advancedSearchPropertyValues List of property values used in the search query. The format
should appear as follows:
item-type.property-name=value
• clearQueryURL The URL of the page to display when the handleClearQuery() method is invoked. The specified page should have search tools. If this property is empty,
• handleClearQuery() returns control to the current page.
• displayName The name displayed for an item type when it is used as search criteria.
• propertyValuesByType Holds the properties in advancedSearchPropertyNames
and their values in a HashMap key/value relationship. This only applies to those properties in
advancedSearchPropertyNames that are enumerated, RepositoryItems, or collection of RepositoryItems.
When the key is the name of a property, the value is a collection of possible values.
When the key is a repositoryId, the value is a collection of values for a specific property.
When the key is a collection of repositoryIds, the value is repositoryIds.
The format should appear as follows:
item-type.property-name
** Search Results Properties:
SearchFormHandler defines the following search results properties:
-currentResultPageNum : page number of active page. Set this property in order to display a given page. The default setting is 1.
-enableCountQuery Enables access to other query result properties.
-endCount : number of the last item on the current page.
-endIndex : based index number of the last item on the current page. The form handler uses this property to calculate the endCount property.
-maxResultsPerPage : Maximum number of items that display on a page.
-maxRowCount : Maximum number of items returned from a search. A value of –1 (the
default) returns all items that satisfy the search criteria.
-resultPageCount : Number of pages that hold search results.
-resultSetSize : Number of items returned from the search.
-startCount : number of the first item on the current page.
-startIndex : index number of the first item on the current page. The form handler uses this property to calculate the startCount property.
You can use these properties to construct the search results page.
12) DSP Tag List:
-dsp:a
Supports passing values to component properties and page parameters on click-through. Also handles URL rewriting.
-dsp:beginTransaction
Starts a transaction.
-dsp:commitTransaction
Completes a transaction.
-dsp:contains
Determines whether a Collection contains a specific single valued item.
-dsp:containsEJB
Determines whether a Collection contains an EJB.
-dsp:demarcateTransaction
Manages a transaction by starting the transaction, checking for errors, rolling back the transaction when errors are found and committing it when they are not.
-dsp:droplet
Invokes an ATG Servlet Bean.
-dsp:equalEJB
Determines whether two EJBs have the same primary keys.
-dsp:form Encloses a form that can send DSP form events.
-dsp:frame Embeds a page by encoding the frame src URL.
-dsp:getvalueof
Introduces a page parameter or component property value as an element in a JSP.
-dsp:go Encloses a form that can send WML form events.
-dsp:iframe Embeds a dynamic page, by encoding the frame src URL.
-dsp:img Inserts an image.
-dsp:importbean
Imports a Nucleus component into a page so it can be referred to without using its entire pathname. Also, creates a reference to a Nucleus component in an attribute visible to EL expressions.
-dsp:include
Embeds a page into another page.
-dsp:input
Passes values to a component property on submission.
-dsp:link
References a page, such as a stylesheet, by encoding the link src URLs.
-dsp:oparam
Specifies content to be rendered by an enclosing
-dsp:droplet tag.
-dsp:option
Specifies content to be rendered by an enclosing
-dsp:select tag.
-dsp:orderBy
Provides the sorting pattern to parent tag dsp:sort.
-dsp:page
Enables ATG page processing functionality.
-dsp:param
Stores a value in a parameter.
-dsp:postfield
Passes values to a component property on submission (WML).
-dsp:property
Sets a component property from dsp:a tag.
-dsp:rollbackTransaction
Causes any actions in the current transaction to be returned to their pretransaction state.
-dsp:select
Passes values to a component property on submission.
-dsp:setTransactionRollbackOnly
Specifies that, when a transaction is prompted to end, it ends in a rollback action.
-dsp:setvalue
Sets the value of a component property or a page parameter to a specified value.
-dsp:setxml Sets attribute display format to XML or HTML.
-dsp:sort
Organizes the contents of a Container or array based on a sorting pattern.
-dsp:test
Makes an object’s descriptive information available so other tags can find out its size, data type, and so on.
-dsp:textarea
Passes values to a component property on submission.
-dsp:tomap
Introduces a page parameter, standard JavaBean or Dynamic Bean component, or constant value as an element in a JSP that other tags can render using EL.
-dsp:transactionStatus
Reads the current transaction’s status.
-dsp:valueof
Retrieves and displays the value of a page parameter,component property, or constant value.
Reference: ATG Platform documentation set : Version 9.1 - 7/31/09
No comments:
Post a Comment