target.add(container);
}
}
});
final AddFolderDialog addFolder = new AddFolderDialog("addFolder") {
private static final long serialVersionUID = 1L;
@Override
protected void onSubmit(AjaxRequestTarget target) {
super.onSubmit(target);
PrivateMessageFolderDao fDao = getBean(PrivateMessageFolderDao.class);
fDao.addPrivateMessageFolder(getModelObject(), getUserId());
foldersModel.setObject(fDao.get(0, Integer.MAX_VALUE));
updateMoveModel();
target.add(folders, moveDropDown);
}
};
add(addFolder);
add(new WebMarkupContainer("new").add(new AjaxEventBehavior("click") {
private static final long serialVersionUID = 1L;
@Override
protected void onEvent(AjaxRequestTarget target) {
newMessage.reset(false).open(target);
}
}).add(new JQueryBehavior(".email.new", "button")));
folders.add(inbox.add(new AjaxEventBehavior("click") {
private static final long serialVersionUID = 1L;
@Override
protected void onEvent(AjaxRequestTarget target) {
selectFolder(inbox, INBOX_FOLDER_ID, target);
}
}));
folders.add(sent.add(new AjaxEventBehavior("click") {
private static final long serialVersionUID = 1L;
@Override
protected void onEvent(AjaxRequestTarget target) {
selectFolder(sent, SENT_FOLDER_ID, target);
}
}));
folders.add(trash.add(new AjaxEventBehavior("click") {
private static final long serialVersionUID = 1L;
@Override
protected void onEvent(AjaxRequestTarget target) {
selectFolder(trash, TRASH_FOLDER_ID, target);
}
}));
folders.add(new WebMarkupContainer("newdir").add(new AjaxEventBehavior("click") {
private static final long serialVersionUID = 1L;
@Override
protected void onEvent(AjaxRequestTarget target) {
addFolder.open(target);
}
}).add(new JQueryBehavior(".email.newdir", "button")));
add(folders.add(new ListView<PrivateMessageFolder>("folder", foldersModel) {
private static final long serialVersionUID = 1L;