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 74ff2d30d3d14b907afc0f29bc319973b413ac02..227ff11e4211819d23712a0aa5a384d3203d54be 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 2489e355ceb1e08eebf6252f5f732a9fc0d8577a..b036a0d0bacd7c75699cb5bc472e135dace78f92 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 d398dee30a1f827968f135b9451920f58ad79ef3..8c04ff6f131869fd49a5c11908e1a6ceb8f9f205 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 a898dfea79231cce95dcb4794cea9a3605b70b25..809ae1f4ea34432d0124b0987c619bbae765c5ae 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 2ede628235efec9da8b6c11ec55a8ef0c9f1b954..31a21e85bb4e34cff1ba7c0cdcf9f0ccb1b175cf 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 4c48b52d3f92b449014a0e7bb184fb5b15ab1b7c..a2ac97ff8f062e7a797db10fdf59ca92b4d47922 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 55c47b96e7cfe7d7a60ab46e0c081db9bf054d13..98be61c2075ef9ad1355b5f5f03595a19990a27a 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 426e705bed05a68ab00aae481f94c50ce7866e6c..f70d32824e5f284bacc4a1e90f2b5e75a69b2da8 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 0cb3f029487f9be3f112d826828a77d955814110..0000000000000000000000000000000000000000 --- 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 ce1720c3ffe0f670716f3b02b602918729fa588c..0000000000000000000000000000000000000000 --- 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 5c1eb5932f87795155afb826bf67ad0bf71c29f6..7c8be0b48e9ae497e40d1dbd04ef6604842685b9 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 646c858c144587fd35bed32892078967140a6f60..82f589028bc671014ee3e1add73ca095a3ef8ece 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 e894f0b43e6751789b651cd078ed1c095bd90c19..0e2487af4200e6fc0dd5291b5bd35ea7a23aab1a 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 b543b34a2f141fea7884ee07908923885e3a5fb0..7e312a82817d6d49112f79916d3e2da02367daef 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 2ee3811fd2cae4d9448154a73a1b30dda157a3aa..58f77842201e927cdeb321e74e1a9b5999df7891 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 2ecc56bd4d1c0e2a61cbef51b6f4819e7f5bed40..def1112ba46e1cc58740371d9fe02023a938785e 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 98e43f02e8f935fb79e75e274fb0efe015238a35..2658debc03df57461fd5f6e815145bbab2ec4747 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 7071672da733a33f6253be2e3b179866060c7742..2d7bf1faaa989ce4d12d51f8a9a33a3c8e3cf744 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 d674ec73d9d1f761a8ba0e99f56f09b16a4c5f16..ae568d9814aff28a02030f70ec2b3ad65a7b2a27 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 c60402e56309d56f5e5ed00f1038d420a2aed4a0..242e049ae78f214cdde3f66778f5d2c78cfaba69 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 a1b9077ec930f701a80727342cd677cc3fb66ae8..ae2bef428d3c0180328ad7f0c25216bed98c7d37 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"/>