Commit cb952870 by Antti Tonkyra

Merge branch 'master' of dev.insomnia.fi:/data/bortal

2 parents 76bfb945 7cdee1b7
...@@ -17,7 +17,6 @@ import org.eclipse.persistence.annotations.OptimisticLockingType; ...@@ -17,7 +17,6 @@ import org.eclipse.persistence.annotations.OptimisticLockingType;
import fi.insomnia.bortal.enums.ActionLogMessageState; import fi.insomnia.bortal.enums.ActionLogMessageState;
@Entity @Entity
@Table(name = "actionlog_message_responses") @Table(name = "actionlog_message_responses")
@OptimisticLocking(type = OptimisticLockingType.CHANGED_COLUMNS) @OptimisticLocking(type = OptimisticLockingType.CHANGED_COLUMNS)
...@@ -27,7 +26,7 @@ public class ActionLogMessageResponse extends GenericEntity { ...@@ -27,7 +26,7 @@ public class ActionLogMessageResponse extends GenericEntity {
private Date time = new Date(); private Date time = new Date();
@JoinColumn(name = "user_id") @JoinColumn(name = "user_id")
private IUser user; private EventUser user;
@Column(name = "message", nullable = false) @Column(name = "message", nullable = false)
private String message; private String message;
...@@ -48,11 +47,11 @@ public class ActionLogMessageResponse extends GenericEntity { ...@@ -48,11 +47,11 @@ public class ActionLogMessageResponse extends GenericEntity {
this.time = time; this.time = time;
} }
public IUser getUser() { public EventUser getUser() {
return user; return user;
} }
public void setUser(IUser user) { public void setUser(EventUser user) {
this.user = user; this.user = user;
} }
......
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:orgrole="http://java.sun.com/jsf/composite/cditools/orgrole"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<ui:composition
template="/layout/#{sessionHandler.layout}/template.xhtml">
<ui:param name="thispage" value="page.orgRole.create" />
<f:metadata>
<f:event type="preRenderView"
listener="#{orgRoleView.initForCreate()}" />
</f:metadata>
<ui:define name="content">
<orgrole:create />
</ui:define>
</ui:composition>
</html>
\ No newline at end of file
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:composite="http://java.sun.com/jsf/composite"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:tools="http://java.sun.com/jsf/composite/tools"
xmlns:orgrole="http://java.sun.com/jsf/composite/tools/orgrole">
<composite:interface>
</composite:interface>
<composite:implementation>
<h:form>
<ui:include src="form.xhtml" />
<h:commandButton id="createorgrole" value="#{i18n['orgrole.create']}"
action="#{orgRoleView.create()}" />
</h:form>
</composite:implementation>
</html>
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:composite="http://java.sun.com/jsf/composite"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:tools="http://java.sun.com/jsf/composite/tools">
<ui:composition>
<h:panelGrid columns="2">
<h:outputText value="#{i18n['orgrole.name']}" />
<h:inputText value="#{orgRoleView.orgRole.name}" />
<h:outputText value="#{i18n['orgrole.parents']}" />
<h:selectManyCheckbox converter="#{roleConverter}"
layout="pageDirection" id="roleparents"
value="#{roleView.role.parents}">
<f:selectItems var="par" itemLabel="#{par.name}"
value="#{roleView.possibleParents}" />
</h:selectManyCheckbox>
<h:outputLabel value="#{i18n['role.cardtemplate']}" />
<h:selectOneMenu converter="#{cardTemplateConverter}"
value="#{roleView.role.cardTemplate}">
<f:selectItems var="role" itemLabel="#{role.name}"
value="#{cardView.templatesWithNull}" />
</h:selectOneMenu>
</h:panelGrid>
</ui:composition>
</html>
...@@ -21,4 +21,9 @@ public class OrgRoleView extends GenericCDIView { ...@@ -21,4 +21,9 @@ public class OrgRoleView extends GenericCDIView {
requirePermissions(permbean.hasPermission(UserPermission.READ_ORGROLES)); requirePermissions(permbean.hasPermission(UserPermission.READ_ORGROLES));
} }
public void initForCreate() {
requirePermissions(permbean
.hasPermission(UserPermission.WRITE_ORGROLES));
}
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!