Re: make link invisible via onclick

2011-03-28 Thread Josh Kamau
Hi,

How about something like this.

private Boolean isLinkVisible = true ;
...


final Link link = new Link("test"){

  @Override
 public void onClick(){
  isLinkVisible = false ;
}

@Override
public void isVisible(){
   return isLinkVisible ;
}

}

Kind regards.

Josh


RE: make link invisible via onclick

2011-03-28 Thread hrbaer
this works like a charm - thanks.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/make-link-itself-invisible-via-onclick-tp3411327p3411347.html
Sent from the Users forum mailing list archive at Nabble.com.

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



RE: make link invisible via onclick

2011-03-28 Thread Wilhelmsen Tor Iver
> is there a possibility to make a link invisible itself via onClick?


> link.setVisible( false );

Sure: Just use "this" instead of "link", since "this" in the onClick() will be 
the anonymous object based on Link.

- Tor Iver

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



make link invisible via onclick

2011-03-28 Thread hrbaer
Hi,

is there a possibility to make a link invisible itself via onClick?
At the moment I get an error "The local variable link may not have been
initialized".

code:
--
final Link link = new Link( "test" ) {

@Override
public void onClick() {
  link.setVisible( false );
}
};
--

Thanks in advance.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/make-link-invisible-via-onclick-tp3411327p3411327.html
Sent from the Users forum mailing list archive at Nabble.com.

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