<div>
                    <div>Morning everybody.</div><div><br></div><div>Daniel has already implemented a lot of cool stuff on AeroGear controller for pagination. For this reason I created this Jira to see if the implementation matches our expectations on the client side (<a href="https://issues.jboss.org/browse/AEROGEAR-814" style="color: rgb(0, 106, 227); ">https://issues.jboss.org/browse/AEROGEAR-814</a>).</div><div><br></div><div>For example, currently the headers are returning something like it:</div><div><br></div><div><div style="border: none; padding: 0px; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 14px; line-height: 22px; "><pre style="font-size: 13px; line-height: 19px; font-family: Consolas, 'Liberation Mono', Courier, monospace; word-wrap: break-word; margin-top: 15px; margin-bottom: 15px; background-color: rgb(248, 248, 248); border: 1px solid rgb(204, 204, 204); overflow: auto; padding: 6px 10px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; ">HTTP<span style="font-weight: bold; ">/</span><span style="color: rgb(0, 153, 153); ">1.1</span> <span style="color: rgb(0, 153, 153); ">200</span> OK
Content<span style="font-weight: bold; ">-</span>Type<span style="font-weight: bold; ">:</span> application<span style="font-weight: bold; ">/</span>json;charset<span style="font-weight: bold; ">=</span>UTF<span style="font-weight: bold; ">-</span><span style="color: rgb(0, 153, 153); ">8</span>
Content<span style="font-weight: bold; ">-</span>Length<span style="font-weight: bold; ">:</span> <span style="color: rgb(0, 153, 153); ">160</span>
AG<span style="font-weight: bold; ">-</span>Paging<span style="font-weight: bold; ">-</span>Offset<span style="font-weight: bold; ">:</span> <span style="color: rgb(0, 153, 153); ">0</span>
AG<span style="font-weight: bold; ">-</span>Paging<span style="font-weight: bold; ">-</span>Limit<span style="font-weight: bold; ">:</span> <span style="color: rgb(0, 153, 153); ">4</span>
AG<span style="font-weight: bold; ">-</span>Paging<span style="font-weight: bold; ">-</span>Total<span style="font-weight: bold; ">:</span> <span style="color: rgb(0, 153, 153); ">4</span>
AG<span style="font-weight: bold; ">-</span>Links<span style="font-weight: bold; ">-</span>Next<span style="font-weight: bold; ">:</span> cars<span style="font-weight: bold; ">?</span>offset<span style="font-weight: bold; ">=</span><span style="color: rgb(0, 153, 153); ">1</span><span style="font-weight: bold; ">&amp;</span>limit<span style="font-weight: bold; ">=</span><span style="color: rgb(0, 153, 153); ">4</span>
AG<span style="font-weight: bold; ">-</span>Links<span style="font-weight: bold; ">-</span>Last<span style="font-weight: bold; ">:</span> cars<span style="font-weight: bold; ">?</span>offset<span style="font-weight: bold; ">=</span><span style="color: rgb(0, 153, 153); ">3</span><span style="font-weight: bold; ">&amp;</span>limit<span style="font-weight: bold; ">=</span><span style="color: rgb(0, 153, 153); ">4</span>
[
  {<span style="color: rgb(221, 17, 68); ">"color"</span><span style="font-weight: bold; ">:</span><span style="color: rgb(221, 17, 68); ">"Green"</span>,<span style="color: rgb(221, 17, 68); ">"brand"</span><span style="font-weight: bold; ">:</span><span style="color: rgb(221, 17, 68); ">"Audi"</span>,<span style="color: rgb(221, 17, 68); ">"id"</span><span style="font-weight: bold; ">:</span><span style="color: rgb(0, 153, 153); ">1</span>},
  {<span style="color: rgb(221, 17, 68); ">"color"</span><span style="font-weight: bold; ">:</span><span style="color: rgb(221, 17, 68); ">"White"</span>,<span style="color: rgb(221, 17, 68); ">"brand"</span><span style="font-weight: bold; ">:</span><span style="color: rgb(221, 17, 68); ">"Audi"</span>,<span style="color: rgb(221, 17, 68); ">"id"</span><span style="font-weight: bold; ">:</span><span style="color: rgb(0, 153, 153); ">2</span>},
  {<span style="color: rgb(221, 17, 68); ">"color"</span><span style="font-weight: bold; ">:</span><span style="color: rgb(221, 17, 68); ">"Black"</span>,<span style="color: rgb(221, 17, 68); ">"brand"</span><span style="font-weight: bold; ">:</span><span style="color: rgb(221, 17, 68); ">"Audi"</span>,<span style="color: rgb(221, 17, 68); ">"id"</span><span style="font-weight: bold; ">:</span><span style="color: rgb(0, 153, 153); ">3</span>},
  {<span style="color: rgb(221, 17, 68); ">"color"</span><span style="font-weight: bold; ">:</span><span style="color: rgb(221, 17, 68); ">"Black"</span>,<span style="color: rgb(221, 17, 68); ">"brand"</span><span style="font-weight: bold; ">:</span><span style="color: rgb(221, 17, 68); ">"BMW"</span>,<span style="color: rgb(221, 17, 68); ">"id"</span><span style="font-weight: bold; ">:</span><span style="color: rgb(0, 153, 153); ">4</span>}
]
</pre></div><h4 style="margin: 20px 0px 10px; padding: 0px; font-size: 16px; font-family: Helvetica, arial, freesans, clean, sans-serif; "><a name="getting-the-next-page-of-cars" href="https://gist.github.com/4500336#getting-the-next-page-of-cars" style="color: rgb(65, 131, 196); text-decoration: initial; display: block; padding-left: 30px; "></a></h4></div><div><br></div><div>Question, do we really need&nbsp;<span style="background-color: rgb(248, 248, 248); font-family: Consolas, 'Liberation Mono', Courier, monospace; line-height: 19px; ">AG</span><span style="font-family: Consolas, 'Liberation Mono', Courier, monospace; line-height: 19px; font-weight: bold; ">-</span><span style="background-color: rgb(248, 248, 248); font-family: Consolas, 'Liberation Mono', Courier, monospace; line-height: 19px; ">Links</span><span style="font-family: Consolas, 'Liberation Mono', Courier, monospace; line-height: 19px; font-weight: bold; ">-</span><span style="background-color: rgb(248, 248, 248); font-family: Consolas, 'Liberation Mono', Courier, monospace; line-height: 19px; ">Next and&nbsp;</span><span style="background-color: rgb(248, 248, 248); font-family: Consolas, 'Liberation Mono', Courier, monospace; line-height: 19px; ">AG</span><span style="font-family: Consolas, 'Liberation Mono', Courier, monospace; line-height: 19px; font-weight: bold; ">-</span><span style="background-color: rgb(248, 248, 248); font-family: Consolas, 'Liberation Mono', Courier, monospace; line-height: 19px; ">Links</span><span style="font-family: Consolas, 'Liberation Mono', Courier, monospace; line-height: 19px; font-weight: bold; ">-</span><span style="background-color: rgb(248, 248, 248); font-family: Consolas, 'Liberation Mono', Courier, monospace; line-height: 19px; ">Last.&nbsp;</span>If I know about the total and I have the fields limit and offset, looks like 'Next' and 'Last' are useless. Am I wrong? I was wondering about something like this&nbsp;<a href="http://www.redmine.org/projects/redmine/wiki/Rest_api#Collection-resources-and-pagination" style="color: rgb(0, 106, 227); ">http://www.redmine.org/projects/redmine/wiki/Rest_api#Collection-resources-and-pagination</a></div>
                </div>
                <div><div><br></div><div><br></div><div><div>--&nbsp;</div><div>"The measure of a man is what he does with power" - Plato</div><div>-</div><div>@abstractj</div><div>-</div><div>Volenti Nihil Difficile</div></div></div>