Subversion Repositories SmartDukaan

Rev

Rev 762 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 762 Rev 822
Line 8... Line 8...
8
 
8
 
9
import java.io.UnsupportedEncodingException;
9
import java.io.UnsupportedEncodingException;
10
 
10
 
11
import org.apache.juli.logging.Log;
11
import org.apache.juli.logging.Log;
12
import org.apache.juli.logging.LogFactory;
12
import org.apache.juli.logging.LogFactory;
-
 
13
import org.apache.struts2.convention.annotation.InterceptorRef;
-
 
14
import org.apache.struts2.convention.annotation.InterceptorRefs;
13
import org.apache.struts2.convention.annotation.Result;
15
import org.apache.struts2.convention.annotation.Result;
14
import org.apache.struts2.convention.annotation.Results;
16
import org.apache.struts2.convention.annotation.Results;
15
import org.apache.thrift.TException;
17
import org.apache.thrift.TException;
16
 
18
 
17
/**
19
/**
18
 * @author rajveer
20
 * @author rajveer
19
 *
21
 *
20
 */
22
 */
21
 
23
 
-
 
24
@InterceptorRefs({
-
 
25
    @InterceptorRef("myDefault"),
-
 
26
    @InterceptorRef("login")
-
 
27
})
-
 
28
 
22
@Results({
29
@Results({
23
    @Result(name="success", type="redirectAction", 
30
    @Result(name="success", type="redirectAction", 
24
    		params = {"actionName" , "login-details"}),
31
    		params = {"actionName" , "login-details"})
25
    @Result(name="redirect", type="redirectAction", 
-
 
26
    	    params = {"actionName" , "login"})
-
 
27
})
32
})
28
public class LoginDetailsController extends BaseController {
33
public class LoginDetailsController extends BaseController {
29
 
34
 
30
	private static final long serialVersionUID = 1L;
35
	private static final long serialVersionUID = 1L;
31
 
36
 
Line 59... Line 64...
59
    
64
    
60
    // GET /test
65
    // GET /test
61
    public String index() throws UnsupportedEncodingException {
66
    public String index() throws UnsupportedEncodingException {
62
    	log.info("this.request=" + this.request);
67
    	log.info("this.request=" + this.request);
63
    	
68
    	
64
		if(!userinfo.isLoggedIn()){
69
		htmlSnippets.put("MYACCOUNT_HEADER",
65
			setRedirectUrl();
70
				pageLoader.getMyaccountHeaderHtml());
66
			return "redirect";
-
 
67
    	}else{
-
 
68
    		htmlSnippets.put("MYACCOUNT_HEADER", pageLoader.getMyaccountHeaderHtml());
71
		htmlSnippets.put("LOGIN_DETAILS",
69
    		htmlSnippets.put("LOGIN_DETAILS", pageLoader.getLoginDetailsHtml(userinfo.getUserId()));
72
				pageLoader.getLoginDetailsHtml(userinfo.getUserId()));
70
    		return "index";
73
		return "index";
71
    	}
-
 
72
    	
-
 
73
    }
74
    }
74
    
75
    
75
    
76
    
76
	public boolean changePassword(long userId, String email, String oldPassword, String newPassword) {
77
	public boolean changePassword(long userId, String email, String oldPassword, String newPassword) {
77
 
78