HI
I want to embed a view on a form in a web application) but only show a fixed number of records, and then control paging with links to the next / previous page. Is this possible?
I have achieved it with an iframe (so I can control the ‘src’ of the iframe and use the ‘&start=’ and ‘&count=’ query string parameters to contorl the number of records and paging), but I wonder if there is a way of doing it with a directly embedded view?
TIA
Subject: Embedded View Web Form
Sure – set the number of docs you want to display on the embedded view properties and add buttons to do @DbCommand(“Domino”;“ViewPreviousPage”) and @DbCommand(“Domino”; “ViewNextPage”). Just be aware that the buttons require a post-back to the server in order to be processed (the whole page is refreshed, not just the view). A more accessible version would need hidden fields to record the start and count numbers and (perhaps) an end-of-view indicator (total doc count at request time) – you can use computed text to create links. Done properly, you can “paint out” the simple, accessible functionality with an Ajax solution along the lines described in the other answer.
ALWAYS keep in mind that Ajax is a best-case solution, and that there will likely be a significant number of users who will not be able to use the application properly if that’s all you use. That is something a lot of web developers seem to miss. Start with something that is simple and accessible, then add the cosmetics and whiz-bang functionality to it as optional “layers” that will add richness if the browser and the user support it. Ajax: good; Ajax only: very, very bad (and a potential source of litigation).
Subject: Embedded View Web Form
I prefer to display view in a DIV with desire size and parse domino view HTML with my JS. Along with that you have easy option to use pagination or viewnext command.
Rishi