return sb.toString();
}
+ /**
+ * Returns the user's personal title, family name and name. If null is
+ * provided, an empty string is returned.
+ * <p>
+ * @param user User instance
+ * <p>
+ * @return User's full name
+ */
+ public String renderUser (final User user) {
+ // Default is empty string, so let's get started
+ final StringBuilder sb = new StringBuilder(20);
+
+ // Is user given?
+ if (user instanceof User) {
+ // Add user name first
+ sb.append(user.getUserName());
+ sb.append(" ("); //NOI18N
+
+ // Add contact data
+ sb.append(this.renderContact(user.getUserContact()));
+
+ // Close brace
+ sb.append(")"); //NOI18N
+ }
+
+ // Return it
+ return sb.toString();
+ }
+
/**
* Set's all given contact's phone instances: land-line, mobile and
* faxNumber
BASIC_DATA_LINK_MASK={0} (Nr. {1})
#@TODO Please fix German umlauts!
ADMIN_LINK_LIST_OPENING_TIMES_TITLE=Listet alle Oeffnungszeiten auf.
+LABEL_PAYMENT_TYPES=Bezahlungsarten
+BRANCH_OFFICE=Filiale:
+USER_HEADER=Benutzer:
SEARCH_ALL_FIELDS=Search all fields:
BASIC_DATA_LINK_MASK={0} (No. {1})
ADMIN_LINK_LIST_OPENING_TIMES_TITLE=Lists all opening times.
+LABEL_PAYMENT_TYPES=Payment types
+BRANCH_OFFICE=Branch office:
+USER_HEADER=User:
title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
>
<f:converter converterId="UserConverter" />
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
<f:selectItems value="#{userController.allUsers()}" var="user" itemValue="#{user}" itemLabel="#{user.userName}" />
</p:selectCheckboxMenu>
</f:facet>
title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
>
<f:converter converterId="EmployeeConverter" />
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
<f:selectItems value="#{employeeController.allEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
</p:selectCheckboxMenu>
</f:facet>
title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
>
<f:converter converterId="EmployeeConverter" />
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
<f:selectItems value="#{employeeController.allEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
</p:selectCheckboxMenu>
</f:facet>
title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
>
<f:converter converterId="UserConverter" />
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
<f:selectItems value="#{userController.allUsers()}" var="user" itemValue="#{user}" itemLabel="#{user.userName}" />
</p:selectCheckboxMenu>
</f:facet>
title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
>
<f:converter converterId="EmployeeConverter" />
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
<f:selectItems value="#{employeeController.allEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
</p:selectCheckboxMenu>
</f:facet>
title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
>
<f:converter converterId="BranchOfficeConverter" />
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
<f:selectItems value="#{branchOfficeController.allBranchOffices()}" var="branchOffice" itemValue="#{branchOffice}" itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}" />
</p:selectCheckboxMenu>
</f:facet>
title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
>
<f:converter converterId="EmployeeConverter" />
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
<f:selectItems value="#{employeeController.allEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
</p:selectCheckboxMenu>
</f:facet>
title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
>
<f:converter converterId="UserConverter" />
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
<f:selectItems value="#{userController.allUsers()}" var="user" itemValue="#{user}" itemLabel="#{user.userName}" />
</p:selectCheckboxMenu>
</f:facet>
title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
>
<f:converter converterId="BranchOfficeConverter" />
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
<f:selectItems value="#{branchOfficeController.allBranchOffices()}" var="branchOffice" itemValue="#{branchOffice}" itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}" />
</p:selectCheckboxMenu>
</f:facet>
updateLabel="true" title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
>
<f:converter converterId="UserConverter" />
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
<f:selectItems value="#{userController.allUsers()}" var="user" itemValue="#{user}" itemLabel="#{user.userName}" />
</p:selectCheckboxMenu>
</f:facet>
title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
>
<f:converter converterId="UserConverter" />
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
<f:selectItems value="#{userController.allUsers()}" var="user" itemValue="#{user}" itemLabel="#{user.userName}" />
</p:selectCheckboxMenu>
</f:facet>
title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
>
<f:converter converterId="EmployeeConverter" />
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
<f:selectItems value="#{employeeController.allEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
</p:selectCheckboxMenu>
</f:facet>
title="#{msg.FILTER_BY_MULTIPLE_WEEK_DAYS_TITLE}"
>
<f:converter converterId="DayOfTheWeekConverter" />
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
<f:selectItems value="#{dataController.dayOfTheWeek}" var="dayOfWeek" itemValue="#{dayOfWeek}" itemLabel="#{dayOfWeek.toString()}" />
</p:selectCheckboxMenu>
</f:facet>
title="#{msg.FILTER_BY_MULTIPLE_WEEK_DAYS_TITLE}"
>
<f:converter converterId="DayOfTheWeekConverter" />
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
<f:selectItems value="#{dataController.dayOfTheWeek}" var="dayOfWeek" itemValue="#{dayOfWeek}" itemLabel="#{dayOfWeek.toString()}" />
</p:selectCheckboxMenu>
</f:facet>
title="#{msg.FILTER_BY_SINGLE_PERSONAL_TITLE}"
>
<f:converter converterId="PersonalTitleConverter" />
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
<f:selectItems
value="#{dataController.personalTitles}"
var="personalTitle"
title="#{msg.FILTER_BY_SINGLE_ACCOUNT_STATUS_TITLE}"
>
<f:converter converterId="UserAccountStatusConverter" />
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
<f:selectItems
value="#{dataController.userAccountStatuses}"
var="accountStatus"
title="#{msg.FILTER_BY_SINGLE_PROFILE_MODE_TITLE}"
>
<f:converter converterId="ProfileModeConverter" />
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
<f:selectItems
value="#{dataController.profileModes}"
var="profileMode"
filterMatchMode="contains"
>
<f:converter converterId="ContactConverter" />
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
<f:selectItems value="#{contactController.selectableContacts()}" var="contact" itemValue="#{contact}" itemLabel="#{contact.contactId}: #{msg[contact.contactPersonalTitle.messageKey]} #{contact.contactFirstName} #{contact.contactFamilyName}" />
</p:selectOneMenu>
</p:panelGrid>