task

FEATURE# 3670 - Pagination

[what]

  1. ] PAGINATION - return query results for records in pages (batches of (x)) results VS all results for a given query,  
    1. ] where x = a 'user configurable' parameter OR a pre-configured options(10,20,50) OR ?

[why]

  1. ] avoid long lists of results, ( too much scrolling, easier to print if ... )
    1. *] PRB if no limit is (potentially) "long lists",
    2. *] WAS  getting errors on long lists, *] ERROR = - too many connections

[where]

  1. ] for L4 pages
    1. ] ? = L4, L3, L2, L1
  2. ] * normally NOT a problem
    1. as most content is in smaller/ish containers
  3. ]

[when]

  1. ] ETA - 2014-03
    1. ]

[example]

  1. http://sospep.com/view/libraries
    1. ] this use case prj-DOC-pages - some have over 50 records

[how-to]

  1. [00:30] NEW task IN] # 3670 - FEATURE pagination ON view/calendars
    1. x] PG - add var (] startPage ] startRecord, ] listStart)
    2. x] PG - add method block PAGINATION (# desc=totalPages = totalRecords/recordsPerPage )
    3. x] PG - add display links code below list
    4. x] PG class= pagination for displayPaginationLinks codeblock
    5. x] PG - MODIFY calls(1) to GetAtlases() to include arguments(startRecord, count), in code block#
    6. x] CS - add recordCount method
    7. x] CS - ADD NEW method GetCommunites() with 2 args ( start, qty)
    8. x] CS - UPDATE query getCommunities, replace LIMIT with var placeholders for start and quantity
    9. ] TEST = PASS || FAIL
    10. ? ] add start param to <ol> tag start="@listStart" // some pages use UL, change to OL tags
    11. x] CS - modify Calls(3) to GetPersonsInMemberGroup(int parent_id) by manually adding vars  (0,50)
  2. FEATURE PAGINATION on find/Articles
    1. ] CS - add qry
    2. ] PG - post code block, swith case
    3. ]

[reference]

  1. ]

developer implementation

[-process-]

  1. [2015-mm-dd] # PAGE - view/libraries
    1. x] starting here versus l5, wont likely use it here now BUT less clutter and easier to work with (lighter) page
    2. *] to start we will only likely paginate L4 views
  2. [2015-mm-dd] # PAGE - AppStart
    1. x] ADDed var - numberRecords = 20;
    2. // this is used to set the amount of records to return,
    3. // we intend to make this is a user defineable setting (10,20,50)
  3. [2015-mm-dd] # PAGE - CS.Library - "query" for records has a LIMIT clause, CHANGE LIMIT to var
    1. *] limit clause restricts the results to the specified number, (CURRENLTY hardcoded @50 on SOME./ queries )
    2. // with no limit specified we have run into "ERROR too many connections"
  4. [00:00] CS Library method - getLibraries(int limit)
    1. 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 
  5. [00:00] # PAGE .CS Library method - getLibraries() 
    1. ] ADDed - 2nd parameter to LIMIT clause, (start record#, # records)
    2. ] first parameter is start returning records startin g @ row#,
    3. ] 2nd parameter is the amount of records to be returned
  6. [00:00] JS - client side js - pageNumber click 
    1. ] to generate a link to the pages
  7. [00:00] build NAVIGATIONAL links in server side code VERSUS IN client side script /view/articles - pageNumber click()
    1. *] VS EX view/jobs - where links are dynamically generated in client side js function, pageNumer click()
    2. ] PageNumber displayed starting with 1  VS ( x=0, x < )
  8. [00:00] link will use qstring value to pass (desired page#) back into query page
    1. ] EX view/libraries?startpage=3
    2. x] calculate startRecord = BY startpage * recordsPerPage
  9. [00:00] FORMAT display of links on PAGE
    1. ] make pretty ier links - cc table in objects/specifiications -
    2. x] use display inline to show links horizontally across screen VS vertically listing them
  10. [00:00] PAGE - view/articles - PORT FUNCTIONALITY from PAGE view/libraries to PAGE view/articles?id=#
    1. ] multipe entry points into 'articles' page VS single on
    2. x] articlesInChapter?id=#
    3. x] getting count - b/c it is subset of records in table, not the whole table, we essentially are running the query twice
  11. [00:00] PAGE - view/articles - LIST records, numbering
    1. *] PRB list displays each new page of records starting with the number 1
    2. x] add var for listStart, startRecord+1,
    3. x] ADD start attr to ol displaying records
    4. x] assign listart to start attrbute

