![]() |
![]() |
![]() |
|
![]() |
|||
![]() |
|||
![]() |
GoLive 6 Dynamic Content Samples | ||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
||||||
Main View | Administration View | How it Works | ||||||
![]() |
||||||||
![]() |
|
A. Text field for entering search pattern. B. Number of search results. C. Current search pattern. D. Dynamic table with search results. E. Result number. F. Last name, first name, and phone number. G. Dynamic table with links to additional result pages. H. Link to result page. Content SourcesThere are two content sources on the search page. The first one, the People table from the Search Engine database, uses record filtering to find all the employees whose last names match a search pattern. Here is what the content source looks like in GoLive: The match pattern looks for substrings. If the user types the letter 'a' into the search box, then the match pattern finds all employees that have an 'a' in their last name. Here is how it works. The 'like' keyword specifies a partial match based on a search pattern. The '%' signs are wildcard symbols that match any number of characters. Because there is a '%' at both ends of the expression, the pattern matches substrings. If there were only a '%' sign at the end of the expression, then the pattern would match prefixes; if there were only a '%' sign at the beginning, then it would match suffixes. Finally, {gl.pageParameter("LastName","")} is the JSP syntax for including the LastName parameter from the URL by calling a function GoLive supplies. This function returns the second parameter if the URL parameter is not present. A URL that targets this page should have the form search.jsp?LastName=xyz. If the LastName parameter is missing, then an empty string is used, and the search pattern of '%%' matches every employee in the database. The second content source on the page is a Navigation Block View. When you use Records per Page with a dynamic table, a Navigation Block View provides information about the different pages of query results. In this example the Navigation Block View is associated with the People content source. When a user types in a search pattern that gives more than one page of search results, the Navigation Block View provides a way to create direct links to all of them. Using this kind of navigation is an alternative to using Link to Previous Record and Link to Next Record. TabsThe link on the Administration View tab repeats the LastName parameter so that when a user clicks on it, he sees his current search results in the Administration View. In JSP the link parameter looks like this:
You can add a link parameter like this by using the 'Edit...' command in the link inspector flyout, or by just typing it directly. A.The search box at the top of the page is simply named LastName; it is not bound to anything. The form that contains the search box points back to the search page, so when the user clicks the search button it requests the URL search.jsp?LastName=xyz. The effect is to rerun the search with a different search pattern. B.The record count displays how many records match the search pattern. This special binding is available at the bottom of the field list when you bind an element. C.The custom code here displays the current search pattern. In JSP the code is,
You can use this code to display a different URL parameter by replacing LastName with the name of the parameter. D.The dynamic table displays one page of search results. It uses the Records per Page option to display search results in blocks of 8. Notice that the table begins with the row that contains the column headings, and not with the row that contains the record count and search pattern. The reason is that the record count and search pattern are dynamic. If these were part of the dynamic table GoLive would mistake them for the template row. E.The record number binding is available at the bottom of the field list when you bind an element. F.The last name, first name, and phone number are simple text bindings. G.This dynamic table displays links to the different pages of search results. It is bound to the Navigation Block View using Repeat Cells. H.Each record in a Navigation Block View provides information about the first record, last record, and page number for a page of search results. There is also a link to display the page. In this case the template text is bound to the record number, which corresponds to the page number. The link destination is bound to the Link_URL field. Clicking on the link redisplays the page with the corresponding page of search results. |