final TreeRolePanel treePanel = new TreeRolePanel("treePanel");
treePanel.setOutputMarkupId(true);
roleTabsContainer.add(treePanel);
final RoleSummaryPanel summaryPanel = new RoleSummaryPanel.Builder("summaryPanel")
.window(editRoleWin).callerPageRef(Roles.this.getPageReference()).build();
roleTabsContainer.add(summaryPanel);
editRoleWin.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
private static final long serialVersionUID = 8804221891699487139L;
@Override
public void onClose(final AjaxRequestTarget target) {
final RoleSummaryPanel summaryPanel = (RoleSummaryPanel) roleTabsContainer.get("summaryPanel");
final TreeNodeClickUpdate data = new TreeNodeClickUpdate(target,
summaryPanel == null || summaryPanel.getSelectedNode() == null
? 0
: summaryPanel.getSelectedNode().getId());
send(getPage(), Broadcast.BREADTH, data);
if (modalResult) {
getSession().info(getString(Constants.OPERATION_SUCCEEDED));