you need two link instances and two wicket:id's for the cancel links.
<a href="#" wicket:id="restartLink">Restart</a>
....
<a href="#" wicket:id="cancelLink">Cancel</a>
add(new Link("restartLink") {
public void onClick() {
onCancel();
}
});
...
add(new Link("cancelLink") {
public void onClick() {
onCancel();
}
});
...
public void onCancel() {
... cancel functionality goes here
}
Martijn
On Wed, Feb 24, 2010 at 4:22 PM, hill180 <[email protected]> wrote:
> Is there an easy way to point two wicket:id link tags to the same link. I
> just have the link on the Nav Bar, and in the footer bar, and they do the
> same thing.
>
>
>
> IE:
>
> <a href="#" wicket:id="restartLink">CANCEL BUTTON</a>
>
> ....
>
> <a href="#" wicket:id="cancelLink">CANCEL BUTTON</a>
>
> Java:
>
> restartLink = new Link("restartLink") {
>
> �...@override
> public void onClick() {
> //.....
> }
> };
> cancelLink = new Link("cancelLink") {
>
> �...@override
> public void onClick() {
> //same as restart Link Code.....
> }
> };
>
>
> }
>
> Thanks!
>
--
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]