parentSelectWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
parentSelectWin.setCookieName("create-parentSelect-modal");
this.add(parentSelectWin);
if (templateMode) {
parentFragment = new Fragment("parent", "parentFragment", this);
parentModel = new ParentModel(roleTO);
final AjaxTextFieldPanel parent = new AjaxTextFieldPanel("parent", "parent", parentModel);
parent.setReadOnly(true);
parent.setOutputMarkupId(true);
parentFragment.add(parent);
final IndicatingAjaxLink parentSelect = new IndicatingAjaxLink("parentSelect") {
private static final long serialVersionUID = -7978723352517770644L;
@Override
public void onClick(final AjaxRequestTarget target) {
parentSelectWin.setPageCreator(new ModalWindow.PageCreator() {
private static final long serialVersionUID = -7834632442532690940L;
@Override
public Page createPage() {
return new RoleSelectModalPage(getPage().getPageReference(), parentSelectWin,
ParentSelectPayload.class);
}
});
parentSelectWin.show(target);
}
};
parentFragment.add(parentSelect);
final IndicatingAjaxLink parentReset = new IndicatingAjaxLink("parentReset") {
private static final long serialVersionUID = -7978723352517770644L;
@Override
public void onClick(final AjaxRequestTarget target) {
parentModel.setObject(null);
target.add(parent);
}
};
parentFragment.add(parentReset);
} else {
parentFragment = new Fragment("parent", "emptyFragment", this);
}
parentFragment.setOutputMarkupId(true);
this.add(parentFragment);
final AjaxTextFieldPanel name =