Allow supervisors to write a note associated with their projects #8
@ -97,16 +97,16 @@ public class ProjectNoteColumn extends AbstractExportableColumn<Project, String>
|
|||||||
}
|
}
|
||||||
|
|
||||||
private class ViewAndEditNoteForm extends GenericPanel<Project> {
|
private class ViewAndEditNoteForm extends GenericPanel<Project> {
|
||||||
ansv7779 marked this conversation as resolved
|
|||||||
public ViewAndEditNoteForm(String id, IModel<Project> model) {
|
public ViewAndEditNoteForm(String id, IModel<Project> project) {
|
||||||
super(id, model);
|
super(id, project);
|
||||||
|
|
||||||
IModel<String> note = getDataModel(model);
|
IModel<String> note = getDataModel(project);
|
||||||
|
|
||||||
Form<Project> form = new Form<>("form", model) {
|
Form<Project> form = new Form<>("form", project) {
|
||||||
@Override
|
@Override
|
||||||
protected void onSubmit() {
|
protected void onSubmit() {
|
||||||
projectNoteService.setUserNote(
|
projectNoteService.setUserNote(
|
||||||
model.getObject(),
|
project.getObject(),
|
||||||
user.getObject(),
|
user.getObject(),
|
||||||
note.getObject()
|
note.getObject()
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user
Rename model.getObject to projectModel.getObject ?
Would make it more readable and conform with the projectNoteService.setUserNote method.