resource.setResourceName(resName.toString());
resource.setDescription(resDescription.toString());
try {
ResourceDAO resDao = df.getResourceDAO();
resDao.insertResource(resource);
for (int i = 0; i <= groupnumber; i++) {
if (groups.isSelected(i)) {
Group gr = new Group();