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 @@
<h:panelGrid>
<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>
</ui:composition>
</html>
......
......@@ -9,6 +9,7 @@ import fi.insomnia.bortal.beans.SecurityBeanLocal;
import fi.insomnia.bortal.exceptions.PermissionDeniedException;
import fi.insomnia.bortal.handler.SessionHandler;
import fi.insomnia.bortal.model.Role;
import java.util.List;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
......@@ -38,8 +39,6 @@ public class RoleView {
private Role role = new Role();
DataModel<Role> items;
private DataModel<Role> possibleParents;
public DataModel<Role> getRoles() {
items = new ListDataModel<Role>(roleBean.listRoles());
logger.info("Fetching roles. Found {}", items.getRowCount());
......@@ -113,9 +112,7 @@ public class RoleView {
/**
* @return the possibleParents
*/
public DataModel<Role> getPossibleParents() {
possibleParents = new ListDataModel<Role>(roleBean.getPossibleParents(role));
return possibleParents;
public List<Role> getPossibleParents() {
return roleBean.getPossibleParents(role);
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!