public void initCache () {
// Is cache there?
if (!this.receiptCache.iterator().hasNext()) {
- // Get whole list from EJB
- final List<BillableReceipt> receipts = this.receiptBean.allReceipts();
-
// Add all
- for (final BillableReceipt receipt : receipts) {
+ for (final BillableReceipt receipt : this.receiptBean.allReceipts()) {
// Add it to cache
this.receiptCache.put(receipt.getReceiptId(), receipt);
}
* @param event Event instance
*/
public void afterUserLoginEvent (@Observes final ObservableUserLoggedInEvent event) {
- // event should not be null
+ // Event and contained entity instance should not be null
if (null == event) {
// Throw NPE
throw new NullPointerException("event is null"); //NOI18N
* @param event Event instance
*/
public void afterUserLoginEvent (@Observes final ObservableUserLoggedInEvent event) {
- // event should not be null
+ // Event and contained entity instance should not be null
if (null == event) {
// Throw NPE
throw new NullPointerException("event is null"); //NOI18N
public void initCache () {
// Is cache there?
if (!this.receiptItemCache.iterator().hasNext()) {
- // Get whole list from EJB
- final List<BillableReceiptItem> receiptItems = this.receiptItemBean.allReceiptItems();
-
// Add all
- for (final BillableReceiptItem receiptItem : receiptItems) {
+ for (final BillableReceiptItem receiptItem : this.receiptItemBean.allReceiptItems()) {
// Add it to cache
this.receiptItemCache.put(receiptItem.getItemId(), receiptItem);
}
* @param event Event instance
*/
public void afterUserLoginEvent (@Observes final ObservableUserLoggedInEvent event) {
- // event should not be null
+ // Event and contained entity instance should not be null
if (null == event) {
// Throw NPE
throw new NullPointerException("event is null"); //NOI18N
<f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
<f:selectItems
- value="#{userController.allUsers()}"
+ value="#{userListController.allUsers}"
var="receiptUser"
itemValue="#{receiptUser}"
itemLabel="#{beanHelper.renderContact(receiptUser.userContact)} (#{receiptUser.userName})"
<f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
<f:selectItems
- value="#{userController.allUsers()}"
+ value="#{userListController.allUsers}"
var="user"
itemValue="#{user}"
itemLabel="#{beanHelper.renderUser(user)}"