Commit f4a76ba2 by Tuukka Kivilahti

In theory, this works. Will test later. When someone else commits me version of …

…this project which compiles.
1 parent f5df2fe5
...@@ -15,7 +15,9 @@ ...@@ -15,7 +15,9 @@
<h:panelGrid> <h:panelGrid>
<h:outputText value="#{i18n['role.name']}" /><h:inputText value="#{roleView.role.name}" /> <h:outputText value="#{i18n['role.name']}" /><h:inputText value="#{roleView.role.name}" />
<h:selectManyListbox value="#{roleView.possibleParents}" /> <h:selectManyListbox value="#{roleView.role.parents}">
<f:selectItems value="#{roleView.possibleParents}" />
</h:selectManyListbox>
</h:panelGrid> </h:panelGrid>
</ui:composition> </ui:composition>
</html> </html>
......
...@@ -9,6 +9,7 @@ import fi.insomnia.bortal.beans.SecurityBeanLocal; ...@@ -9,6 +9,7 @@ import fi.insomnia.bortal.beans.SecurityBeanLocal;
import fi.insomnia.bortal.exceptions.PermissionDeniedException; import fi.insomnia.bortal.exceptions.PermissionDeniedException;
import fi.insomnia.bortal.handler.SessionHandler; import fi.insomnia.bortal.handler.SessionHandler;
import fi.insomnia.bortal.model.Role; import fi.insomnia.bortal.model.Role;
import java.util.List;
import javax.ejb.EJB; import javax.ejb.EJB;
import javax.faces.bean.ManagedBean; import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty; import javax.faces.bean.ManagedProperty;
...@@ -38,8 +39,6 @@ public class RoleView { ...@@ -38,8 +39,6 @@ public class RoleView {
private Role role = new Role(); private Role role = new Role();
DataModel<Role> items; DataModel<Role> items;
private DataModel<Role> possibleParents;
public DataModel<Role> getRoles() { public DataModel<Role> getRoles() {
items = new ListDataModel<Role>(roleBean.listRoles()); items = new ListDataModel<Role>(roleBean.listRoles());
logger.info("Fetching roles. Found {}", items.getRowCount()); logger.info("Fetching roles. Found {}", items.getRowCount());
...@@ -113,9 +112,7 @@ public class RoleView { ...@@ -113,9 +112,7 @@ public class RoleView {
/** /**
* @return the possibleParents * @return the possibleParents
*/ */
public DataModel<Role> getPossibleParents() { public List<Role> getPossibleParents() {
possibleParents = new ListDataModel<Role>(roleBean.getPossibleParents(role)); return roleBean.getPossibleParents(role);
return possibleParents;
} }
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!