Subversion Repository Public Repository

playgrnd

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
/*
 * BankingBean.java Jan 21, 2012
 * 
 * Copyright 2010 Uralian, LLC. All rights reserved.
 */
package com.uralian.sample;

import java.io.Serializable;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

/**
 * @author Vlad Orzhekhovskiy
 */
@Controller
@Scope("request")
public class BankingBean implements Serializable
{
	private static final long serialVersionUID = -7131310826202396876L;

	private String customerId;
	private String password;
	private Customer customer;

	@Autowired
	private ColorPreferences colorPreferences;

	@Autowired
	private CustomerLookupService lookupService;

	public ColorPreferences getColorPreferences()
	{
		return colorPreferences;
	}

	public void setColorPreferences(ColorPreferences colorPreferences)
	{
		this.colorPreferences = colorPreferences;
	}

	public CustomerLookupService getLookupService()
	{
		return lookupService;
	}

	public void setLookupService(CustomerLookupService lookupService)
	{
		this.lookupService = lookupService;
	}

	/**
	 * @return the customerId.
	 */
	public String getCustomerId()
	{
		return customerId;
	}

	/**
	 * @param customerId the customerId to set.
	 */
	public void setCustomerId(String customerId)
	{
		this.customerId = customerId;
	}

	/**
	 * @return the password.
	 */
	public String getPassword()
	{
		return password;
	}

	/**
	 * @param password the password to set.
	 */
	public void setPassword(String password)
	{
		this.password = password;
	}

	/**
	 * @return the customer.
	 */
	public Customer getCustomer()
	{
		return customer;
	}

	/**
	 * @param customer the customer to set.
	 */
	public void setCustomer(Customer customer)
	{
		this.customer = customer;
	}

	/**
	 * @return
	 */
	public String showBalance()
	{
		customer = lookupService.findCustomer(customerId);
		return "balance";
	}
}

Commits for playgrnd/jsf-sample/src/main/java/com/uralian/sample/BankingBean.java

Diff revisions: vs.
Revision Author Commited Message
35 snark picture snark Thu 17 Aug, 2017 23:28:40 +0000

add jsf-sample project