private void setUserGridRow(grdUserListRow row, AppUserShortWithNameVo user) { if (row == null) throw new CodingRuntimeException("Major Logical Error - Can not set a null row to a value"); if (user == null) throw new CodingRuntimeException("Logical Error - Can not set a null value to a row"); if (user.getMosName() == null) throw new CodingRuntimeException("Logical Error - User has no name"); row.setValue(user); row.setcolPersonName(user.getMosName().toString()); row.setTooltipForcolPersonName(user.getMosName().toString()); row.setcolUsername(user.getUsername()); row.setTooltipForcolUsername(user.getUsername()); }
private void setDetails(AppUserShortWithNameVo user) { clearDetails(); // Show the correspondences (get from domain) try { setLabels(user); UserAccessVo userAccess = domain.getUserAccess(user); populateCorrespondences(userAccess); form.getLocalContext().setcurrentUserAccess(userAccess); } catch (CodingRuntimeException exception) { engine.showMessage(exception.getMessage()); } }
private void setLabels(AppUserShortWithNameVo user) { if (user == null) { // Clear the labels form.lblName().setValue("Name: -"); form.lblUsername().setValue("Username: -"); return; } if (user.getMosName() == null) throw new CodingRuntimeException("Logical Error - User has no name"); // Show the user name and username on labels form.lblName().setValue("Name: \t\t" + user.getMosName().toString()); form.lblUsername().setValue("Username: \t" + user.getUsername()); }