public class MyLink extends Link<Void> {
    public MyLink(String id) {
        super(id);
    }

    @Override
    public void onClick() {
        // Your code here
    }
}

add(new MyLink("restartLink"));
add(new MyLink("cancelLink"));


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!
>



-- 
Hbiloo
www.hbiloo.com

Reply via email to