afair crypted strategy only encodes non-bookmarkable urls. it does not
encode bookmarkable urls because those are meant as entrypoints into
your application.

-igor

On Mon, May 10, 2010 at 11:38 AM, Fernando Wermus
<fernando.wer...@gmail.com> wrote:
> Hi all,
>    I create a PagingNavigator stateless. Instead of using a model to have
> the number page shown, my StatelessPagingNavigator shows the number through
> parameters. I hope that the page number wouldnt have been showed using
> CryptedUrlWebRequestCodingStrategy, but It does. This is rather weird; I
> hope any could point me out some solution. Is my class written wrongly in
> some way?
>
>
> public class StatelessPagingNavigator extends PagingNavigator {
> private static final long serialVersionUID = 3576836044400027436L;
>
> public StatelessPagingNavigator(String id, DataView dataView) {
> super(id, dataView);
> }
>
> �...@override
> protected Link newPagingNavigationIncrementLink(final String id, IPageable
> pageable, int increment) {
> * **PageParameters p=new PageParameters();*
> *
> *
> * **p.add("increment", String.valueOf(increment));*
> * **p.add("pageNumber", String.valueOf(pageable.getCurrentPage()));*
> Link link= new BookmarkablePageIncrementLink(id, pageable,
> getPage().getClass(), p){
> private static final long serialVersionUID = 1L;
>
> public boolean isEnabled()
> {
> return super.isEnabled() && StatelessPagingNavigator.this.isEnabled() &&
> StatelessPagingNavigator.this.isEnableAllowed();
> }
> };
>  return link;
> }
>
> @Override
> protected Link newPagingNavigationLink(final String id, final IPageable
> pageable, int pageNumber) {
> * **PageParameters p=new PageParameters();*
> * **p.add("pageNumber", String.valueOf(pageNumber));*
>  return new BookmarkablePagingNavigationLink(id, pageable,
> getPage().getClass(),  p){
> private static final long serialVersionUID = -3076648671049640420L;
>
> public boolean isEnabled()
> {
> //return false;
> return super.isEnabled() && StatelessPagingNavigator.this.isEnabled() &&
> StatelessPagingNavigator.this.isEnableAllowed();
> }
>  };
> }
>
> @Override
> protected PagingNavigation newNavigation(final IPageable pageable, final
> IPagingLabelProvider labelProvider) {
> return new PagingNavigation("navigation", pageable, labelProvider) {
> private static final long serialVersionUID = 1102823179571300337L;
>
> @Override
> protected Link newPagingNavigationLink(final String id, final IPageable
> pageable, int pageIndex) {
> * **PageParameters p=new PageParameters();*
> * **p.add("pageIndex", String.valueOf(pageIndex));*
>  return new BookmarkablePagingNavigation(id, pageable, getPage().getClass(),
>  p){
> private static final long serialVersionUID = -3076648671049640420L;
>
> public boolean isEnabled()
> {
> return super.isEnabled() && StatelessPagingNavigator.this.isEnabled() &&
> StatelessPagingNavigator.this.isEnableAllowed();
> }
>  };
> }
> };
> }
> }
>
> thanks in advance
>
> --
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to