HtmlOutcomeTargetLink link = new HtmlOutcomeTargetLink();
link.putAttribute("outcome", getTargetDir() + "/" + controllerName + "/view");
// ...pointing to the id
Param param = new Param();
param.putAttribute("name", "id");
param.putAttribute("value", StaticFacesUtils.wrapExpression(dataTable.getAttribute("var") + "." + getEntityPrimaryKey(columnAttributes)));
link.getChildren().add(param);
link.getChildren().add(column.getChildren().remove(1));
column.getChildren().add(link);
// If bidirectional, add a footer facet