use of net.jforum.util.TreeGroup in project jforum2 by rafaelsteil.
the class ForumAction method insert.
// One more, one more
public void insert() {
CategoryDAO cm = DataAccessDriver.getInstance().newCategoryDAO();
this.context.put("groups", new TreeGroup().getNodes());
this.context.put("selectedList", new ArrayList());
this.setTemplateName(TemplateKeys.FORUM_ADMIN_INSERT);
this.context.put("categories", cm.selectAll());
this.context.put("action", "insertSave");
}
use of net.jforum.util.TreeGroup in project jforum2 by rafaelsteil.
the class GroupAction method edit.
// Edit a group
public void edit() {
int groupId = this.request.getIntParameter("group_id");
GroupDAO gm = DataAccessDriver.getInstance().newGroupDAO();
this.setTemplateName(TemplateKeys.GROUP_EDIT);
this.context.put("group", gm.selectById(groupId));
this.context.put("groups", new TreeGroup().getNodes());
this.context.put("selectedList", new ArrayList());
this.context.put("action", "editSave");
}
use of net.jforum.util.TreeGroup in project jforum2 by rafaelsteil.
the class UserAction method groups.
// Groups
public void groups() {
int userId = this.request.getIntParameter("id");
UserDAO um = DataAccessDriver.getInstance().newUserDAO();
User u = um.selectById(userId);
List selectedList = new ArrayList();
for (Iterator iter = u.getGroupsList().iterator(); iter.hasNext(); ) {
selectedList.add(new Integer(((Group) iter.next()).getId()));
}
this.context.put("selectedList", selectedList);
this.context.put("groups", new TreeGroup().getNodes());
this.context.put("user", u);
this.context.put("userId", new Integer(userId));
this.setTemplateName(TemplateKeys.USER_ADMIN_GROUPS);
this.context.put("groupFor", I18n.getMessage("User.GroupsFor", new String[] { u.getUsername() }));
}
use of net.jforum.util.TreeGroup in project jforum2 by rafaelsteil.
the class UserAction method commonData.
private void commonData() {
this.context.put("selectedList", new ArrayList());
this.context.put("groups", new TreeGroup().getNodes());
this.setTemplateName(TemplateKeys.USER_ADMIN_COMMON);
this.context.put("searchAction", "list");
this.context.put("searchId", new Integer(-1));
}
use of net.jforum.util.TreeGroup in project jforum2 by rafaelsteil.
the class AttachmentsAction method quotaLimit.
public void quotaLimit() {
AttachmentDAO am = DataAccessDriver.getInstance().newAttachmentDAO();
this.context.put("quotas", am.selectQuotaLimit());
this.setTemplateName(TemplateKeys.ATTACHMENTS_QUOTA_LIMIT);
this.context.put("groups", new TreeGroup().getNodes());
this.context.put("selectedList", new ArrayList());
this.context.put("groupQuotas", am.selectGroupsQuotaLimits());
}
Aggregations