edit-task
Home
Up
Delete
Task Name:
Task Description:
PAGINATION - on view/{L4}, on view/{L1},
TaskGroup ID:
Start Date:
Start Time:
Duration:
Priority:
Status:
To Do
Completed
In Process
Add Photo:
Owner ID:
Content:
use HTML
Edit Content
<h1 style="text-align: center;">FEATURE# 3670 - Pagination</h1> <h2>[what]</h2> <ol style="font-size: 10px; font-weight: normal;"> <li><strong>] PAGINATION</strong> - return query results for records in pages (batches of (x)) results VS all results for a given query<strong>, </strong></li> <ol> <li>] where x = a 'user configurable' parameter OR a pre-configured options(10,20,50) OR ?</li> </ol></ol> <h2>[why]</h2> <ol style="font-size: 10px; font-weight: normal;"> <li><strong>] avoid long lists of results, ( too much scrolling, easier to print if ... )</strong></li> <ol> <li>*] PRB if no limit is (potentially) "long lists",</li> <li>*] WAS getting errors on long lists, *] ERROR = - too many connections</li> </ol></ol> <h2>[where]</h2> <ol style="font-size: 10px; font-weight: normal;"> <li><strong>] for L4 pages</strong></li> <ol> <li>] ? = L4, L3, L2, L1</li> </ol> <li><strong>] * normally NOT a problem</strong></li> <ol> <li>as most content is in smaller/ish containers</li> </ol> <li>]</li> </ol> <h2>[when]</h2> <ol style="font-size: 10px; font-weight: normal;"> <li>] ETA - 2014-03</li> <ol> <li>]</li> </ol></ol> <h2>[example]</h2> <ol style="font-size: 10px; font-weight: normal;"> <li>] <a href="/view/libraries" target="_blank">http://sospep.com/view/libraries</a></li> <ol> <li>] this use case prj-DOC-pages - some have over 50 records</li> </ol></ol> <h2>[how-to]</h2> <ol style="font-size: 10px; font-weight: normal;"> <li><strong>[00:30] NEW task IN</strong><strong>] # 3670 - FEATURE pagination ON view/calendars</strong></li> <ol> <li>x] PG - add var (] startPage ] startRecord, ] listStart)</li> <li>x] PG - add method block PAGINATION (# desc=totalPages = totalRecords/recordsPerPage )</li> <li>x] PG - add display links code below list</li> <li>x] PG class= pagination for displayPaginationLinks codeblock</li> <li>x] PG - MODIFY calls(1) to <span style="color: #222222;">GetAtlases()</span> to include arguments(startRecord, count), in code block#</li> <li>x] CS - add recordCount method</li> <li>x] CS - ADD NEW method <span style="color: #222222;">GetCommunites() </span>with 2 args ( start, qty)</li> <li>x] CS - UPDATE query getCommunities, replace LIMIT with var placeholders for start and quantity</li> <li>] TEST = PASS || FAIL</li> <li>? ] add start param to <ol> tag <span style="color: #cf4820;">start</span><span style="color: #4f76ac;">=</span><span style="color: #4f76ac;">"</span><span style="background: #d7bf49; color: #222222;">@</span><span style="color: #222222;">listStart</span><span style="color: #4f76ac;">" // some pages use UL, change to OL tags</span></li> <li><span style="color: #4f76ac;"><span style="background-color: #ffff00;"><span style="color: #000000;">x] CS - modify Calls(3) to </span><span style="color: #222222;">GetPersonsInMemberGroup(int parent_id)</span><span style="color: #000000;"> by manually adding vars (0,50)</span></span></span></li> </ol> <li><span style="background-color: #ffffff;"><strong><span style="color: #4f76ac;"><span style="color: #000000;">FEATURE PAGINATION on find/Articles</span></span></strong></span></li> <ol> <li><span style="background-color: #ffffff;"><span style="color: #4f76ac;"><span style="color: #000000;">] CS - add qry</span></span></span></li> <li><span style="background-color: #ffffff;"><span style="color: #4f76ac;"><span style="color: #000000;">] PG - post code block, swith case </span></span></span></li> <li><span style="background-color: #ffffff;"><span style="color: #4f76ac;"><span style="color: #000000;">] </span></span></span></li> </ol></ol> <h2>[reference]</h2> <ol style="font-size: 10px; font-weight: normal;"> <li>]</li> </ol><hr style="font-size: 10px; font-weight: normal;" /> <h1 style="text-align: center;">developer implementation</h1> <h2>[-process-]</h2> <ol style="font-size: 10px; font-weight: normal;"> <li><strong><span style="background-color: #888888;">[2015-mm-dd</span>] # PAGE - view/libraries</strong></li> <ol> <li>x] starting here versus l5, wont likely use it here now BUT less clutter and easier to work with (lighter) page</li> <li>*] to start we will only likely paginate L4 views</li> </ol> <li><strong><span style="background-color: #888888;">[2015-mm-dd]</span> # PAGE - AppStart</strong></li> <ol> <li>x] ADDed var - numberRecords = 20;</li> <li>// this is used to set the amount of records to return,</li> <li>// we intend to make this is a user defineable setting (10,20,50)</li> </ol> <li><strong><span style="background-color: #888888;">[2015-mm-dd]</span> # PAGE - CS.Library - "query" for records has a LIMIT clause, CHANGE LIMIT to var</strong></li> <ol> <li>*] limit clause restricts the results to the specified number, (CURRENLTY hardcoded @50 on SOME./ queries )</li> <li>// with no limit specified we have run into "ERROR too many connections"</li> </ol> <li><strong>[00:00] CS Library method - getLibraries(int limit)</strong></li> <ol> <li>x] ADDed - arguement to method to return number of results, WHERE arg is the number of results to return, LIMIT is now specified as a parameter VS hardcoded into the qry variable </li> </ol> <li><strong>[00:00] # PAGE .CS Library method - getLibraries() </strong></li> <ol> <li><strong>] ADDed - 2nd parameter to LIMIT clause, (start record#, # records)</strong></li> <li>] first parameter is start returning records startin g @ row#,</li> <li>] 2nd parameter is the amount of records to be returned</li> </ol> <li><span style="text-decoration: line-through;"><strong>[00:00] JS - client side js - pageNumber click </strong></span></li> <ol> <li><span style="text-decoration: line-through;">] to generate a link to the pages</span></li> </ol> <li><strong>[00:00] build NAVIGATIONAL links in server side code VERSUS IN client side script /view/articles - pageNumber click()</strong></li> <ol> <li>*] VS EX view/jobs - where links are dynamically generated in client side js function, pageNumer click()</li> <li>] PageNumber displayed starting with 1 VS ( x=0, x < )</li> </ol> <li><strong>[00:00] link will use qstring value to pass (desired page#) back into query page</strong></li> <ol> <li>] EX view/libraries?startpage=3</li> <li>x] calculate startRecord = BY startpage * recordsPerPage</li> </ol> <li><strong>[00:00] FORMAT display of links on PAGE</strong></li> <ol> <li>] make pretty ier links - cc table in objects/specifiications -</li> <li>x] use display inline to show links horizontally across screen VS vertically listing them</li> </ol> <li><strong>[00:00] PAGE - view/articles - PORT FUNCTIONALITY from PAGE view/libraries to PAGE view/articles?id=#</strong></li> <ol> <li>] multipe entry points into 'articles' page VS single on</li> <li>x] articlesInChapter?id=#</li> <li>x] getting count - b/c it is subset of records in table, not the whole table, we essentially are running the query twice</li> </ol> <li><strong>[00:00] PAGE - view/articles - LIST records, numbering </strong></li> <ol> <li>*] PRB list displays each new page of records starting with the number 1</li> <li>x] add var for listStart, startRecord+1,</li> <li>x] ADD start attr to ol displaying records</li> <li>x] assign listart to start attrbute</li> </ol></ol> <h2>[-notes-]</h2> <ol style="font-size: 10px; font-weight: normal;"> <li><strong>*] have implemented pagination on PAGE view/jobs</strong></li> <ol> <li>] initial json object with first set of results, contains the total# of records</li> </ol> <li><strong>*] have js function that dynamically builds links</strong></li> <ol> <li>*] uses id of clicked link to calculate 'start' and 'end' pages, then generates URL, switches/sets page to that url</li> <li>] PRB ?? IMPROVEMENT - i am ALREADY building 'the links' in the original svr side page gen/build, Y NOT JUST build the links completely there</li> </ol> <li><strong>x] startPage</strong></li> <ol> <li>x] added qstring parameter</li> <li>x] PAGE view/libraries CATCH startPage</li> <li>] PASS startpage into query</li> </ol> <li><strong>x] CS - Article</strong></li> <ol> <li>x] getArticlesInChapter - added start and qty parameters</li> <li><span style="background-color: #ffff99;">*] getArticlesInChapter(src db) - 2nd method USED for import process ??? </span></li> <li><span style="background-color: #ffffff;">x] ADDED method for totalRecords</span></li> </ol> <li><strong><span style="background-color: #ffffff;">x] count </span></strong></li> <ol> <li><span style="background-color: #ffffff;">] on page libraries used 'sql qry' on </span></li> <ol> <li><span style="background-color: #ffffff;">] on page articles, we dont want all the articles, just the articles in the qry</span></li> </ol> <li><span style="background-color: #ffffff;">] result is being assigned to List <span style="font-family: Arial;">'System.Collections.Generic', list has a count property BUT b/c of way we are doing the qry with limit</span></span></li> <li><span style="background-color: #ffffff;"><span style="font-family: Arial;">] ADD/ALTER method totalRecords to take arg (parent_id) and pull the records in </span></span></li> </ol> <li><strong>[2015-08-06] REVIEW</strong></li> <ol> <li><span style="background-color: #ffffff;"><span style="font-family: Arial;">x] subjects has</span></span></li> <li><span style="background-color: #ffffff;"><span style="font-family: Arial;">x] events has on bottom level(tasks)</span></span></li> <li><span style="background-color: #ffffff;"><span style="font-family: Arial;">x] items appears to have been started previously according to notes</span></span></li> <li><span style="background-color: #ffffff;"><span style="font-family: Arial;">] </span></span></li> </ol> <li><span style="background-color: #ffffff;"><span style="font-family: Arial;">] </span></span></li> </ol><hr style="font-size: 10px; font-weight: normal;" /> <h1 style="text-align: center;">status</h1> <h2>[-previous-]</h2> <ol> <li><strong>[00:00] <a href="/view/tasks?id=333" target="_blank">documenting-projects/feature-3670</a> - A look back </strong></li> <ol> <li>x] at ALL the tasks COMPLETED along the way to getting this feature here. Link to Detailed view of each task, billing details,</li> </ol> <li><strong>[00:00] <a href="/view/task?id=3682" target="_blank">FEATURE-3670-001</a></strong></li> <ol> <li>x] # 3682 PAGINATION - getting started on PAGE view/libraries</li> </ol> <li><strong>[00:00] </strong><a href="/view/task?id=3683" target="_blank"><strong>FEATURE-3670-002</strong></a></li> <ol> <li>x] # 3683 PAGINATION - page# click function, USE generated links VS link click handler function</li> </ol> <li><strong>[00:00] </strong><a href="/view/task?id=3695" target="_blank"><strong>FEATURE-3670-003</strong></a></li> <ol> <li>x] # 3695 PAGINATION - implemented on x] PAGE view/items, x] pushed .org, x] pushed .com </li> </ol> <li><strong>[00:00] </strong><a href="/view/task?id=3689" target="_blank"><strong>FEATURE-3670-004</strong></a></li> <ol> <li>i] # # - PAGINATION - map to PAGE view/items && ] PORT list, see SECTION how to above && ] map to PAGE view/...</li> <li>x] # 3689 - UPLOAD - ] Article, ] Library, ] _AppStart ] view/articles, ]</li> </ol> <li><strong>[00:00] <a href="/view/task?id=3696" target="_blank">FEATURE-3670-005</a></strong></li> <ol> <li>x] # 5459 - PAGINATION - implemented on x] PAGE view/tasks, x] pushed .org, x] pushed .com,</li> <li>**] return page results in batches of (#=20) || ] PAGE view/{L5} - {articles, items, ...}</li> </ol> <li><span style="color: #000000; background-color: #888888;"><strong>[2015-08-11]</strong></span><strong>> [00:00] FEATURE-3670-nnn</strong></li> <ol> <li>x] PAGE view/libraries</li> </ol> <li><strong>[01:00] <a href="/view/task?id=5459" target="_blank">FEATURE-3670-006</a></strong></li> <ol> <li>x] # 5459 - PAGINATION - implemented on x] PAGE view/steps, x] pushed .org, x] pushed .com,</li> </ol> <li><strong>[00:00] REVIEW</strong></li> <ol> <li>x] # # - PG view/items - x] has already been implemented NEED = ] view/people, ] view/places</li> </ol> <li><strong><span style="color: #000000; background-color: #888888;">[2015-08-12]</span>[01:00] <a href="/view/task?id=5462" target="_blank">FEATURE-3670-007</a></strong></li> <ol> <li>x] # 5462 - PAGINATION - implementd on x] PAGE view/people</li> </ol> <li><strong>[01:00] <a href="/view/task?id=5464" target="_blank">FEATURE-3670-008</a></strong></li> <ol> <li>x] # 5464 - PAGINATION - implementd on x] PAGE view/locations</li> </ol> <li><strong><span style="background-color: #888888;">[2015-08-13]</span>[01:00] </strong><a href="/view/task?id=5467" target="_blank"><strong>FEATURE-3670-009</strong></a></li> <ol> <li>x] # 5467 - PAGINATION - implementd on x] PAGE view/{L1} - all - except PG view/libraries, which had already been completed</li> </ol> <li><strong>[2015-08-14] <a href="/view/task?id=5490" target="_blank">FEATURE-3670-010</a> </strong></li> <ol> <li>x] # 5490 - PAGINATION - Search Results - search result pages, results are now paginated for Search articles </li> <li>x] findBy name, x] findBy Description, x] findBy Content, x] findBy Library, x] findBy Book, x] findBy Chapter, x] findBy Status, x] findBy CreatedDate, x] findBy Owner</li> <li>x] ... will all return your results in nicely paginated lists. The default results per page is set to 20 results, our premium version enables the option to specify the results per page setting.</li> </ol></ol> <h2>[-current-]</h2> <ol style="font-size: 10px; font-weight: normal;"> <li><strong>[] </strong></li> <ol> <li>]</li> </ol></ol> <h2>[-next-]</h2> <ol style="font-size: 10px; font-weight: normal;"> <li><strong>] PAGE - view/articles - PORT FUNCTIONALITY</strong></li> <ol> <li>] multipe(2*) entry points into PAGE view/articles - page</li> </ol> <li><strong>] </strong><a href="/view/tasks?id=330" target="_blank"><strong>planning-projects/feature-3670</strong></a><strong> - A look ahead</strong></li> <ol> <li>] at ALL the tasks PLANNED along the way to getting this feature here completed. Link to Detailed view of each task, with billing projections,</li> </ol> <li><strong><span style="background-color: #ffffff;"><span style="font-family: Arial;">] FIX-PRB/UPDATE on page view/{L5} ex tasks, AFTER edit</span></span></strong><ol> <li><span style="background-color: #ffffff;"><span style="font-family: Arial;">] IF your editing an item on PG 3 and you update record, it will return to PG 1 </span></span></li> </ol></li> <li><strong><span style="background-color: #ffffff;"><span style="font-family: Arial;">[00:00] CREATE </span></span></strong></li> <ol> <li><span style="background-color: #ffffff;"><span style="font-family: Arial;">i] function - sospepHelper.generatePageNumbers - working for Articles, can I make it cross </span></span></li> </ol> <li><strong>] TEST - when using find ON PG</strong></li> <ol> <li>] results NOT paged</li> <li>] limit = ?</li> </ol> <li><strong>>[00:00] PAGE m_articles</strong></li> <ol> <li>] add PARAM values to call OR ...</li> <li>] added Method</li> </ol> <li><strong>[00:00] methods GetCalendars, Libraries , ...</strong></li> <ol> <li>] manually specifying values for LIMIT (start, qty) in the query, RETHINK THIS cc FIX-PRB-5489</li> </ol> <li><strong>[] PAGINATION</strong></li> <ol> <li>] PAGES - L2</li> </ol> <li><strong>[] PAGINATION</strong></li> <ol> <li>] PAGES - L3 </li> </ol></ol> <p> </p> <p> </p> <p> </p> <p> </p>