I would like to implement pagination in Wicket - wicket

Can someone provide the way to implement paging like << 1 2 3 ... 11 12 13 >> where 13 will be the last page.
I also tried with PagingNavigation and PagingNavigator but both provides different kind of paging.

You need to build a custom component to do this. Looking at the source code of PagingNavigation and PagingNavigator should give you a few hints.
Your requirement is not entirly clear as well. For example, what should your paging look like when, say, page 5 is the active page? Of page 50 out of 100?
You will need to decide what to build. You will probably need two Repeaters (for example Loops) to build the begin and end series, and maybe a Loop to display the pages around the currently-selected page.

Related

How do I generate multiple pages Box [1,2,3...] of [X]

I have a box label form and it all works great but we would like to be able to automatically generate sequential box labels. So on the form we would have a [Total Boxes] form field. If the user put in "5" then on the labels we would generate a different label for each box e.g. 1 of 5, 2 of 5, 3 of 5, 4 of 5, 5 of 5. I would be happy with this happening at the time they are printed, or generating a new PDF with all the pages. Either way this needs to be a very simple process for the end user of the forms. Any ideas?
I never found a perfect solution to this in Acrobat. I decided to simply recreate the form in Excel and lock the sheet except for the fields needed and then it was easy to create multiple pages.

Update TOC after merging 2 pdfs using itext

Let me explain the scenario.
1) i have an existing pdf with TOC named A.pdf with 10 pages
2) i have two more pdf named B.pdf, C.pdf with TOC with 5 pages
3) Now i need to add B.pdf to A.pdf after 3rd page
4) and C.pdf to A.pdf after 7th page.
5) And need to update the TOC based on the Final sequence
Could any one have idea how to implement by using itext.
Please read the documentation, more specifically chapter 7 of my book. You'll find an example named ConcatenateBookmarks that does exactly what you're asking. That is: if by TOC, you are referring to bookmarks stored in an outline tree. In the example, we read all bookmarks using the SimpleBookmark class, we compose a new outline tree, shifting the bookmarks depending on the number of pages in each of the existing documents, and then we add the composed outline tree to the resulting PDF using the setOutlines() method.
If by TOC you mean, a sequence of pages showing a table of contents without any semantics or interactive features, you're asking something that is impossible due to the nature of PDF (which you'll discover once you start reading ISO-32000).

How does one get the total number of slides?

In Articulate's Storyline product, how does one retrieve the total number of slides (or pages) in a storyfile or project?
There's not much documentation so it's kind of hard to figure out how to query common environment values like this. If we can get the total number of slides then we don't have to manually set a value for it.
One must manually set and update a variable to store the number of slides.
The most lengthy conversation on the matter seems to be found here at the Articulate forums.
In that thread the users and staff describe the need to manually define such a variable.
I asked the question on the official forum more directly here, and so far have not received a response.
Another poster at that forum mentioned using PHP to solve this problem, but unfortunately we can't add the requirement of PHP to the final product. I'm sure some server side language tricks might be used to solve this issue, but that also adds the dependency of a particular server-side language.
The Answer Mark gave is correct. So if you want to track the number of question slides in a quiz you would either hard code the value in a variable such as totalQuestions, or increment it as you go through each slide using adjust variable trigger. To call that value and display it on screen you would just add it to a text field and surround it with "%".
EG. "You have answered %Results.ScorePoints% out of %totalQuestions% questions correctly."
I find it rather pointless to hard code it since it's just as easy to put the value in the text field at the end. Using the increment method seems more logical because then you can add more question slides without having to adjust the variable or results screen each time.
I usually load frame.xml, browse for all slidelink tags and sort all slides by their Id.
Usually you get something like slideid=_player.5xoxGTW6QCh.6bmeRt3tCqP, where 5xoxGTW6QCh is the scene id and 6bmeRt3tCqP is the slide id. displaytext also gives you the slide title.
If you browse for slidetranscript and match the Id for each transcript you also get the slide notes.
Articulate 360 now has an internal (Built-in) variable for this and other counts. See Project.TotalSlides and Menu.TotalSlides
See https://community.articulate.com/series/articulate-storyline-360/articles/storyline-360-add-slide-numbers

How to form " less than or equal to " statement in ATG using dsp tag library?

Im currently developing an e-commerce site for a cellular network in ATG. I'm trying to apply "filters" to restrict phones according to their display sizes with three categories namely
4 -inches and less
4 - 5 inches
5 - inches and more.
Currently I am able to pass only one value like 4 inches and get all phones in the 4 inch category.
--------code---------
<LI id=menu-item-458
class="menu-item menu-item-type-custom menu-item-object-custom menu-item-458">
<dsp:droplet name="/store/commerce/droplets/FilterDroplet" >
<dsp:param name="filterBy" value="displayScreenDetails"/>
<dsp:param name="filterConstant" value="4"/>
<dsp:oparam name="output">
<p id="4" class="selected">
* 4-inches(<dsp:valueof param="count"/>)</p>`
</dsp:oparam>
</dsp:droplet>
</LI>
Its an <LI> for showing the menu with passing values to a script function called filerItems()
I wanna show all phones under their respective categories and not definitive numbers. Help me form the code with dsp tag libraries or a java method to handle the passed value.
I hope my question is clear.
Thank you.!
You will need to add another request parameter to your FilterDroplet that will take an operator (like 'equals' or 'lessThan') and then, inside the service method call a new method that takes 3 parameters. Assuming that you currently have a small method that will take 2 parameters (for 'filterBy' and 'filterConstant').
Your output also seems a bit restricted, since it assumes you will only get 1 result. There is no loop running over the output param.
There are easy ways and long ways to do this. But I would recommend the long way which will help in a long run. Since you are working with filters, its important to categorize them with the SKU property. Hoping that screen size comes from BCC (meaning DB), try to create a field for your SKU object to compute the category during the initialization.
SKU will already have your screen size property and it shouldn't be hard enough to create a field for filter in your non-repository SKU object. While page is loading, pass all the SKUs displayed on page and get the filter details, so that it will be helpful later if another filter item is added.
I feel it needs a more generic approach by creating a custom Filter map, which can be used for populating any property.

zend pagination page range vs item count per page

This may be a very basic question. But it is not very clear to me, the difference between
setItemCountPerPage and setPageRange. The zend manual defines both as below. I don't see a difference on reading it. Could someone tell how they are different, may be in the context of actual usage. Thanks
setItemCountPerPage : Sets the maximum number of items to display on a page (default 10).
setPageRange : Sets the number of items to display in the pagination control (default 10). Note: Most of the time this number will be adhered to exactly, but scrolling styles do have the option of only using it as a guideline or starting value (e.g., Elastic).
setItemCountPerPage refers to the ACTUAL DATA you are paginating.
setPageRange refers to the PAGINATION CONTROLS (the little HTML snippet with links to the other pages). Check out the different pagination styles in your pagination controls and it will become very obvious what this is.
You can really use one without the other though they work together so well that I usually see no point in separating them.