works now
This commit is contained in:
parent
e4446e56da
commit
7002fc1993
src/main/java/se/su/dsv/scipro/admin/panels/match
@ -15,7 +15,7 @@
|
||||
<table wicket:id="table" class="rounded-corner">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="rounded-left-top">Name</th><th>Manage associations</th><th>Type</th><th>Active</th><th class="rounded-right-top">Edit</th>
|
||||
<th class="rounded-left-top">Name</th><th>Manage keyword associations</th><th>Type</th><th>Active</th><th class="rounded-right-top">Edit</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -163,15 +163,17 @@ public class ManageKeywordPanel extends Panel {
|
||||
@Override
|
||||
public void onClick(AjaxRequestTarget target) {
|
||||
target.addComponent(dialog2);
|
||||
dialog2.replace(new SelectKeywordsPanel("dialogContent", new Model<KeywordContainer>(new KeywordContainer(item.getModelObject().getAssociatedKeywords())), KeywordTypeDao.TYPE.REGULAR, new String("blabla")) {
|
||||
dialog2.replace(new SelectKeywordsPanel("dialogContent", new Model<KeywordContainer>(new KeywordContainer(item.getModelObject().getAssociatedKeywords())), KeywordTypeDao.TYPE.REGULAR, new String("Select regular keywords to be associated with this research area")) {
|
||||
@Override
|
||||
public void onUpdateAdd(AjaxRequestTarget target, Keyword addedKeyword) {
|
||||
//To change body of implemented methods use File | Settings | File Templates.
|
||||
item.getModelObject().getAssociatedKeywords().add(addedKeyword);
|
||||
item.setModelObject(keywordDao.save(item.getModelObject()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdateRemove(AjaxRequestTarget target, Keyword removedKeyword) {
|
||||
//To change body of implemented methods use File | Settings | File Templates.
|
||||
item.getModelObject().getAssociatedKeywords().remove(removedKeyword);
|
||||
item.setModelObject(keywordDao.save(item.getModelObject()));
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user