Sun Java System Portal Server 7.1 Technical Reference

Chapter 64 Post Search Tags in search.tld

This chapter lists the tags and attributes in search.tld file. These tags are related to search results and are used after a search is executed. They provide various counts and help display the search results.

desktop.tld Normal Tags with Attributes

Table 64–1 desktop.tld Normal Tags with Attributes

Tag Name 

Description 

Attributes 

getNextResult 

Search results iterator, creates a context for each result in the search result stream. 

bodycontent - JSP 

input (required) -search result document 

input (required) — search result stream 

getResult 

Retrieves the result stream from the previous search. 

id (optional) 

scope (optional) 

getValue 

Returns a string value of the attribute or returns a string value of a multivalue attribute with index. 

This tag must be used within the getNextResult tag. 

Attribute (required) - string - attribute name 

escape (true for HTML encoding) 

id (optional) 

scope (optional) 

truncate (optional) - specifies the number of characters to return in the attribute 

getURL 

Returns a string with the search result URL as a string. This tag must be used within the getNextResult tag. 

escape (optional) 

id (optional) 

getHasNextPage 

Returns true if there are more hits for the next page by considering the values of viewHits and the current page. 

id (optional) 

scope (optional) 

getHasPreviousPage 

Returns true if there is a previous page. Value based on viewHits and current page value. 

id (optional) 

scope (optional) 

getNoHits 

Returns true if no matching hits were found. This is a convenience tag. 

id (optional) 

scope (optional) 

getHitCount 

Returns the total number of results that matched the query. 

id (optional) 

scope (optional) 

getToHit 

Returns the last hit being displayed on a page. The value is based on firstHit and viewHits. 

id (optional) 

scope (optional) 

getPage 

Returns the current page. If the value is not set, calculates the page based on viewHits and firstHit. 

id (optional) 

scope (optional) 

getTotalDocuments 

Returns the total number of documents in the database. 

id (optional) 

scope (optional) 

getTotalPages 

Returns the total number of pages of hits that are available. The value is calculated from viewHits and hitCount. 

id (optional) 

scope (optional) 

getResultCount 

Returns the number of results returned by the search. Returns -1 for an error. 

id (optional) 

scope (optional)