description.add(rosb);
String[] defaultValue = { project.getDescription() };
description.setModelValue(defaultValue);
submitButton = new AjaxFallbackButton("editProjectActionLink",
new Model<String>("Edit"), this) {
private static final long serialVersionUID = 384116828159132608L;
@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
toggleEditMode();
target.addComponent(form);
}
@Override
public boolean isVisible() {
return SimalSession.get().isAuthenticated();
}
};
add(submitButton);
Button cancelButton = new AjaxFallbackButton("cancelProjectActionLink",
new Model<String>("Cancel"), this) {
private static final long serialVersionUID = -7941561946368787393L;
@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
try {
PageParameters projectPageParams = new PageParameters();
projectPageParams.add("simalID", project.getSimalID());
setResponsePage(ProjectDetailPage.class, projectPageParams);
} catch (SimalRepositoryException e) {
setResponsePage(new ProjectDetailPage(project));
}
}
@Override
public boolean isVisible() {
return (!readOnly && SimalSession.get().isAuthenticated());
}
};
cancelButton.setDefaultFormProcessing(false);
add(cancelButton);
add(new ReleasesPanel("releasepanel", project.getReleases(), rosb));
CategoryListPanel categoryList = new CategoryListPanel("categoryList",
"Categories", project.getCategories(), project);