![]() |
![]() |
![]() |
|
![]() |
|||
![]() |
|||
![]() |
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 showing one page of search results. E. Result number. F. Last name and first name. G. Text field for editing phone number. H. Delete link. I. Dynamic table with links to additional result pages. J. Link to result page. K. Form button to submit changes. K. Hidden code to clear the form for adding an employee. L. Text fields for adding an employee. N. Form button to add an employee. Content SourcesThe Edit Phone Directory page closely resembles the Phone Directory page from the Main View. The only difference is that the Administration View includes form controls for editing, adding, and deleting employees. Like the Main View, Edit Phone Directory includes two content sources: the People table from the Search Engine database, and a Navigation Block View that provides access to the different pages of search results. See the description of the Phone Directory page for more details. 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 Main 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 works the same way as in the Main View. See the Phone Directory page for more details. B.The record count is the same as in the Main View. C.The custom code that displays the search pattern is the same as in the Main View. D.The dynamic table that displays the search results is the same as in the Main View. E.The record number is the same as in the Main View. F.The last name and first name are the same as in the Main View. G.The phone number is the same as in the Main View, except that it is bound to a text field rather than to static text so that the user can edit it. H.The delete link uses Show Details of Current Record so that when the user clicks on it, the delete confirmation page knows which record to delete. I.The dynamic table with links to the other pages of search results is the same as in the Main View. J.The template text for the search results links is the same as in the Main View. K.The Form Action for the update button is Update Record. When you select a Form Action in the Dynamic Bindings palette, GoLive automatically targets the correct page in the config/actions folder to perform the indicated action. In this case, clicking the update button writes all of the changed employee information back to the database. L.There is hidden code here to make sure that the form fields in the add employee section are blank. Without this code, the form would erroneously display the first employee in the People content source. Here is what the code looks like in JSP:
This code works by moving to the end of the record set. GoLive uses this idiom consistently to display new, empty records. It is a good idea to include hidden code like this in any form that should be blank. Notice that the hidden code is the first element in the form, so that it will move with the form if the page design changes. To reuse this code simply replace 'People' with the name of the content source on your page. M.These text fields are simple bindings for entering information about a new employee. N.The Form Action for the add button is Add Record. Clicking on this button adds a new employee to the database. |