You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by ro...@dubture.com on 2015/08/04 12:15:53 UTC

Changing the tag of a PagingNavigationLink

Hi all,

when implementing a DataTable, the link to the currently selected page
is rendered using a <span> element rather than an <a> element (like the
other pagination links).

I can't find a way to change this behavior, nor where wicket decides
which tag to render. 

Can anyone point me into the right direction?

Example can be found here:
http://www.wicket-library.com/wicket-examples/repeater/wicket/bookmarkable/org.apache.wicket.examples.repeater.DataTablePage?0 

thanks,


robert


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


Re: Changing the tag of a PagingNavigationLink

Posted by ro...@dubture.com.
Great, that worked. Thanks for the tip!


regards,


-robert



On Tue, Aug 4, 2015, at 01:58 PM, Martin Grigorov wrote:
> Hi,
> 
> On Tue, Aug 4, 2015 at 2:19 PM, Sven Meier <sv...@meiers.net> wrote:
> 
> > Hi,
> >
> > in Wicket 6.x AbstractLink#disableLink() convertes <a> to <span>. This has
> > changed for Wicket 7, see:
> >
> >      https://issues.apache.org/jira/browse/WICKET-4904
> >
> > You have to subclass the link and override #disableLink() - this might be
> > laborious for PagingNavigationLink though.
> >
> > As an alternative try to add a behavior to all links (via an
> > IComponentInstantiationListener) and revert the tag name to <a>.
> >
> 
> You can use
> https://github.com/l0rdn1kk0n/wicket-bootstrap/blob/3fc444e76e2dfeda2d484ddfb822d5ee022ad524/bootstrap-core/src/main/java/de/agilecoders/wicket/core/markup/html/bootstrap/button/Buttons.java#L26
> as inspiration.
> 
> 
> >
> > Have fun
> > Sven
> >
> >
> >
> > On 04.08.2015 12:15, robert@dubture.com wrote:
> >
> >> Hi all,
> >>
> >> when implementing a DataTable, the link to the currently selected page
> >> is rendered using a <span> element rather than an <a> element (like the
> >> other pagination links).
> >>
> >> I can't find a way to change this behavior, nor where wicket decides
> >> which tag to render.
> >>
> >> Can anyone point me into the right direction?
> >>
> >> Example can be found here:
> >>
> >> http://www.wicket-library.com/wicket-examples/repeater/wicket/bookmarkable/org.apache.wicket.examples.repeater.DataTablePage?0
> >>
> >> thanks,
> >>
> >>
> >> robert
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> For additional commands, e-mail: users-help@wicket.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >

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


Re: Changing the tag of a PagingNavigationLink

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

On Tue, Aug 4, 2015 at 2:19 PM, Sven Meier <sv...@meiers.net> wrote:

> Hi,
>
> in Wicket 6.x AbstractLink#disableLink() convertes <a> to <span>. This has
> changed for Wicket 7, see:
>
>      https://issues.apache.org/jira/browse/WICKET-4904
>
> You have to subclass the link and override #disableLink() - this might be
> laborious for PagingNavigationLink though.
>
> As an alternative try to add a behavior to all links (via an
> IComponentInstantiationListener) and revert the tag name to <a>.
>

You can use
https://github.com/l0rdn1kk0n/wicket-bootstrap/blob/3fc444e76e2dfeda2d484ddfb822d5ee022ad524/bootstrap-core/src/main/java/de/agilecoders/wicket/core/markup/html/bootstrap/button/Buttons.java#L26
as inspiration.


>
> Have fun
> Sven
>
>
>
> On 04.08.2015 12:15, robert@dubture.com wrote:
>
>> Hi all,
>>
>> when implementing a DataTable, the link to the currently selected page
>> is rendered using a <span> element rather than an <a> element (like the
>> other pagination links).
>>
>> I can't find a way to change this behavior, nor where wicket decides
>> which tag to render.
>>
>> Can anyone point me into the right direction?
>>
>> Example can be found here:
>>
>> http://www.wicket-library.com/wicket-examples/repeater/wicket/bookmarkable/org.apache.wicket.examples.repeater.DataTablePage?0
>>
>> thanks,
>>
>>
>> robert
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Changing the tag of a PagingNavigationLink

Posted by Sven Meier <sv...@meiers.net>.
Hi,

in Wicket 6.x AbstractLink#disableLink() convertes <a> to <span>. This 
has changed for Wicket 7, see:

      https://issues.apache.org/jira/browse/WICKET-4904

You have to subclass the link and override #disableLink() - this might 
be laborious for PagingNavigationLink though.

As an alternative try to add a behavior to all links (via an 
IComponentInstantiationListener) and revert the tag name to <a>.

Have fun
Sven


On 04.08.2015 12:15, robert@dubture.com wrote:
> Hi all,
>
> when implementing a DataTable, the link to the currently selected page
> is rendered using a <span> element rather than an <a> element (like the
> other pagination links).
>
> I can't find a way to change this behavior, nor where wicket decides
> which tag to render.
>
> Can anyone point me into the right direction?
>
> Example can be found here:
> http://www.wicket-library.com/wicket-examples/repeater/wicket/bookmarkable/org.apache.wicket.examples.repeater.DataTablePage?0
>
> thanks,
>
>
> robert
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


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