[-notes-]

  1. *] have implemented pagination on PAGE view/jobs
    1. ] initial json object with first set of results, contains the total# of records
  2. *] have js function that dynamically builds links
    1. *] uses id of clicked link to calculate 'start' and 'end' pages, then generates URL, switches/sets page to that url
    2. ] PRB ?? IMPROVEMENT - i am ALREADY building 'the links' in the original svr side page gen/build, Y NOT JUST build the links completely there
  3. x] startPage
    1. x] added qstring parameter
    2. x] PAGE view/libraries CATCH startPage
    3. ] PASS startpage into query
  4. x] CS - Article
    1. x] getArticlesInChapter - added start and qty parameters
    2. *] getArticlesInChapter(src db) - 2nd method USED for import process ???
    3. x] ADDED method for totalRecords
  5. x] count
    1. ] on page libraries used 'sql qry' on
      1. ] on page articles, we dont want all the articles, just the articles in the qry
    2. ] result is being assigned to List 'System.Collections.Generic', list has a count property BUT b/c of way we are doing the qry with limit
    3. ] ADD/ALTER method totalRecords to take arg (parent_id) and pull the records in
  6. [2015-08-06] REVIEW
    1. x] subjects has
    2. x] events has on bottom level(tasks)
    3. x] items appears to have been started previously according to notes
    4. ]
  7. ]

status

[-previous-]

  1. [00:00] documenting-projects/feature-3670 - A look back 
    1. x] at ALL the tasks COMPLETED along the way to getting this feature here. Link to Detailed view of each task, billing details,
  2. [00:00] FEATURE-3670-001
    1. x] # 3682 PAGINATION - getting started on PAGE view/libraries
  3. [00:00] FEATURE-3670-002
    1. x] # 3683 PAGINATION - page# click function, USE generated links VS link click handler function
  4. [00:00] FEATURE-3670-003
    1. x] # 3695 PAGINATION - implemented on x] PAGE view/items, x] pushed .org, x] pushed .com  
  5. [00:00] FEATURE-3670-004
    1. i] # # - PAGINATION - map to PAGE view/items && ] PORT list, see SECTION how to above && ] map to PAGE view/...
    2. x] # 3689 - UPLOAD - ] Article, ] Library, ] _AppStart ] view/articles, ]
  6. [00:00] FEATURE-3670-005
    1. x] # 5459 - PAGINATION - implemented on x] PAGE view/tasks,  x] pushed .org, x] pushed .com,
    2. **] return page results in batches of (#=20) || ] PAGE view/{L5} - {articles, items, ...}
  7. [2015-08-11]> [00:00] FEATURE-3670-nnn
    1. x] PAGE view/libraries
  8. [01:00] FEATURE-3670-006
    1. x] # 5459 - PAGINATION - implemented on x] PAGE view/steps,  x] pushed .org, x] pushed .com,
  9. [00:00] REVIEW
    1. x] # # - PG view/items - x] has already been implemented NEED = ] view/people, ] view/places
  10. [2015-08-12][01:00] FEATURE-3670-007
    1. x] # 5462 - PAGINATION - implementd on x] PAGE view/people
  11. [01:00] FEATURE-3670-008
    1. x] # 5464 - PAGINATION - implementd on x] PAGE view/locations
  12. [2015-08-13][01:00] FEATURE-3670-009
    1. x] # 5467 - PAGINATION - implementd on x] PAGE view/{L1} - all - except PG view/libraries, which had already been completed
  13. [2015-08-14] FEATURE-3670-010
    1. x] # 5490 - PAGINATION - Search Results - search result pages, results are now paginated for Search articles 
    2. 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
    3. 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.

[-current-]

  1. []
    1. ]

[-next-]

  1. ] PAGE - view/articles - PORT FUNCTIONALITY
    1. ] multipe(2*) entry points into PAGE view/articles - page
  2. ] planning-projects/feature-3670 - A look ahead
    1. ] at ALL the tasks PLANNED along the way to getting this feature here completed. Link to Detailed view of each task, with billing projections,
  3. ] FIX-PRB/UPDATE on page view/{L5} ex tasks, AFTER edit
    1. ]  IF your editing an item on PG 3 and you update record, it will return to PG 1
  4. [00:00] CREATE
    1. i] function - sospepHelper.generatePageNumbers - working for Articles, can I make it cross
  5. ] TEST - when using find ON PG
    1. ] results NOT paged
    2. ] limit = ?
  6. >[00:00] PAGE m_articles
    1. ] add PARAM values to call OR ...
    2. ] added Method
  7. [00:00] methods GetCalendars, Libraries , ...
    1. ] manually specifying values for LIMIT (start, qty) in the query, RETHINK THIS cc FIX-PRB-5489
  8. [] PAGINATION
    1. ] PAGES - L2
  9. [] PAGINATION
    1. ] PAGES - L3 

 

 

 

 

Details Photos Edit more

Details

ID: 3670

NAME: FEATURE-3670

DESCRIPTION: PAGINATION - on view/{L4}, on view/{L1},

START DATE TIME: 2014-03-15 08:30:00

EST DURATION: 00:15:00

END DATE TIME: 2014-03-15 08:45:00

STATUS: In-Process

PRIORITY: -5

OWNER ID: 75

Content Photos Edit more

photos

photos for this task

actions

Agenda Email task SMS task Priorities