TAILIEUCHUNG - Embedding Perl in HTML with Mason Chapter 8: Building a Mason Site-P3

Tham khảo tài liệu 'embedding perl in html with mason chapter 8: building a mason site-p3', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Chapter 8 Building a Mason Site-P3 This component actually delegates most of its work to the search component. All this component does is create a cursor representing the rows of interest for this query. In this case the query is simply all projects . We take advantage of the limit and offset features of MySQL in order to select only those rows we are interested in. As we shall see in a moment the search component displays paged results 20 per page. In addition this component needs to get a count of how many rows this query would get without the limit. It also creates a textual description of the search it is doing so that this can be displayed to the user. The start and limit arguments are part of the r esults paging system and any component that implements a search query must accept them in order for the paging system to work. count count projects projects summary summary start start limit limit ARGS args start 0 limit 20 args init my summary all projects my count Schema- Project_t- row_count my projects Schema- Project_t- all_rows order_by Schema- Project_t- creation_date_c desc Schema- Project_t- name_c asc limit limit start init method title PARENT title - All projects method This is where the actual work of displaying results is done. This component is currently used by just two other components but it is designed so that if we add more search options such as a keyword search it can handle those as well. This component takes the summary and count arguments and uses them to tell the user what kind of search he just did in case he forgot and how many results there were in total. If there are more results than can be shown on one page it calls the lib paging component to do the work of generating links to all the other pages of results. Finally if there were results it loops through the cursor and displays information about each project in turn. table width 100 .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.