title: How to dynamically add a hyperlink (BookmarkablePageLink) to DefaultDataTable that is rendered as an anchor
body: <p>I have a DefaultDataTable that gets its columns programmatically.  </p>
  
  <p>The markup is simple:</p>
  
  <pre><code>        &lt;table wicket:id="dataTable" border="0" cellpadding="1" cellspacing="1" width="90%" /&gt;
  </code></pre>
  
  <p>All of the columns are dynamically generated from a passed in LinkedHashMap of labels and attributes:</p>
  
  <pre><code>    for (Entry&lt;String, String&gt; entry : entrySet) {
          final String label = entry.getKey();
          final String attribute = entry.getValue();
          columns.add(new PsPropertyColumn(label, attribute) {
  
              @Override
              public void populateItem(Item cellItem, String componentId, IModel model)
              {
                  final Object modelObject = model.getObject();
                  final Object value = PropertyResolver.getValue(attribute, modelObject);
                  // Add an edit link
                  BookmarkablePageLink link = new ...;
                  ...
                  cellItem.add(link);
              }
          }
      }
  
      DefaultDataTable table = new DefaultDataTable("dataTable", columns, dataProvider, MAX_ROWS) {
          ...
      }
      add(table);
  </code></pre>
  
  <p>As many posts have mentioned, this is rendered as a cell with an onclick handler rather than an anchor (&lt;a href="..." /&gt;) tag.  I want the anchor tag for a couple of reasons, one if which is that I want to add my own onclick handler without having an existing onclick handler in the way.</p>
  
  <p>I have seen the generally accepted solution that says to put an anchor tag inside a panel in the HTML markup, and to add the link inside of a Panel subclass.  However, that doesn't give the entire html markup (inside the table), and I think the column () tags must be a part of this markup, which I don't think works with my strategy of dynamically generating the columns (I don't even know or care how many will be asked for).  Is there a way to render my dynamically generated columns as anchor tags without specifying in the markup how many there?</p>
  
  <p>Thank you for any help.</p>