From a14732f4b0f23e05f461f19247cd931e760f6761 Mon Sep 17 00:00:00 2001
From: "Barbara B. Frosik" <bfrosik@aps.anl.gov>
Date: Mon, 15 Dec 2014 22:36:44 +0000
Subject: [PATCH]

---
 .../controllers/ExperimentController.java     |  6 ++++
 .../controllers/ExperimentTypeController.java |  9 ++++-
 .../controllers/RoleTypeController.java       | 22 ++++++------
 .../controllers/UserInfoController.java       | 36 ++++++++++++++++++-
 .../dm/portal/model/entities/Experiment.java  |  2 +-
 .../portal/model/entities/ExperimentType.java |  2 +-
 .../dm/portal/model/entities/RoleType.java    | 16 +++++++--
 .../dm/portal/model/entities/UserInfo.java    | 10 +++---
 .../resources/js/experiment/list.filter.js    |  6 ----
 .../js/experimentType/list.filter.js          |  4 ---
 .../experimentCreatePanelGrid.xhtml           | 16 ++++-----
 .../experiment/experimentEditPanelGrid.xhtml  | 14 ++++----
 .../web/views/experiment/list.xhtml           |  2 --
 .../experimentTypeCreatePanelGrid.xhtml       |  2 +-
 .../experimentTypeEditPanelGrid.xhtml         |  2 +-
 .../web/views/experimentType/list.xhtml       |  2 --
 .../roleType/roleTypeCreatePanelGrid.xhtml    |  2 +-
 .../roleType/roleTypeEditPanelGrid.xhtml      |  2 +-
 .../roleType/roleTypeListDataTable.xhtml      |  2 +-
 .../userInfo/userInfoCreatePanelGrid.xhtml    |  4 +--
 .../userInfo/userInfoEditPanelGrid.xhtml      |  6 ++--
 21 files changed, 107 insertions(+), 60 deletions(-)
 delete mode 100644 src/java/DmWebPortal/web/resources/js/experiment/list.filter.js
 delete mode 100644 src/java/DmWebPortal/web/resources/js/experimentType/list.filter.js

diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/ExperimentController.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/ExperimentController.java
index 74ff2d30..227ff11e 100644
--- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/ExperimentController.java
+++ b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/ExperimentController.java
@@ -65,6 +65,9 @@ public class ExperimentController extends CrudEntityController<Experiment, Exper
 
     @Override
     public void prepareEntityInsert(Experiment experiment) throws ObjectAlreadyExists, InvalidDate, MissingProperty {
+        if ((experiment.getName() == null) || (experiment.getName().length() == 0)){
+            throw new MissingProperty("Experiment name is missing.");
+        }
         Experiment existingExperiment = experimentFacade.findByName(experiment.getName());
         if (existingExperiment != null) {
             throw new ObjectAlreadyExists("Experiment " + experiment.getName() + " already exists.");
@@ -76,6 +79,9 @@ public class ExperimentController extends CrudEntityController<Experiment, Exper
 
     @Override
     public void prepareEntityUpdate(Experiment experiment) throws DmPortalException {
+        if ((experiment.getName() == null) || (experiment.getName().length() == 0)) {
+            throw new MissingProperty("Experiment name is missing.");
+        }
         verifyExperiment(experiment);        
         logger.debug("Updating experiment " + experiment.getName());                
     }
diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/ExperimentTypeController.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/ExperimentTypeController.java
index 2489e355..b036a0d0 100644
--- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/ExperimentTypeController.java
+++ b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/ExperimentTypeController.java
@@ -1,6 +1,7 @@
 package gov.anl.aps.dm.portal.controllers;
 
 import gov.anl.aps.dm.portal.exceptions.DmPortalException;
+import gov.anl.aps.dm.portal.exceptions.MissingProperty;
 import gov.anl.aps.dm.portal.exceptions.ObjectAlreadyExists;
 import gov.anl.aps.dm.portal.model.entities.ExperimentType;
 import gov.anl.aps.dm.portal.model.beans.ExperimentTypeFacade;
@@ -62,7 +63,10 @@ public class ExperimentTypeController extends CrudEntityController<ExperimentTyp
     }
 
     @Override
-    public void prepareEntityInsert(ExperimentType experimentType) throws ObjectAlreadyExists {
+    public void prepareEntityInsert(ExperimentType experimentType) throws ObjectAlreadyExists, MissingProperty {
+        if ((experimentType.getName() == null) || (experimentType.getName().length() == 0)) {
+            throw new MissingProperty("Name is missing.");
+        }
         ExperimentType existingExperimentType = experimentTypeFacade.findByName(experimentType.getName());
         if (existingExperimentType != null) {
             throw new ObjectAlreadyExists("Experiment type " + experimentType.getName() + " already exists.");
@@ -72,6 +76,9 @@ public class ExperimentTypeController extends CrudEntityController<ExperimentTyp
 
     @Override
     public void prepareEntityUpdate(ExperimentType experimentType) throws DmPortalException {
+        if ((experimentType.getName() == null) || (experimentType.getName().length() == 0)) {
+            throw new MissingProperty("Name is missing.");
+        }
     }
     
       @Override
diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/RoleTypeController.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/RoleTypeController.java
index d398dee3..8c04ff6f 100644
--- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/RoleTypeController.java
+++ b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/RoleTypeController.java
@@ -1,6 +1,7 @@
 package gov.anl.aps.dm.portal.controllers;
 
 import gov.anl.aps.dm.portal.exceptions.DmPortalException;
+import gov.anl.aps.dm.portal.exceptions.MissingProperty;
 import gov.anl.aps.dm.portal.exceptions.ObjectAlreadyExists;
 import gov.anl.aps.dm.portal.model.beans.RoleTypeFacade;
 import gov.anl.aps.dm.portal.model.entities.RoleType;
@@ -19,11 +20,6 @@ import org.apache.log4j.Logger;
 @SessionScoped
 public class RoleTypeController extends CrudEntityController<RoleType, RoleTypeFacade>
 {
-    private static final List<String> systemRoles = new ArrayList();
-    {
-        systemRoles.add("Administrator");
-    }
-
     private static final Logger logger = Logger.getLogger(RoleTypeController.class.getName());
 
     @EJB
@@ -66,7 +62,10 @@ public class RoleTypeController extends CrudEntityController<RoleType, RoleTypeF
     }
 
     @Override
-    public void prepareEntityInsert(RoleType roleType) throws ObjectAlreadyExists {
+    public void prepareEntityInsert(RoleType roleType) throws ObjectAlreadyExists, MissingProperty {
+        if ((roleType.getName() == null) || (roleType.getName().length() == 0)) {
+            throw new MissingProperty("Name is missing.");
+        }
         RoleType existingRoleType = roleTypeFacade.findByName(roleType.getName());
         if (existingRoleType != null) {
             throw new ObjectAlreadyExists("Role Type " + roleType.getName() + " already exists.");
@@ -76,7 +75,10 @@ public class RoleTypeController extends CrudEntityController<RoleType, RoleTypeF
 
     @Override
     public void prepareEntityUpdate(RoleType roleType) throws DmPortalException {
-    }
+         if ((roleType.getName() == null) || (roleType.getName().length() == 0)) {
+            throw new MissingProperty("Name is missing.");
+        }
+   }
 
      @Override
      protected String getObjectAlreadyExistMessage(RoleType roleType)  {
@@ -87,14 +89,14 @@ public class RoleTypeController extends CrudEntityController<RoleType, RoleTypeF
     }
 
 
-    public boolean isRoleSystemType(String name) {
-        if (name == null) {
+    public boolean isRoleSystemType(RoleType roleType) {
+        if (roleType == null) {
             logger.warn("Current row is not set");
             // Do nothing if current item is not set.
             return false;
         }
 
-        return systemRoles.contains(name);
+        return roleType.isIsSystemRole();
     }
 
     @FacesConverter(forClass = RoleType.class)
diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/UserInfoController.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/UserInfoController.java
index a898dfea..809ae1f4 100644
--- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/UserInfoController.java
+++ b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/UserInfoController.java
@@ -1,6 +1,7 @@
 package gov.anl.aps.dm.portal.controllers;
 
 import gov.anl.aps.dm.portal.exceptions.DmPortalException;
+import gov.anl.aps.dm.portal.exceptions.MissingProperty;
 import gov.anl.aps.dm.portal.exceptions.ObjectAlreadyExists;
 import gov.anl.aps.dm.portal.model.entities.UserInfo;
 import gov.anl.aps.dm.portal.model.beans.UserInfoFacade;
@@ -66,7 +67,8 @@ public class UserInfoController extends CrudEntityController<UserInfo, UserInfoF
     }
 
     @Override
-    public void prepareEntityInsert(UserInfo user) throws ObjectAlreadyExists {
+    public void prepareEntityInsert(UserInfo user) throws ObjectAlreadyExists,  MissingProperty{
+        verifyMandatoryParam(user);
         UserInfo existingUser = userInfoFacade.findByUsername(user.getUsername());
         if (existingUser != null) {
             throw new ObjectAlreadyExists("User " + user.getUsername() + " already exists.");
@@ -74,8 +76,40 @@ public class UserInfoController extends CrudEntityController<UserInfo, UserInfoF
         logger.debug("Inserting new user " + user.getUsername());
     }
 
+    private void verifyMandatoryParam(UserInfo user) throws MissingProperty {
+        int missing = 0;
+        if ((user.getUsername() == null) || (user.getUsername().length() == 0)) {
+            missing = 1;
+        }
+        if ((user.getLastName() == null) || (user.getLastName().length() == 0)) {
+            missing += 2;
+        }
+        if ((user.getFirstName() == null) || (user.getFirstName().length() == 0)) {
+            missing += 4;
+        }
+        if (missing > 0) {
+            switch (missing) {
+                case 7:
+                    throw new MissingProperty("Username, last name, and first name are missing.");
+                case 6:
+                    throw new MissingProperty("last name, and first name are missing.");
+                case 5:
+                    throw new MissingProperty("Username and first name are missing.");
+                case 4:
+                    throw new MissingProperty("first name is missing.");
+                case 3:
+                    throw new MissingProperty("Username and last name are missing.");
+                case 2:
+                    throw new MissingProperty("last name is missing.");
+                case 1:
+                    throw new MissingProperty("Username is missing.");
+            }
+        }       
+    }
+    
     @Override
     public void prepareEntityUpdate(UserInfo user) throws DmPortalException {
+        verifyMandatoryParam(user);
         if (passwordEntry != null && !passwordEntry.isEmpty()) {
             user.setPassword(passwordEntry);
         }
diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/Experiment.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/Experiment.java
index 2ede6282..31a21e85 100644
--- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/Experiment.java
+++ b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/Experiment.java
@@ -52,7 +52,7 @@ public class Experiment extends CloneableEntity
     private Integer id;
     @Basic(optional = false)
     @NotNull
-    @Size(min = 1, max = 2147483647)
+    @Size(max = 64)
     @Column(name = "name")
     private String name;
     @Size(max = 2147483647)
diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/ExperimentType.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/ExperimentType.java
index 4c48b52d..a2ac97ff 100644
--- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/ExperimentType.java
+++ b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/ExperimentType.java
@@ -45,7 +45,7 @@ public class ExperimentType extends CloneableEntity
     private Integer id;
     @Basic(optional = false)
     @NotNull
-    @Size(min = 1, max = 2147483647)
+    @Size(max = 64)
     @Column(name = "name")
     private String name;
     @Size(max = 2147483647)
diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/RoleType.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/RoleType.java
index 55c47b96..98be61c2 100644
--- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/RoleType.java
+++ b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/RoleType.java
@@ -48,13 +48,16 @@ public class RoleType extends CloneableEntity
     private Integer id;
     @Basic(optional = false)
     @NotNull
-    @Size(min = 1, max = 2147483647)
+    @Size(max = 64)
     @Column(name = "name")
     private String name;
     @Size(max = 2147483647)
     @Column(name = "description")
     private String description;
-    @JoinTable(name = "user_role", joinColumns = {
+    @NotNull
+    @Column(name = "is_system_role")
+    private boolean isSystemRole;
+    @JoinTable(name = "user_system_role", joinColumns = {
         @JoinColumn(name = "role_type_id", referencedColumnName = "id")}, inverseJoinColumns = {
         @JoinColumn(name = "user_id", referencedColumnName = "id")})
     @ManyToMany
@@ -98,6 +101,15 @@ public class RoleType extends CloneableEntity
         this.description = description;
     }
 
+
+    public boolean isIsSystemRole() {
+        return isSystemRole;
+    }
+
+    public void setIsSystemRole(boolean isSystemRole) {
+        this.isSystemRole = isSystemRole;
+    }
+
     @XmlTransient
     public List<UserInfo> getUserInfoList() {
         return userInfoList;
diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/UserInfo.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/UserInfo.java
index 426e705b..f70d3282 100644
--- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/UserInfo.java
+++ b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/UserInfo.java
@@ -58,25 +58,25 @@ public class UserInfo extends CloneableEntity
     private String username;
     @Basic(optional = false)
     @NotNull
-    @Size(min = 1, max = 2147483647)
+    @Size(max = 64)
     @Column(name = "first_name")
     private String firstName;
     @Basic(optional = false)
     @NotNull
-    @Size(min = 1, max = 2147483647)
+    @Size(max = 64)
     @Column(name = "last_name")
     private String lastName;
-    @Size(max = 2147483647)
+    @Size(max = 64)
     @Column(name = "middle_name")
     private String middleName;
     // @Pattern(regexp="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?", message="Invalid email")//if the field contains email address consider using this annotation to enforce field validation
     @Size(max = 2147483647)
     @Column(name = "email")
     private String email;
-    @Size(max = 2147483647)
+    @Size(max = 120)
     @Column(name = "description")
     private String description;
-    @Size(max = 2147483647)
+    @Size(max = 64)
     @Column(name = "password")
     private String password;
     @ManyToMany(mappedBy = "userInfoList")
diff --git a/src/java/DmWebPortal/web/resources/js/experiment/list.filter.js b/src/java/DmWebPortal/web/resources/js/experiment/list.filter.js
deleted file mode 100644
index 0cb3f029..00000000
--- a/src/java/DmWebPortal/web/resources/js/experiment/list.filter.js
+++ /dev/null
@@ -1,6 +0,0 @@
-
-jQuery(document).ready(function() {
-    PF('experimentListWidget').filter();
-});
-
-
diff --git a/src/java/DmWebPortal/web/resources/js/experimentType/list.filter.js b/src/java/DmWebPortal/web/resources/js/experimentType/list.filter.js
deleted file mode 100644
index ce1720c3..00000000
--- a/src/java/DmWebPortal/web/resources/js/experimentType/list.filter.js
+++ /dev/null
@@ -1,4 +0,0 @@
-
-jQuery(document).ready(function() {
-    PF('experimentTypeListWidget').filter();
-});
diff --git a/src/java/DmWebPortal/web/views/experiment/experimentCreatePanelGrid.xhtml b/src/java/DmWebPortal/web/views/experiment/experimentCreatePanelGrid.xhtml
index 5c1eb593..7c8be0b4 100644
--- a/src/java/DmWebPortal/web/views/experiment/experimentCreatePanelGrid.xhtml
+++ b/src/java/DmWebPortal/web/views/experiment/experimentCreatePanelGrid.xhtml
@@ -8,28 +8,28 @@
 
     <ui:param name="experimentObject" value="#{experimentController.selected}"/>
     
-    <p:panelGrid columns="2" styleClass="createEntityDetails">
+    <p:panelGrid columns="2" >
 
         <h:outputLabel for="name" value="Name" styleClass="entityDataEmphasizedLabel"/>
-        <h:inputText id="name" value="#{experimentObject.name}" title="Name" required="true" styleClass="entityDataEmphasizedText"/>
+        <h:inputText id="name" value="#{experimentObject.name}" title="Name" styleClass="entityDataEmphasizedText"/>
 
         <h:outputLabel for="experimentType" value="Experiment Type" styleClass="entityDataLabel"/>
         <p:selectOneMenu id="experimentType" value="#{experimentObject.experimentType}" styleClass="entityDataText">
             <f:selectItem itemLabel="Select Type" itemValue="" noSelectionOption="true" />
             <f:selectItems value="#{experimentTypeController.getAvailableItems()}" 
-                           var="n"
-                           itemValue="#{n}"
-                           itemLabel="#{n.name}"/>
+                           var="experimentType"
+                           itemValue="#{experimentType}"
+                           itemLabel="#{experimentType.name}"/>
         </p:selectOneMenu>
 
         <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/>
         <h:inputText id="description" value="#{experimentObject.description}" title="Description" styleClass="entityDataText"/>      
 
         <h:outputLabel for="startDate" value="Start Date" styleClass="entityDataLabel"/>
-        <p:calendar id="startDate" value="#{experimentObject.startDate}" />
+        <p:calendar id="startDate" value="#{experimentObject.startDate}" mode="popup" showOn="button" />
         
-        <h:outputLabel for="endDate" value="End Date" styleClass="entityDataLabel"/>
-        <p:calendar id="endDate" value="#{experimentObject.endDate}" />
+        <h:outputLabel for="endDate" value="End Date" />
+        <p:calendar id="endDate" value="#{experimentObject.endDate}" mode="popup" showOn="button" />
         
     </p:panelGrid>
 
diff --git a/src/java/DmWebPortal/web/views/experiment/experimentEditPanelGrid.xhtml b/src/java/DmWebPortal/web/views/experiment/experimentEditPanelGrid.xhtml
index 646c858c..82f58902 100644
--- a/src/java/DmWebPortal/web/views/experiment/experimentEditPanelGrid.xhtml
+++ b/src/java/DmWebPortal/web/views/experiment/experimentEditPanelGrid.xhtml
@@ -9,10 +9,10 @@
     <ui:param name="experimentObject" value="#{experimentController.selected}"/>
     <ui:param name="isFieldWriteable" value="#{loginController.loggedIn}"/>
 
-    <p:panelGrid columns="2" styleClass="editEntityDetails"> 
+    <p:panelGrid columns="2" > 
 
         <h:outputLabel for="name" value="Name" styleClass="entityDataEmphasizedLabel"/>
-        <h:inputText id="name" value="#{experimentObject.name}" title="Name" required="true" styleClass="entityDataEmphasizedText"/>
+        <h:inputText id="name" value="#{experimentObject.name}" title="Name" styleClass="entityDataEmphasizedText"/>
 
         <h:outputLabel for="id" value="Id" styleClass="entityDataLabel"/>
         <h:outputText id="id" value="#{experimentObject.id}" title="Id" styleClass="entityDataText"/>
@@ -21,19 +21,19 @@
         <p:selectOneMenu id="experimentType" value="#{experimentObject.experimentType}" styleClass="entityDataText">
             <f:selectItem itemLabel="Select Type" itemValue="" noSelectionOption="true" />
             <f:selectItems value="#{experimentTypeController.getAvailableItems()}" 
-                           var="n"
-                           itemValue="#{n}"
-                           itemLabel="#{n.name}"/>
+                           var="experimentType"
+                           itemValue="#{experimentType}"
+                           itemLabel="#{experimentType.name}"/>
         </p:selectOneMenu>
 
         <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/>
         <h:inputText id="description" value="#{experimentObject.description}" title="Description" styleClass="entityDataText"/>  
         
         <h:outputLabel for="startDate" value="Start Date" styleClass="entityDataLabel"/>
-        <p:calendar id="startDate" value="#{experimentObject.startDate}" />
+        <p:calendar id="startDate" value="#{experimentObject.startDate}" mode="popup" showOn="button" />
         
         <h:outputLabel for="endDate" value="End Date" styleClass="entityDataLabel"/>
-        <p:calendar id="endDate" value="#{experimentObject.endDate}" />
+        <p:calendar id="endDate" value="#{experimentObject.endDate}" mode="popup" showOn="button" />
 
     </p:panelGrid>
 </ui:composition>
diff --git a/src/java/DmWebPortal/web/views/experiment/list.xhtml b/src/java/DmWebPortal/web/views/experiment/list.xhtml
index e894f0b4..0e2487af 100644
--- a/src/java/DmWebPortal/web/views/experiment/list.xhtml
+++ b/src/java/DmWebPortal/web/views/experiment/list.xhtml
@@ -23,8 +23,6 @@
 
             <ui:include src="experimentDestroyDialog.xhtml"/>
 
-            <h:outputScript library="js/experiment" name="list.filter.js" rendered="#{loginController.loggedIn}"/>
-
         </h:form>
 
     </ui:define>
diff --git a/src/java/DmWebPortal/web/views/experimentType/experimentTypeCreatePanelGrid.xhtml b/src/java/DmWebPortal/web/views/experimentType/experimentTypeCreatePanelGrid.xhtml
index b543b34a..7e312a82 100644
--- a/src/java/DmWebPortal/web/views/experimentType/experimentTypeCreatePanelGrid.xhtml
+++ b/src/java/DmWebPortal/web/views/experimentType/experimentTypeCreatePanelGrid.xhtml
@@ -11,7 +11,7 @@
     <p:panelGrid columns="2" styleClass="createEntityDetails">
 
         <h:outputLabel for="name" value="Name" styleClass="entityDataEmphasizedLabel"/>
-        <h:inputText id="name" value="#{experimentTypeObject.name}" title="Name" required="true" styleClass="entityDataEmphasizedText"/> 
+        <h:inputText id="name" value="#{experimentTypeObject.name}" title="Name" styleClass="entityDataEmphasizedText"/> 
 
         <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/>
         <h:inputText id="description" value="#{experimentTypeObject.description}" title="Description" styleClass="entityDataText"/>        
diff --git a/src/java/DmWebPortal/web/views/experimentType/experimentTypeEditPanelGrid.xhtml b/src/java/DmWebPortal/web/views/experimentType/experimentTypeEditPanelGrid.xhtml
index 2ee3811f..58f77842 100644
--- a/src/java/DmWebPortal/web/views/experimentType/experimentTypeEditPanelGrid.xhtml
+++ b/src/java/DmWebPortal/web/views/experimentType/experimentTypeEditPanelGrid.xhtml
@@ -10,7 +10,7 @@
     <p:panelGrid columns="2" styleClass="editEntityDetails"> 
 
         <h:outputLabel for="name" value="Name" styleClass="entityDataEmphasizedLabel"/>
-        <h:inputText id="name" value="#{experimentTypeObject.name}" title="Name" required="true" styleClass="entityDataEmphasizedText"/> 
+        <h:inputText id="name" value="#{experimentTypeObject.name}" title="Name" styleClass="entityDataEmphasizedText"/> 
 
         <h:outputLabel for="id" value="Id" styleClass="entityDataLabel"/>
         <h:outputText id="id" value="#{experimentTypeObject.id}" title="Id" styleClass="entityDataText"/>
diff --git a/src/java/DmWebPortal/web/views/experimentType/list.xhtml b/src/java/DmWebPortal/web/views/experimentType/list.xhtml
index 2ecc56bd..def1112b 100644
--- a/src/java/DmWebPortal/web/views/experimentType/list.xhtml
+++ b/src/java/DmWebPortal/web/views/experimentType/list.xhtml
@@ -23,8 +23,6 @@
 
             <ui:include src="experimentTypeDestroyDialog.xhtml"/>
 
-            <h:outputScript library="js/experimentType" name="list.filter.js" rendered="#{loginController.loggedIn}"/>
-
         </h:form>
 
     </ui:define>
diff --git a/src/java/DmWebPortal/web/views/roleType/roleTypeCreatePanelGrid.xhtml b/src/java/DmWebPortal/web/views/roleType/roleTypeCreatePanelGrid.xhtml
index 98e43f02..2658debc 100644
--- a/src/java/DmWebPortal/web/views/roleType/roleTypeCreatePanelGrid.xhtml
+++ b/src/java/DmWebPortal/web/views/roleType/roleTypeCreatePanelGrid.xhtml
@@ -11,7 +11,7 @@
     <p:panelGrid columns="2" styleClass="createEntityDetails">
 
         <h:outputLabel for="name" value="Role Name" styleClass="entityDataEmphasizedLabel"/>
-        <h:inputText id="name" value="#{roleTypeObject.name}" title="Role Name" required="true" styleClass="entityDataEmphasizedText"/> 
+        <h:inputText id="name" value="#{roleTypeObject.name}" title="Role Name" styleClass="entityDataEmphasizedText"/> 
 
         <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/>
         <h:inputText id="description" value="#{roleTypeObject.description}" title="Description" styleClass="entityDataText"/>       
diff --git a/src/java/DmWebPortal/web/views/roleType/roleTypeEditPanelGrid.xhtml b/src/java/DmWebPortal/web/views/roleType/roleTypeEditPanelGrid.xhtml
index 7071672d..2d7bf1fa 100644
--- a/src/java/DmWebPortal/web/views/roleType/roleTypeEditPanelGrid.xhtml
+++ b/src/java/DmWebPortal/web/views/roleType/roleTypeEditPanelGrid.xhtml
@@ -12,7 +12,7 @@
     <p:panelGrid columns="2" styleClass="editEntityDetails"> 
 
         <h:outputLabel for="name" value="Name" styleClass="entityDataEmphasizedLabel"/>
-        <h:inputText id="name" value="#{roleTypeObject.name}" title="Name" required="true" styleClass="entityDataEmphasizedText"/>
+        <h:inputText id="name" value="#{roleTypeObject.name}" title="Name" styleClass="entityDataEmphasizedText"/>
 
         <h:outputLabel for="id" value="Id" styleClass="entityDataLabel"/>
         <h:outputText id="id" value="#{roleTypeObject.id}" title="Id" styleClass="entityDataText"/>
diff --git a/src/java/DmWebPortal/web/views/roleType/roleTypeListDataTable.xhtml b/src/java/DmWebPortal/web/views/roleType/roleTypeListDataTable.xhtml
index d674ec73..ae568d98 100644
--- a/src/java/DmWebPortal/web/views/roleType/roleTypeListDataTable.xhtml
+++ b/src/java/DmWebPortal/web/views/roleType/roleTypeListDataTable.xhtml
@@ -44,7 +44,7 @@
                      <f:setPropertyActionListener value="#{roleTypeObject}" target="#{roleTypeController.current}"/>
                 </p:commandLink>
 
-         <p:commandLink action="#{userSystemRoleController.prepareSystemRoleView()}" rendered="#{roleTypeController.isRoleSystemType(roleTypeObject.name)}"  styleClass="ui-icon ui-icon-person" title="List All" >
+         <p:commandLink action="#{userSystemRoleController.prepareSystemRoleView()}" rendered="#{roleTypeController.isRoleSystemType(roleTypeObject)}"  styleClass="ui-icon ui-icon-person" title="List All" >
                    <f:setPropertyActionListener value="#{roleTypeObject.id}" target="#{userSystemRoleController.systemRoleId}"/>
                 </p:commandLink>
           </div>
diff --git a/src/java/DmWebPortal/web/views/userInfo/userInfoCreatePanelGrid.xhtml b/src/java/DmWebPortal/web/views/userInfo/userInfoCreatePanelGrid.xhtml
index c60402e5..242e049a 100644
--- a/src/java/DmWebPortal/web/views/userInfo/userInfoCreatePanelGrid.xhtml
+++ b/src/java/DmWebPortal/web/views/userInfo/userInfoCreatePanelGrid.xhtml
@@ -13,10 +13,10 @@
         <h:inputText id="username" value="#{userInfoObject.username}" title="Username" styleClass="entityDataEmphasizedText"/>
 
         <h:outputLabel for="lastName" value="Last Name" styleClass="entityDataLabel"/>
-        <h:inputText id="lastName" value="#{userInfoObject.lastName}" title="Last Name" required="true" styleClass="entityDataText"/>
+        <h:inputText id="lastName" value="#{userInfoObject.lastName}" title="Last Name" styleClass="entityDataText"/>
 
         <h:outputLabel for="firstName" value="First Name" styleClass="entityDataLabel"/>
-        <h:inputText id="firstName" value="#{userInfoObject.firstName}" title="First Name" required="true" styleClass="entityDataText"/> 
+        <h:inputText id="firstName" value="#{userInfoObject.firstName}" title="First Name" styleClass="entityDataText"/> 
 
         <h:outputLabel for="middleName" value="Middle Name" styleClass="entityDataLabel"/>
         <h:inputText id="middleName" value="#{userInfoObject.middleName}" title="Middle Name" styleClass="entityDataText"/>
diff --git a/src/java/DmWebPortal/web/views/userInfo/userInfoEditPanelGrid.xhtml b/src/java/DmWebPortal/web/views/userInfo/userInfoEditPanelGrid.xhtml
index a1b9077e..ae2bef42 100644
--- a/src/java/DmWebPortal/web/views/userInfo/userInfoEditPanelGrid.xhtml
+++ b/src/java/DmWebPortal/web/views/userInfo/userInfoEditPanelGrid.xhtml
@@ -11,18 +11,18 @@
     <p:panelGrid columns="2" styleClass="editEntityDetails"> 
 
         <h:outputLabel for="username" value="Username" styleClass="entityDataEmphasizedLabel"/>
-        <h:inputText id="username" value="#{userInfoObject.username}" rendered="#{isFieldWriteable}" title="Username" required="true" styleClass="entityDataEmphasizedText"/>
+        <h:inputText id="username" value="#{userInfoObject.username}" rendered="#{isFieldWriteable}" title="Username" styleClass="entityDataEmphasizedText"/>
         <h:outputText id="usernameOutput" value="#{userInfoObject.username}" rendered="#{!isFieldWriteable}" title="Username" styleClass="entityDataEmphasizedText"/>
 
         <h:outputLabel for="id" value="Id" styleClass="entityDataLabel"/>
         <h:outputText id="id" value="#{userInfoObject.id}" title="Id" styleClass="entityDataText"/>
 
         <h:outputLabel for="lastName" value="Last Name" styleClass="entityDataLabel"/>
-        <h:inputText id="lastName" value="#{userInfoObject.lastName}" rendered="#{isFieldWriteable}" title="Last Name" required="true" styleClass="entityDataText"/>
+        <h:inputText id="lastName" value="#{userInfoObject.lastName}" rendered="#{isFieldWriteable}" title="Last Name" styleClass="entityDataText"/>
         <h:outputText id="lastNameOutput" value="#{userInfoObject.lastName}" rendered="#{!isFieldWriteable}" title="Last Name" styleClass="entityDataText"/>
 
         <h:outputLabel for="firstName" value="First Name" styleClass="entityDataLabel"/>
-        <h:inputText id="firstName" value="#{userInfoObject.firstName}" rendered="#{isFieldWriteable}" title="First Name" required="true" styleClass="entityDataText"/>
+        <h:inputText id="firstName" value="#{userInfoObject.firstName}" rendered="#{isFieldWriteable}" title="First Name" styleClass="entityDataText"/>
         <h:outputText id="firstNameOutput" value="#{userInfoObject.firstName}" rendered="#{!isFieldWriteable}" title="First Name" styleClass="entityDataText"/> 
 
         <h:outputLabel for="middleName" value="Middle Name" styleClass="entityDataLabel"/>
-- 
GitLab