title: Replace text inside Wicket AjaxLink
body: <p>I have created a new AjaxLink in my .java file</p>
  
  <pre><code>add(new AjaxLink("link"){                                                                                                                                                                                                                                                                                                  
  private static final long serialVersionUID = 1L;                                                                                                       
  
  @Override                                                                                                                                              
  public void onClick(AjaxRequestTarget target) {                                                                                                        
  target.appendJavascript("window.open('http://www.cnn.com/2011/WORLD/africa/02/23/libya.protests/index.html?hpt="+T1+"')");              
  }                                                                                                                                                      
  });
  </code></pre>
  
  <p>And added it to my .html file</p>
  
  <pre><code>&lt;a href="#" wicket:id="link"&gt;TEXT TO REPLACE&lt;/a&gt; 
  </code></pre>
  
  <p>The url is just an example but T1 is dynamic and I get that from my .java file. I would like the  "TEXT TO REPLACE" to equal the T1 string but I don't know how to do this. I have tried creating a Label and adding it like </p>
  
  <pre><code>&lt;a href="#" wicket:id="link"&gt;&lt;span wicket:id="linkLbl"&gt;&lt;/span&gt;&lt;/a&gt; 
  </code></pre>
  
  <p>but that gives an error.</p>
  
  <p>Any suggestions?</p>
  
  <p>Thanks</p>