final YuiDialog dialog = new YuiDialog("itemWindow");
add(dialog);
AjaxLink link = new AjaxLink("link") {
public void onClick(AjaxRequestTarget target) {
Item item = getJtrac().loadItemByRefId(refId);
dialog.show(target, refId, new ItemViewPanel(YuiDialog.CONTENT_ID, item, true));
}
};
link.add(new Label("refId", refId));
if(isItemViewPage) {
add(new WebMarkupContainer("link").setVisible(false));