@Override
public BillableReceipt getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
- // Is the instance there?
- if (null == RECEIPT_LIST_CONTROLLER) {
- // Get bean from CDI directly
- RECEIPT_LIST_CONTROLLER = CDI.current().select(FinancialsReceiptListWebViewBean.class).get();
- }
-
// Is the value null or empty?
if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
// Warning message
// Init instance
BillableReceipt receipt = null;
+ // Is the instance there?
+ if (null == RECEIPT_LIST_CONTROLLER) {
+ // Get bean from CDI directly
+ RECEIPT_LIST_CONTROLLER = CDI.current().select(FinancialsReceiptListWebViewBean.class).get();
+ }
+
try {
// Try to parse the value as long
final Long receiptId = Long.valueOf(submittedValue);
value="#{branchOfficeListController.allBranchOffices}"
var="branchOffice"
itemValue="#{branchOffice}"
- itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}"
+ itemLabel="#{beanHelper.renderBranchOffice(branchOffice, false)}"
/>
</p:selectOneMenu>
value="#{employeeListController.allEmployees}"
var="employee"
itemValue="#{employee}"
- itemLabel="#{beanHelper.renderEmployee(employee)}"
- itemDescription="#{beanHelper.renderBasicData(employee.employeeBasicData, true)}, #{beanHelper.renderBranchOffice(employee.employeeBranchOffice)}"
+ itemLabel="#{beanHelper.renderEmployee(employee, false)}"
+ itemDescription="#{beanHelper.renderBasicData(employee.employeeBasicData, true, true)}, #{beanHelper.renderBranchOffice(employee.employeeBranchOffice, true)}"
/>
</p:selectOneMenu>
value="#{basicDataListController.allBasicData}"
var="basicData"
itemValue="#{basicData}"
- itemLabel="#{beanHelper.renderBasicData(basicData, true)}"
+ itemLabel="#{beanHelper.renderBasicData(basicData, true, false)}"
/>
</p:selectOneMenu>
value="#{branchOfficeListController.allBranchOffices}"
var="branchOffice"
itemValue="#{branchOffice}"
- itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}"
+ itemLabel="#{beanHelper.renderBranchOffice(branchOffice, false)}"
/>
</p:selectOneMenu>
<p:message for="branchOffice" />
value="#{employeeListController.allEmployees}"
var="companyHeadquarter"
itemValue="#{companyEmployee}"
- itemLabel="#{beanHelper.renderEmployee(companyEmployee)}"
+ itemLabel="#{beanHelper.renderEmployee(companyEmployee, false)}"
/>
</p:selectOneMenu>
<p:message for="receiptSellerEmployee" />
value="#{branchOfficeListController.allBranchOffices}"
var="branchOffice"
itemValue="#{branchOffice}"
- itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}"
+ itemLabel="#{beanHelper.renderBranchOffice(branchOffice, false)}"
/>
</p:selectCheckboxMenu>
</f:facet>
<p:link
outcome="admin_show_branch_office"
- value="#{beanHelper.renderBranchOffice(receipt.receiptBranchOffice)}"
+ value="#{beanHelper.renderBranchOffice(receipt.receiptBranchOffice, false)}"
title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}"
>
<f:param name="branchId" value="#{receipt.receiptBranchOffice.branchId}" />
value="#{employeeListController.allEmployees}"
var="employee"
itemValue="#{employee}"
- itemLabel="#{beanHelper.renderEmployee(employee)}"
+ itemLabel="#{beanHelper.renderEmployee(employee, false)}"
/>
</p:selectCheckboxMenu>
</f:facet>
<p:link
outcome="admin_show_employee"
- value="#{beanHelper.renderEmployee(receipt.receiptSellerEmployee)}"
+ value="#{beanHelper.renderEmployee(receipt.receiptSellerEmployee, false)}"
title="#{project.ADMIN_LINK_SHOW_RECEIPT_SELLER_EMPLOYEE_TITLE}"
rendered="#{not empty receipt.receiptSellerEmployee}"
>
<p:outputLabel value="#{msg.BRANCH_OFFICE}" title="#{project.ASSIGNED_RECEIPT_BRANCH_OFFICE_TITLE}" />
<p:link
outcome="admin_show_branch_office"
- value="#{beanHelper.renderBranchOffice(receiptListController.selectedReceipt.receiptBranchOffice)}"
+ value="#{beanHelper.renderBranchOffice(receiptListController.selectedReceipt.receiptBranchOffice, true)}"
title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}"
>
<f:param name="branchId" value="#{receiptListController.selectedReceipt.receiptBranchOffice.branchId}" />
<p:outputLabel value="#{project.SELLER_HEADER}" title="#{project.ASSIGNED_RECEIPT_SELLER_TITLE}" />
<p:link
outcome="admin_show_employee"
- value="#{beanHelper.renderEmployee(receiptListController.selectedReceipt.receiptSellerEmployee)}"
+ value="#{beanHelper.renderEmployee(receiptListController.selectedReceipt.receiptSellerEmployee, true)}"
title="#{project.ADMIN_LINK_SHOW_RECEIPT_SELLER_EMPLOYEE_TITLE}"
rendered="#{not empty receiptListController.selectedReceipt.receiptSellerEmployee}"
>
value="#{basicDataListController.allBasicData}"
var="basicData"
itemValue="#{basicData}"
- itemLabel="#{beanHelper.renderBasicData(basicData, true)}"
+ itemLabel="#{beanHelper.renderBasicData(basicData, true, false)}"
/>
</p:selectCheckboxMenu>
</f:facet>
<p:link
outcome="admin_show_basic_data"
- value="#{beanHelper.renderBasicData(receiptItem.itemManufacturer, true)}"
+ value="#{beanHelper.renderBasicData(receiptItem.itemManufacturer, true, false)}"
title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_TITLE}"
rendered="#{not empty receiptItem.itemManufacturer}"
>