Hello all!

Question for Wicket 1.3.5.

I want to create java code for simple button, and to override caption from html:

       <a href="#" wicket:id="loginLink">loginLink caption</a>
*
*|*but this doesn't work:*

public class AuthPanel extends Panel {

   public AuthPanel(String id) {
       super(id);
           add(new Link("loginLink", new Model("new caption")) {
...|

*1. here I see sample using <span> - it is overwork ( I don't want to add <span> tag every time)*
http://cwiki.apache.org/WICKET/create-dynamic-markup-hierarchies-using-panels.html

<a href="#" wicket:id="myLink"><span wicket:id="label">bar</span></a>

add(new ExternalLink("myLink", "http://google.com";).add(new Label("label", "bar")));

*2. It can be set with ExternalLink:*

add(new ExternalLink("loginLink", new Model("new caption"), new Model("new cap2") ) {

But in my case it is not ExternalLink. And I have feeling that some other more appropriate solution exists.


/So, what should I use???/


Thanks in advance!

--
Khlystov Alexandr


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to